tb0322.pp 914 B

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