components/clisp/patches/arisparc64.d.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 328 38a06e74a699
permissions -rw-r--r--
Close of build 04.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
328
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
--- src.orig/arisparc64.d	Thu Dec  6 00:06:32 2007
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
+++ src/arisparc64.d	Mon Feb  2 15:35:22 2009
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
@@ -75,9 +75,9 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
 # extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
 # 2^32*hi+lo := arg1*arg2.
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
-C(mulu32_:) # Input in %o0,%o1, Output in %o0,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
+C(mulu32_:) # Input in %o0,%o1, Output in %o0,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
         umul %o0,%o1,%o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
-        rd %y,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
+        rd %y,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
         retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
        _ srl %o2,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
@@ -90,11 +90,11 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
 # extern struct { uint32 q; uint32 r; } divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
 # x = 2^32*xhi+xlo = q*y+r schreiben. Sei bekannt, dass 0 <= x < 2^32*y .
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
-C(divu_6432_3232_:) # Input in %o0,%o1,%o2, Output in %o0,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
+C(divu_6432_3232_:) # Input in %o0,%o1,%o2, Output in %o0,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
         wr %o0,%g0,%y
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
         udiv %o1,%o2,%o0        # x durch y dividieren, %o0 := q
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
-        umul %o0,%o2,%g1        # %g1 := (q*y) mod 2^32
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
-        sub %o1,%g1,%g1         # %g1 := (xlo-q*y) mod 2^32 = r
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
+        umul %o0,%o2,%g3        # %g3 := (q*y) mod 2^32
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
+        sub %o1,%g3,%g3         # %g3 := (xlo-q*y) mod 2^32 = r
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
         retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
        _ srl %o0,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
@@ -104,13 +104,13 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
         wr %g0,%g0,%y
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
         udiv %o0,%o1,%o2        # dividieren, Quotient nach %o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
 #if 0 # Who says that %y has some meaningful contents after `udiv' ??
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
-        rd %y,%g1               # Rest aus %y
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
+        rd %y,%g3               # Rest aus %y
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
 #else
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
-        umul %o2,%o1,%g1        # %g1 := (q*y) mod 2^32
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
-        sub %o0,%g1,%g1         # %g1 := (x-q*y) mod 2^32 = r
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
+        umul %o2,%o1,%g3        # %g3 := (q*y) mod 2^32
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
+        sub %o0,%g3,%g3         # %g3 := (x-q*y) mod 2^32 = r
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
-        sll %g1,16,%g1          # in die oberen 16 Bit schieben
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
-        or %o2,%g1,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
+        sll %g3,16,%g3          # in die oberen 16 Bit schieben
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
+        or %o2,%g3,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
         retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
        _ srl %o0,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
@@ -713,28 +713,28 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
 # extern uintD add_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
