Browse Source

* some cleanup, typo fixes

git-svn-id: trunk@1723 -
tom_at_work 20 years ago
parent
commit
47258d61a6
3 changed files with 34 additions and 35 deletions
  1. 15 16
      rtl/linux/powerpc64/cprt0.as
  2. 1 1
      rtl/linux/powerpc64/syscallh.inc
  3. 18 18
      rtl/powerpc64/math.inc

+ 15 - 16
rtl/linux/powerpc64/cprt0.as

@@ -47,23 +47,23 @@ _start:
 main_stub:
     .quad .main_stub,.TOC.@tocbase,0
     .previous
-        .globl  .main_stub
-        .type   .main_stub,@function
+    .globl  .main_stub
+    .type   .main_stub,@function
 .main_stub:
-        mflr    0
-        std     0,16(1)
+    mflr    0
+    std     0,16(1)
     stdu    1,-128(1)
 
-        LOAD_64BIT_VAL 8, operatingsystem_parameter_argc
+    LOAD_64BIT_VAL 8, operatingsystem_parameter_argc
     stw     3,0(8)
 
-        LOAD_64BIT_VAL 8, operatingsystem_parameter_argv
+    LOAD_64BIT_VAL 8, operatingsystem_parameter_argv
     std     4,0(8)
 
-        LOAD_64BIT_VAL 8, operatingsystem_parameter_envp
+    LOAD_64BIT_VAL 8, operatingsystem_parameter_envp
     std     5,0(8)
 
-        LOAD_64BIT_VAL 8, ___fpc_ret
+    LOAD_64BIT_VAL 8, ___fpc_ret
     std 1,0(8)
 
     bl  .PASCALMAIN
@@ -77,15 +77,15 @@ _haltproc:
     .quad ._haltproc,.TOC.@tocbase,0
     .previous
     
-        .globl  ._haltproc
-        .type   ._haltproc,@function
+    .globl  ._haltproc
+    .type   ._haltproc,@function
 ._haltproc:
-        LOAD_64BIT_VAL 8, ___fpc_reg
+    LOAD_64BIT_VAL 8, ___fpc_ret
     ld  1,0(8)
-        addi    1,1,128
-        ld      0,16(1)
-        mtlr    0
-        blr
+    addi    1,1,128
+    ld      0,16(1)
+    mtlr    0
+    blr
 
 #        li      0,1          /* exit call */
 #        sc
@@ -100,7 +100,6 @@ data_start:
 ___fpc_ret:                             /* return address to libc */
         .quad   0
 
-
 .text
         .comm operatingsystem_parameter_argc,4
         .comm operatingsystem_parameter_argv,8

+ 1 - 1
rtl/linux/powerpc64/syscallh.inc

@@ -11,7 +11,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
-}
+
 
 type
   TSysResult = Int64;   // all platforms, cint=32-bit.

+ 18 - 18
rtl/powerpc64/math.inc

@@ -78,9 +78,9 @@ function fpc_int64_to_double(i: int64): double; compilerproc;assembler;
 {from "PowerPC Microprocessor Family: Programming Environments Manual for 64 and 32-Bit Microprocessors", v2.0, pg. 698 }
 var temp : int64;
 asm
-        std r3,temp // store dword
-        lfd f0,temp // load float
-        fcfid f0,f0     // convert to fpu int
+  std r3,temp // store dword
+  lfd f0,temp // load float
+  fcfid f0,f0     // convert to fpu int
 end;
 
 {$define FPC_SYSTEM_HAS_QWORD_TO_DOUBLE}
@@ -94,21 +94,21 @@ const
 var
   temp1, temp2: qword;
 asm
-    // load 2^32 into f4
-        lis   r4, longint_to_real_helper@highesta
-        ori   r4, r4, longint_to_real_helper@highera
-        sldi  r4, r4, 32
-        oris  r4, r4, longint_to_real_helper@ha
-        lfd   f4, longint_to_real_helper@l(r4)
+  // load 2^32 into f4
+  lis   r4, longint_to_real_helper@highesta
+  ori   r4, r4, longint_to_real_helper@highera
+  sldi  r4, r4, 32
+  oris  r4, r4, longint_to_real_helper@ha
+  lfd   f4, longint_to_real_helper@l(r4)
 
-        rldicl r4,r3,32,32  // isolate high half
-        rldicl r0,r3,0,32   // isolate low half
-        std r4,temp1        // store dword both
-        std r0,temp2
-        lfd f2,temp1        // load float both
-        lfd f0,temp2        // load float both
-        fcfid f2,f2         // convert each half to
-        fcfid f0,f0         // fpu int (no rnd)
-        fmadd f0,f4,f2,f0   // (2**32)*high+low (only add can rnd)
+  rldicl r4,r3,32,32  // isolate high half
+  rldicl r0,r3,0,32   // isolate low half
+  std r4,temp1        // store dword both
+  std r0,temp2
+  lfd f2,temp1        // load float both
+  lfd f0,temp2        // load float both
+  fcfid f2,f2         // convert each half to
+  fcfid f0,f0         // fpu int (no rnd)
+  fmadd f0,f4,f2,f0   // (2**32)*high+low (only add can rnd)
 end;