浏览代码

Add missing CPULLVM versions for fpc_abs_real and fpc_sqr_real in x86_64/math.inc

git-svn-id: trunk@47550 -
pierre 4 年之前
父节点
当前提交
e35e5ad349
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      rtl/x86_64/math.inc

+ 15 - 0
rtl/x86_64/math.inc

@@ -104,19 +104,34 @@ const
     {$ifndef FPC_SYSTEM_HAS_ABS}
     {$define FPC_SYSTEM_HAS_ABS}
     function fpc_abs_real(d : ValReal) : ValReal;compilerproc;
+{$ifndef cpullvm}
     begin
       { Function is handled internal in the compiler }
       runerror(207);
       result:=0;
+{$else not cpullvm}
+    assembler;
+    asm
+      fldt d
+      fabs
+{$endif not cpullvm}
     end;
     {$endif FPC_SYSTEM_HAS_ABS}
     {$ifndef FPC_SYSTEM_HAS_SQR}
     {$define FPC_SYSTEM_HAS_SQR}
     function fpc_sqr_real(d : ValReal) : ValReal;compilerproc;
+{$ifndef cpullvm}
     begin
       { Function is handled internal in the compiler }
       runerror(207);
       result:=0;
+{$else not cpullvm}
+    assembler;
+    asm
+      fldt d
+      fldt %st(0)
+      fmult
+{$endif not cpullvm}
     end;
     {$endif FPC_SYSTEM_HAS_SQR}
     {$ifndef FPC_SYSTEM_HAS_SQRT}