瀏覽代碼

- disabled the i8086 math.arctan2 asm code, because it doesn't work on the 8087/80287

git-svn-id: trunk@26243 -
nickysn 11 年之前
父節點
當前提交
f23c521c50
共有 1 個文件被更改,包括 8 次插入3 次删除
  1. 8 3
      rtl/i8086/mathu.inc

+ 8 - 3
rtl/i8086/mathu.inc

@@ -13,14 +13,19 @@
 **********************************************************************}
 
 {$ASMMODE intel}
-{$define FPC_MATH_HAS_ARCTAN2}
-function arctan2(y,x : float) : float;assembler;
+
+{NOTE: the fpatan instruction on the 8087 and 80287 has the following restrictions:
+            0 <= ST(1) < ST(0) < +inf
+       so the following code requires a 387+ and is therefore disabled, so that we use the
+       generic implementation, until an asm optimized version, compatible with 8087/80287 is written }
+{//$define FPC_MATH_HAS_ARCTAN2}
+{function arctan2(y,x : float) : float;assembler;
   asm
     fld tbyte [y]
     fld tbyte [x]
     fpatan
     fwait
-  end;
+  end;}
 
 
 {//$define FPC_MATH_HAS_SINCOS}