Browse Source

Fixed stack pointer width

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8001 8c9fc860-2736-0410-a75d-ab315db34111
eth.negelef 7 years ago
parent
commit
39400f9919
1 changed files with 6 additions and 6 deletions
  1. 6 6
      source/AMD64.Reals.Mod

+ 6 - 6
source/AMD64.Reals.Mod

@@ -176,9 +176,9 @@ END fcr;
 
 (** Return state of the floating-point control register. *)
 PROCEDURE FCR*(): SET;
-CODE {SYSTEM.386, SYSTEM.FPU}
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
 	PUSH 0
-	FSTCW [ESP]
+	FSTCW [RSP]
 	FWAIT
 	POP EAX
 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. *)
 
 PROCEDURE SetFCR*(s: SET);
-CODE {SYSTEM.386, SYSTEM.FPU}
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
 	FLDCW [RBP + s]
 END SetFCR;
 
 (** Round x to an integer using the current rounding mode. *)
 
 PROCEDURE -Round*(x: REAL): LONGINT;	(** non-portable *)
-CODE {SYSTEM.386, SYSTEM.FPU}
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
 	FLD DWORD [RSP]
 	FISTP DWORD [RSP]	; store integer using current rounding mode
 	FWAIT
@@ -203,7 +203,7 @@ END Round;
 (** Round x to an integer using the current rounding mode. *)
 
 PROCEDURE -RoundL*(x: LONGREAL): LONGINT;	(** non-portable *)
-CODE {SYSTEM.386, SYSTEM.FPU}
+CODE {SYSTEM.AMD64, SYSTEM.FPU}
 	FLD QWORD [RSP]
 	FISTP DWORD [RSP]	; store integer using current rounding mode
 	FWAIT
@@ -321,4 +321,4 @@ BEGIN InitHL;
 	gr[17]:= {0, 10, 12, 13, 16, 17, 22, 24, 30};
 	gr[18]:= {};
 	gr[19]:= {}
-END Reals.
+END Reals.