|
@@ -176,9 +176,9 @@ END fcr;
|
|
|
|
|
|
(** Return state of the floating-point control register. *)
|
|
(** Return state of the floating-point control register. *)
|
|
PROCEDURE FCR*(): SET;
|
|
PROCEDURE FCR*(): SET;
|
|
-CODE {SYSTEM.386, SYSTEM.FPU}
|
|
|
|
|
|
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
|
|
PUSH 0
|
|
PUSH 0
|
|
- FSTCW [ESP]
|
|
|
|
|
|
+ FSTCW [RSP]
|
|
FWAIT
|
|
FWAIT
|
|
POP EAX
|
|
POP EAX
|
|
END FCR;
|
|
END FCR;
|
|
@@ -186,14 +186,14 @@ END FCR;
|
|
(** Set state of floating-point control register. Traps reset this to the default. Note that changing the rounding mode affects rounding of imprecise results as well as the ENTIER operation. *)
|
|
(** Set state of floating-point control register. Traps reset this to the default. Note that changing the rounding mode affects rounding of imprecise results as well as the ENTIER operation. *)
|
|
|
|
|
|
PROCEDURE SetFCR*(s: SET);
|
|
PROCEDURE SetFCR*(s: SET);
|
|
-CODE {SYSTEM.386, SYSTEM.FPU}
|
|
|
|
|
|
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
|
|
FLDCW [RBP + s]
|
|
FLDCW [RBP + s]
|
|
END SetFCR;
|
|
END SetFCR;
|
|
|
|
|
|
(** Round x to an integer using the current rounding mode. *)
|
|
(** Round x to an integer using the current rounding mode. *)
|
|
|
|
|
|
PROCEDURE -Round*(x: REAL): LONGINT; (** non-portable *)
|
|
PROCEDURE -Round*(x: REAL): LONGINT; (** non-portable *)
|
|
-CODE {SYSTEM.386, SYSTEM.FPU}
|
|
|
|
|
|
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
|
|
FLD DWORD [RSP]
|
|
FLD DWORD [RSP]
|
|
FISTP DWORD [RSP] ; store integer using current rounding mode
|
|
FISTP DWORD [RSP] ; store integer using current rounding mode
|
|
FWAIT
|
|
FWAIT
|
|
@@ -203,7 +203,7 @@ END Round;
|
|
(** Round x to an integer using the current rounding mode. *)
|
|
(** Round x to an integer using the current rounding mode. *)
|
|
|
|
|
|
PROCEDURE -RoundL*(x: LONGREAL): LONGINT; (** non-portable *)
|
|
PROCEDURE -RoundL*(x: LONGREAL): LONGINT; (** non-portable *)
|
|
-CODE {SYSTEM.386, SYSTEM.FPU}
|
|
|
|
|
|
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
|
|
FLD QWORD [RSP]
|
|
FLD QWORD [RSP]
|
|
FISTP DWORD [RSP] ; store integer using current rounding mode
|
|
FISTP DWORD [RSP] ; store integer using current rounding mode
|
|
FWAIT
|
|
FWAIT
|
|
@@ -321,4 +321,4 @@ BEGIN InitHL;
|
|
gr[17]:= {0, 10, 12, 13, 16, 17, 22, 24, 30};
|
|
gr[17]:= {0, 10, 12, 13, 16, 17, 22, 24, 30};
|
|
gr[18]:= {};
|
|
gr[18]:= {};
|
|
gr[19]:= {}
|
|
gr[19]:= {}
|
|
-END Reals.
|
|
|
|
|
|
+END Reals.
|