-C(add_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
+C(add_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
 #if STANDARD_LOOPS
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
 #       srl %o3,0,%o3           # zero-extend %o3 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
-       _ mov %g0,%g1            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
+       _ mov %g0,%g3            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
 1:        sub %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
           lduw [%o0],%o4        # source1-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
           sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
           lduw [%o1],%o5        # source2-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
-          add %g1,%o4,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
-          add %g1,%o5,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
-          st %g1,[%o2]          # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
+          add %g3,%o4,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
+          add %g3,%o5,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
+          st %g3,[%o2]          # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
-         _ srlx %g1,32,%g1      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
+         _ srlx %g3,32,%g3      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
-       _ mov %g1,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
+       _ mov %g3,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    78
 #if COUNTER_LOOPS
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
 #       srl %o3,0,%o3           # zero-extend %o3 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    80
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    81
-       _ mov %g0,%g1            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    82
+       _ mov %g0,%g3            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    83
         sub %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    84
         sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    85
         sllx %o3,2,%o3          # %o3 = 4*count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    86
@@ -743,14 +743,14 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    87
         sub %o2,%o3,%o2         # %o2 = &destptr[-count]
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
 1:        lduw [%o0+%o3],%o4    # source1-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    89
           lduw [%o1+%o3],%o5    # source2-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    90
-          add %g1,%o4,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    91
-          add %g1,%o5,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    92
-          st %g1,[%o2+%o3]      # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    93
+          add %g3,%o4,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    94
+          add %g3,%o5,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    95
+          st %g3,[%o2+%o3]      # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    96
           subcc %o3,4,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    97
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    98
-         _ srlx %g1,32,%g1      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    99
+         _ srlx %g3,32,%g3      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   100
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   101
-       _ mov %g1,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   102
+       _ mov %g3,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   103
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   104
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   105
 # extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   106
@@ -831,28 +831,28 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   107
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   108
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   109
 # extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   110
-C(sub_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   111
+C(sub_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   112
 #if STANDARD_LOOPS
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   113
 #       srl %o3,0,%o3           # zero-extend %o3 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   114
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   115
-       _ mov %g0,%g1            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   116
+       _ mov %g0,%g3            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   117
 1:        sub %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   118
           lduw [%o0],%o4        # source1-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   119
           sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   120
           lduw [%o1],%o5        # source2-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   121
-          add %g1,%o4,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   122
-          sub %g1,%o5,%g1       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   123
-          st %g1,[%o2]          # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   124
+          add %g3,%o4,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   125
+          sub %g3,%o5,%g3       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   126
+          st %g3,[%o2]          # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   127
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   128
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   129
-         _ srax %g1,32,%g1      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   130
+         _ srax %g3,32,%g3      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   131
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   132
-       _ srl %g1,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   133
+       _ srl %g3,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   134
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   135
 #if COUNTER_LOOPS
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   136
 #       srl %o3,0,%o3           # zero-extend %o3 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   137
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   138
-       _ mov %g0,%g1            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   139
+       _ mov %g0,%g3            # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   140
         sub %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   141
         sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   142
         sllx %o3,2,%o3          # %o3 = 4*count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   143
@@ -861,39 +861,39 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   144
         sub %o2,%o3,%o2         # %o2 = &destptr[-count]
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   145
 1:        lduw [%o0+%o3],%o4    # source1-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   146
           lduw [%o1+%o3],%o5    # source2-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   147
-          add %g1,%o4,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   148
-          sub %g1,%o5,%g1       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   149
-          st %g1,[%o2+%o3]      # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   150
+          add %g3,%o4,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   151
+          sub %g3,%o5,%g3       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   152
+          st %g3,[%o2+%o3]      # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   153
           subcc %o3,4,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   154
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   155
-         _ srax %g1,32,%g1      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   156
+         _ srax %g3,32,%g3      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   157
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   158
-       _ srl %g1,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   159
+       _ srl %g3,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   160
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   161
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   162
 # extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   163
-C(subx_loop_down:) # Input in %o0,%o1,%o2,%o3,%o4, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   164
+C(subx_loop_down:) # Input in %o0,%o1,%o2,%o3,%o4, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   165
 #if STANDARD_LOOPS
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   166
 #       srl %o3,0,%o3           # zero-extend %o3 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   167
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   168
-       _ sra %o4,0,%g1          # Carry, sign-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   169
+       _ sra %o4,0,%g3          # Carry, sign-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   170
 1:        sub %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   171
           lduw [%o0],%o4        # source1-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   172
           sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   173
           lduw [%o1],%o5        # source2-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   174
-          add %g1,%o4,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   175
-          sub %g1,%o5,%g1       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   176
-          st %g1,[%o2]          # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   177
+          add %g3,%o4,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   178
+          sub %g3,%o5,%g3       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   179
+          st %g3,[%o2]          # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   180
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   181
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   182
-         _ srax %g1,32,%g1      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   183
+         _ srax %g3,32,%g3      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   184
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   185
-       _ srl %g1,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   186
+       _ srl %g3,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   187
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   188
 #if COUNTER_LOOPS
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   189
 #       srl %o3,0,%o3           # zero-extend %o3 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   190
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   191
-       _ sra %o4,0,%g1          # Carry, sign-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   192
+       _ sra %o4,0,%g3          # Carry, sign-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   193
         sub %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   194
         sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   195
         sllx %o3,2,%o3          # %o3 = 4*count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   196
@@ -902,14 +902,14 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   197
         sub %o2,%o3,%o2         # %o2 = &destptr[-count]
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   198
 1:        lduw [%o0+%o3],%o4    # source1-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   199
           lduw [%o1+%o3],%o5    # source2-digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   200
-          add %g1,%o4,%g1       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   201
-          sub %g1,%o5,%g1       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   202
-          st %g1,[%o2+%o3]      # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   203
+          add %g3,%o4,%g3       # zum Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   204
+          sub %g3,%o5,%g3       # vom Carry subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   205
+          st %g3,[%o2+%o3]      # Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   206
           subcc %o3,4,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   207
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   208
-         _ srax %g1,32,%g1      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   209
+         _ srax %g3,32,%g3      # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   210
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   211
-       _ srl %g1,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   212
+       _ srl %g3,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   213
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   214
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   215
 # extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   216
@@ -1135,16 +1135,16 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   217
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   218
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   219
 # extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   220
-C(shiftright_loop_up:) # Input in %o0,%o1,%o2, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   221
+C(shiftright_loop_up:) # Input in %o0,%o1,%o2, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   222
 #ifdef SLOWER
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   223
 #       srl %o1,0,%o1           # zero-extend %o1 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   224
         brz,pn %o1,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   225
        _ or %g0,%g0,%o3         # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   226
-        mov 32,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   227
-        sub %g1,%o2,%g1         # 32-i
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   228
+        mov 32,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   229
+        sub %g3,%o2,%g3         # 32-i
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   230
 1:        lduw [%o0],%o4        # Digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   231
           subcc %o1,1,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   232
-          sllx %o4,%g1,%o4      # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   233
+          sllx %o4,%g3,%o4      # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   234
           or %o3,%o4,%o3        # und mit altem Carry kombinieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   235
           srlx %o3,32,%o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   236
           st %o4,[%o0]          # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   237
@@ -1157,13 +1157,13 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   238
 #       srl %o1,0,%o1           # zero-extend %o1 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   239
         brz,pn %o1,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   240
        _ or %g0,%g0,%o3         # Carry := 0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   241
-        sub %g0,%o2,%g1         # 32-i (mod 32)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   242
+        sub %g0,%o2,%g3         # 32-i (mod 32)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   243
 1:        ld [%o0],%o4          # Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   244
           subcc %o1,1,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   245
           srl %o4,%o2,%o5       # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   246
           or %o3,%o5,%o5        # und mit altem Carry kombinieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   247
           st %o5,[%o0]          # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   248
-          sll %o4,%g1,%o3       # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   249
+          sll %o4,%g3,%o3       # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   250
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   251
          _ add %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   252
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   253
@@ -1171,14 +1171,14 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   254
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   255
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   256
 # extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   257
-C(shiftrightsigned_loop_up:) # Input in %o0,%o1,%o2, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   258
+C(shiftrightsigned_loop_up:) # Input in %o0,%o1,%o2, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   259
 #ifdef SLOWER
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   260
 #       srl %o1,0,%o1           # zero-extend %o1 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   261
-        mov 32,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   262
-        sub %g1,%o2,%g1         # 32-i
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   263
+        mov 32,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   264
+        sub %g3,%o2,%g3         # 32-i
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   265
         ldsw [%o0],%o3          # erstes Digit, sign-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   266
         subcc %o1,1,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   267
-        sllx %o3,%g1,%o3        # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   268
+        sllx %o3,%g3,%o3        # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   269
         srlx %o3,32,%o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   270
         st %o4,[%o0]            # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   271
         sllx %o3,32,%o3         # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   272
@@ -1186,7 +1186,7 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   273
        _ add %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   274
 1:        lduw [%o0],%o4        # Digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   275
           subcc %o1,1,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   276
-          sllx %o4,%g1,%o4      # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   277
+          sllx %o4,%g3,%o4      # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   278
           or %o3,%o4,%o3        # und mit altem Carry kombinieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   279
           srlx %o3,32,%o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   280
           st %o4,[%o0]          # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   281
@@ -1198,10 +1198,10 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   282
 #else
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   283
 #       srl %o1,0,%o1           # zero-extend %o1 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   284
         ld [%o0],%o4            # erstes Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   285
-        sub %g0,%o2,%g1         # 32-i (mod 32)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   286
+        sub %g0,%o2,%g3         # 32-i (mod 32)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   287
         sra %o4,%o2,%o5         # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   288
         st %o5,[%o0]            # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   289
-        sll %o4,%g1,%o3         # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   290
+        sll %o4,%g3,%o3         # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   291
         subcc %o1,1,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   292
         be,pn %xcc,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   293
        _ add %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   294
@@ -1210,7 +1210,7 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   295
           srl %o4,%o2,%o5       # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   296
           or %o3,%o5,%o5        # und mit altem Carry kombinieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   297
           st %o5,[%o0]          # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   298
-          sll %o4,%g1,%o3       # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   299
+          sll %o4,%g3,%o3       # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   300
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   301
          _ add %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   302
 2:      retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   303
@@ -1218,16 +1218,16 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   304
 #endif
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   305
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   306
 # extern uintD shiftrightcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   307
-C(shiftrightcopy_loop_up:) # Input in %o0,%o1,%o2,%o3,%o4, verändert %g1,%g2, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   308
+C(shiftrightcopy_loop_up:) # Input in %o0,%o1,%o2,%o3,%o4, verändert %g3,%g2, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   309
 #ifdef SLOWER
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   310
 #       srl %o2,0,%o2           # zero-extend %o2 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   311
-        sub %g0,%o3,%g1         # 64-i (mod 64)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   312
+        sub %g0,%o3,%g3         # 64-i (mod 64)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   313
         brz,pn %o2,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   314
-       _ sllx %o4,%g1,%o4       # erster Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   315
-        add %g1,32,%g1          # 32-i
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   316
+       _ sllx %o4,%g3,%o4       # erster Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   317
+        add %g3,32,%g3          # 32-i
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   318
 1:        lduw [%o0],%o5        # Digit, zero-extend
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   319
           add %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   320
-          sllx %o5,%g1,%o5      # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   321
+          sllx %o5,%g3,%o5      # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   322
           or %o4,%o5,%o4        # und mit altem Carry kombinieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   323
           srlx %o4,32,%o5
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   324
           st %o5,[%o1]          # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   325
@@ -1239,15 +1239,15 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   326
        _ srlx %o4,32,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   327
 #else
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   328
 #       srl %o2,0,%o2           # zero-extend %o2 = count
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   329
-        sub %g0,%o3,%g1         # 32-i (mod 32)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   330
+        sub %g0,%o3,%g3         # 32-i (mod 32)
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   331
         brz,pn %o2,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   332
-       _ sll %o4,%g1,%g2        # erster Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   333
+       _ sll %o4,%g3,%g2        # erster Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   334
 1:        ld [%o0],%o4          # Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   335
           add %o0,4,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   336
           srl %o4,%o3,%o5       # shiften
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   337
           or %g2,%o5,%o5        # und mit altem Carry kombinieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   338
           st %o5,[%o1]          # und ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   339
-          sll %o4,%g1,%g2       # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   340
+          sll %o4,%g3,%g2       # neuer Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   341
           subcc %o2,1,%o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   342
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   343
          _ add %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   344
@@ -1290,58 +1290,58 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   345
        _ srl %o3,0,%o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   346
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   347
 # extern void mulu_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   348
-C(mulu_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   349
+C(mulu_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   350
 #       srl %o3,0,%o3           # zero-extend %o3 = len
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   351
         mov 0,%o4               # Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   352
 1:        sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   353
-          ld [%o1],%g1          # nächstes Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   354
+          ld [%o1],%g3          # nächstes Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   355
           sub %o2,4,%o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   356
-          # mit digit multiplizieren: %o0 * %g1 -> %o5|%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   357
-          umul %g1,%o0,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   358
+          # mit digit multiplizieren: %o0 * %g3 -> %o5|%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   359
+          umul %g3,%o0,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   360
           rd %y,%o5
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   361
-          addcc %o4,%g1,%g1     # und bisherigen Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   362
+          addcc %o4,%g3,%g3     # und bisherigen Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   363
           addx %g0,%o5,%o4      # High-Digit gibt neuen Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   364
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   365
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   366
-         _ st %g1,[%o2]         # Low-Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   367
+         _ st %g3,[%o2]         # Low-Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   368
         retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   369
        _ st %o4,[%o2-4]         # letzten Carry ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   370
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   371
 # extern uintD muluadd_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   372
-C(muluadd_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g1,%g2, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   373
+C(muluadd_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g3,%g2, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   374
 #       srl %o3,0,%o3           # zero-extend %o3 = len
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   375
         mov 0,%o4               # Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   376
 1:        sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   377
           ld [%o1],%o5          # nächstes source-Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   378
           sub %o2,4,%o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   379
-          # mit digit multiplizieren: %o0 * %o5 -> %g2|%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   380
-          umul %o0,%o5,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   381
+          # mit digit multiplizieren: %o0 * %o5 -> %g2|%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   382
+          umul %o0,%o5,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   383
           rd %y,%g2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   384
           ld [%o2],%o5          # nächstes dest-digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   385
-          addcc %o4,%g1,%g1     # und bisherigen Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   386
+          addcc %o4,%g3,%g3     # und bisherigen Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   387
           addx %g0,%g2,%o4      # High-Digit gibt neuen Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   388
-          addcc %o5,%g1,%g1     # addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   389
+          addcc %o5,%g3,%g3     # addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   390
           addx %g0,%o4,%o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   391
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   392
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   393
-         _ st %g1,[%o2]         # Low-Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   394
+         _ st %g3,[%o2]         # Low-Digit ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   395
         retl
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   396
        _ srl %o4,0,%o0          # letzter Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   397
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   398
 # extern uintD mulusub_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   399
-C(mulusub_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g1,%g2, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   400
+C(mulusub_loop_down:) # Input in %o0,%o1,%o2,%o3, verändert %g3,%g2, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   401
 #       srl %o3,0,%o3           # zero-extend %o3 = len
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   402
         mov 0,%o4               # Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   403
 1:        sub %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   404
           ld [%o1],%o5          # nächstes source-Digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   405
           sub %o2,4,%o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   406
-          # mit digit multiplizieren: %o0 * %o5 -> %g2|%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   407
-          umul %o0,%o5,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   408
+          # mit digit multiplizieren: %o0 * %o5 -> %g2|%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   409
+          umul %o0,%o5,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   410
           rd %y,%g2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   411
           ld [%o2],%o5          # nächstes dest-digit
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   412
-          addcc %o4,%g1,%g1     # und bisherigen Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   413
+          addcc %o4,%g3,%g3     # und bisherigen Carry addieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   414
           addx %g0,%g2,%o4      # High-Digit gibt neuen Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   415
-          subcc %o5,%g1,%o5     # davon das Low-Digit subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   416
+          subcc %o5,%g3,%o5     # davon das Low-Digit subtrahieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   417
           addx %g0,%o4,%o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   418
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   419
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   420
@@ -1350,7 +1350,7 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   421
        _ srl %o4,0,%o0          # letzter Carry
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   422
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   423
 # extern uintD divu_loop_up (uintD digit, uintD* ptr, uintC len);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   424
-C(divu_loop_up:) # Input in %o0,%o1,%o2, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   425
+C(divu_loop_up:) # Input in %o0,%o1,%o2, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   426
 #       srl %o2,0,%o2           # zero-extend %o2 = len
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   427
         brz,pn %o2,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   428
        _ mov 0,%o3              # Rest
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   429
@@ -1360,8 +1360,8 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   430
           or %o3,%o4,%o3        # zusammen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   431
           udivx %o3,%o0,%o4     # durch digit dividieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   432
           st %o4,[%o1]          # Quotient ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   433
-          umul %o0,%o4,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   434
-          sub %o3,%g1,%o3       # Rest in den unteren 32 Bit von %o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   435
+          umul %o0,%o4,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   436
+          sub %o3,%g3,%o3       # Rest in den unteren 32 Bit von %o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   437
           subcc %o2,1,%o2
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   438
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   439
          _ add %o1,4,%o1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   440
@@ -1369,7 +1369,7 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   441
        _ srl %o3,0,%o0          # Rest als Ergebnis
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   442
 
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   443
 # extern uintD divucopy_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len);
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   444
-C(divucopy_loop_up:) # Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   445
+C(divucopy_loop_up:) # Input in %o0,%o1,%o2,%o3, verändert %g3, Output in %o0
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   446
 #       srl %o3,0,%o3           # zero-extend %o3 = len
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   447
         brz,pn %o3,2f
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   448
        _ mov 0,%o4              # Rest
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   449
@@ -1380,8 +1380,8 @@
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   450
           or %o4,%o5,%o4        # zusammen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   451
           udivx %o4,%o0,%o5     # durch digit dividieren
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   452
           st %o5,[%o2]          # Quotient ablegen
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   453
-          umul %o0,%o5,%g1
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   454
-          sub %o4,%g1,%o4       # Rest in den unteren 32 Bit von %o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   455
+          umul %o0,%o5,%g3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   456
+          sub %o4,%g3,%o4       # Rest in den unteren 32 Bit von %o4
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   457
           subcc %o3,1,%o3
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   458
           bne,pt %xcc,1b
38a06e74a699 7054634 Move clisp to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   459
          _ add %o2,4,%o2