Explorar o código

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

git-svn-id: trunk@19465 -
sergei %!s(int64=14) %!d(string=hai) anos
pai
achega
369725f2c4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      rtl/x86_64/math.inc

+ 2 - 1
rtl/x86_64/math.inc

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