ts010027.pp 935 B

12345678910111213141516171819202122232425
  1. {$IFDEF FPC}
  2. {$ASMMODE INTEL}
  3. {$ENDIF}
  4. {$N+}
  5. FUNCTION Floor(M2:Comp):LONGINT;assembler;
  6. VAR X : COMP;
  7. X2 : LONGINT;
  8. X3 : Double;
  9. s : single;
  10. ASM
  11. FLD QWord Ptr X // Here S_IL must be changed to
  12. // S_FL, i.e. the compiler must generate
  13. // fldl "X" instead of fldq "X" which is wrong
  14. fld X2 // No mem64, so no problem
  15. FLD QWord Ptr X3 // This one goes wrong under AS
  16. FilD QWord Ptr X // This one translates to fildq and is accepted?
  17. fild X2 // No mem64, so no problem
  18. FiLD QWord Ptr X3 // This one translates to fildq and is accepted?
  19. end;
  20. BEGIN
  21. END.