Browse Source

Fix compilation error with -dFPC_USE_LIBC for loongarch64 cpu

Pierre Muller 2 years ago
parent
commit
513c8983e0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      rtl/loongarch64/math.inc

+ 5 - 0
rtl/loongarch64/math.inc

@@ -14,6 +14,7 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
+    {$ifndef FPC_SYSTEM_HAS_INT}
     {$define FPC_SYSTEM_HAS_INT}
     {$define FPC_SYSTEM_HAS_INT}
     function fpc_int_real(d : ValReal) : ValReal;assembler;nostackframe;compilerproc;
     function fpc_int_real(d : ValReal) : ValReal;assembler;nostackframe;compilerproc;
       asm
       asm
@@ -23,7 +24,9 @@
         frint.d $fa0, $fa0
         frint.d $fa0, $fa0
         movgr2fcsr $r3, $t0
         movgr2fcsr $r3, $t0
       end;
       end;
+    {$endif ndef FPC_SYSTEM_HAS_INT}
 
 
+    {$ifndef FPC_SYSTEM_HAS_FRAC}
     {$define FPC_SYSTEM_HAS_FRAC}
     {$define FPC_SYSTEM_HAS_FRAC}
     function fpc_frac_real(d : ValReal) : ValReal;assembler;nostackframe;compilerproc;
     function fpc_frac_real(d : ValReal) : ValReal;assembler;nostackframe;compilerproc;
       asm
       asm
@@ -44,3 +47,5 @@
         fdiv.d $fa0, $fa0, $fa1
         fdiv.d $fa0, $fa0, $fa1
         // jr $ra
         // jr $ra
       end;
       end;
+    {$endif ndef FPC_SYSTEM_HAS_FRAC}
+