Browse Source

--- Merging r14390 into '.':
U rtl/x86_64/x86_64.inc

# revisions: 14390
------------------------------------------------------------------------
r14390 | pierre | 2009-12-10 14:11:40 +0100 (Thu, 10 Dec 2009) | 1 line
Changed paths:
M /trunk/rtl/x86_64/x86_64.inc

* simplify SysInitFPU assmebler using local variables
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@14735 -

marco 15 years ago
parent
commit
c963061761
1 changed files with 9 additions and 10 deletions
  1. 9 10
      rtl/x86_64/x86_64.inc

+ 9 - 10
rtl/x86_64/x86_64.inc

@@ -595,19 +595,18 @@ const
 
 {$define FPC_SYSTEM_HAS_SYSINITFPU}
 Procedure SysInitFPU;
+  var
+    { these locals are so we don't have to hack pic code in the assembler }
+    localmxcsr: dword;
+    localfpucw: word;
+ 
 begin
+  localmxcsr:=mxcsr;
+  localfpucw:=fpucw;
   asm
-{$ifdef FPC_PIC}
-    movq fpucw@GOTPCREL(%rip),%rax
-    fldcw (%rax)
-    { set sse exceptions }
-    movq mxcsr@GOTPCREL(%rip),%rax
-    ldmxcsr (%rax)
-{$else FPC_PIC}
-    fldcw fpucw{$ifdef FPC_HAS_RIP_RELATIVE}(%rip){$endif}
+    fldcw localfpucw
     { set sse exceptions }
-    ldmxcsr mxcsr{$ifdef FPC_HAS_RIP_RELATIVE}(%rip){$endif}
-{$endif FPC_PIC}
+    ldmxcsr localmxcsr
   end ['RAX'];
   { x86-64 might use softfloat code }
   softfloat_exception_mask:=float_flag_underflow or float_flag_inexact or float_flag_denormal;