Browse Source

* darwin/ppc64 compilation fixes

git-svn-id: branches/fpc_2_3@6418 -
Jonas Maebe 18 years ago
parent
commit
ee2df94d05
1 changed files with 7 additions and 0 deletions
  1. 7 0
      rtl/powerpc64/math.inc

+ 7 - 0
rtl/powerpc64/math.inc

@@ -52,6 +52,8 @@ asm
   ld r3, -8(r1)
   ld r3, -8(r1)
 end;
 end;
 
 
+{$ifndef FPC_SYSTEM_HAS_ROUND}
+
 {$define FPC_SYSTEM_HAS_ROUND}
 {$define FPC_SYSTEM_HAS_ROUND}
 function fpc_round_real(d : valreal) : int64; compilerproc;assembler; nostackframe;
 function fpc_round_real(d : valreal) : int64; compilerproc;assembler; nostackframe;
 { exactly the same as trunc, except that one fctiwz has become fctiw }
 { exactly the same as trunc, except that one fctiwz has become fctiw }
@@ -62,6 +64,7 @@ asm
   stfd  f1, -8(r1)
   stfd  f1, -8(r1)
   ld r3, -8(r1)
   ld r3, -8(r1)
 end;
 end;
+{$endif not FPC_SYSTEM_HAS_ROUND}
 
 
 {****************************************************************************
 {****************************************************************************
                          Int to real helpers
                          Int to real helpers
@@ -90,11 +93,15 @@ const
 var
 var
   temp1, temp2: qword;
   temp1, temp2: qword;
 asm
 asm
+{$ifndef darwin}
   // load 2^32 into f4
   // load 2^32 into f4
   lis   r4, longint_to_real_helper@highesta
   lis   r4, longint_to_real_helper@highesta
   ori   r4, r4, longint_to_real_helper@highera
   ori   r4, r4, longint_to_real_helper@highera
   sldi  r4, r4, 32
   sldi  r4, r4, 32
   oris  r4, r4, longint_to_real_helper@ha
   oris  r4, r4, longint_to_real_helper@ha
+{$else darwin}
+  lis   r4, longint_to_real_helper@ha
+{$endif darwin}
   lfd   f4, longint_to_real_helper@l(r4)
   lfd   f4, longint_to_real_helper@l(r4)
 
 
   rldicl r4,r3,32,32  // isolate high half
   rldicl r4,r3,32,32  // isolate high half