Browse Source

* Get8087CW: Make sure that high bits of result are clear.

git-svn-id: trunk@19465 -
sergei 14 years ago
parent
commit
369725f2c4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      rtl/x86_64/math.inc

+ 2 - 1
rtl/x86_64/math.inc

@@ -51,7 +51,8 @@ FPC_ABSMASK_DOUBLE:
         tmp: word;
         tmp: word;
       asm
       asm
         fnstcw tmp
         fnstcw tmp
-        movq   tmp,%rax
+        movw   tmp,%ax
+        andl   $0xffff,%eax  { clears bits 32-63 }
       end;
       end;