summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/sparc')
-rw-r--r--mdk-stage1/dietlibc/sparc/Makefile.add1
-rw-r--r--mdk-stage1/dietlibc/sparc/__longjmp.S1
-rw-r--r--mdk-stage1/dietlibc/sparc/clone.S5
-rw-r--r--mdk-stage1/dietlibc/sparc/fork.S2
-rw-r--r--mdk-stage1/dietlibc/sparc/mmap.c4
-rw-r--r--mdk-stage1/dietlibc/sparc/pipe.S2
-rw-r--r--mdk-stage1/dietlibc/sparc/setjmp.S28
-rw-r--r--mdk-stage1/dietlibc/sparc/shmat.c2
-rw-r--r--mdk-stage1/dietlibc/sparc/start.S58
-rw-r--r--mdk-stage1/dietlibc/sparc/udiv.S102
-rw-r--r--mdk-stage1/dietlibc/sparc/umul.S6
-rw-r--r--mdk-stage1/dietlibc/sparc/unified.S10
-rw-r--r--mdk-stage1/dietlibc/sparc/urem.S102
13 files changed, 167 insertions, 156 deletions
diff --git a/mdk-stage1/dietlibc/sparc/Makefile.add b/mdk-stage1/dietlibc/sparc/Makefile.add
index 0de05b1db..102175bc5 100644
--- a/mdk-stage1/dietlibc/sparc/Makefile.add
+++ b/mdk-stage1/dietlibc/sparc/Makefile.add
@@ -1,3 +1,4 @@
CFLAGS+=-mcpu=supersparc -Os
VPATH:=sparc:syscalls.s:$(VPATH)
+LIBOBJ+=$(OBJDIR)/udiv.o $(OBJDIR)/umul.o $(OBJDIR)/urem.o
diff --git a/mdk-stage1/dietlibc/sparc/__longjmp.S b/mdk-stage1/dietlibc/sparc/__longjmp.S
index 72e001a2f..6550d2b5c 100644
--- a/mdk-stage1/dietlibc/sparc/__longjmp.S
+++ b/mdk-stage1/dietlibc/sparc/__longjmp.S
@@ -10,6 +10,7 @@
.text
.global __longjmp
+.type __longjmp,function
__longjmp:
/* Store our arguments in global registers so we can still
use them while unwinding frames and their register windows. */
diff --git a/mdk-stage1/dietlibc/sparc/clone.S b/mdk-stage1/dietlibc/sparc/clone.S
index 58b438249..fd8d1d126 100644
--- a/mdk-stage1/dietlibc/sparc/clone.S
+++ b/mdk-stage1/dietlibc/sparc/clone.S
@@ -1,10 +1,11 @@
-#include <asm/errno.h>
-#include <asm/unistd.h>
+#include <errno.h>
+#include "syscalls.h"
.text
.align 4
.weak clone
clone:
+.type __clone,#function
.global __clone
__clone:
save %sp, -96, %sp
diff --git a/mdk-stage1/dietlibc/sparc/fork.S b/mdk-stage1/dietlibc/sparc/fork.S
index 869c9b30c..a54cab2a9 100644
--- a/mdk-stage1/dietlibc/sparc/fork.S
+++ b/mdk-stage1/dietlibc/sparc/fork.S
@@ -10,7 +10,7 @@ __libc_fork:
bcc,a 1f
nop
save %sp, -96, %sp
-#ifdef WANT_THREAD_SAVE
+#ifdef WANT_THREAD_SAFE
call __errno_location
nop
#else
diff --git a/mdk-stage1/dietlibc/sparc/mmap.c b/mdk-stage1/dietlibc/sparc/mmap.c
index 25ebdc24e..5342bac4e 100644
--- a/mdk-stage1/dietlibc/sparc/mmap.c
+++ b/mdk-stage1/dietlibc/sparc/mmap.c
@@ -1,5 +1,5 @@
-#include <linux/types.h>
-#include <linux/unistd.h>
+#include <sys/types.h>
+#include "syscalls.h"
#define __SYSCALL_STRING \
"ta 0x10;" \
diff --git a/mdk-stage1/dietlibc/sparc/pipe.S b/mdk-stage1/dietlibc/sparc/pipe.S
index 820da2570..076822765 100644
--- a/mdk-stage1/dietlibc/sparc/pipe.S
+++ b/mdk-stage1/dietlibc/sparc/pipe.S
@@ -9,7 +9,7 @@ pipe:
bcc,a 1f
nop
save %sp, -96, %sp
-#ifdef WANT_THREAD_SAVE
+#ifdef WANT_THREAD_SAFE
call __errno_location
nop
#else
diff --git a/mdk-stage1/dietlibc/sparc/setjmp.S b/mdk-stage1/dietlibc/sparc/setjmp.S
index efc5a7013..579df757c 100644
--- a/mdk-stage1/dietlibc/sparc/setjmp.S
+++ b/mdk-stage1/dietlibc/sparc/setjmp.S
@@ -6,32 +6,34 @@
#define ST_FLUSH_WINDOWS 0x03
-.section .rodata
.text
.globl __setjmp
+.type __setjmp,function
__setjmp:
- b 1f
- set 0, %o1
+ b 1f
+ set 0, %o1
.size __setjmp,.-__setjmp
.globl setjmp
+.type setjmp,function
setjmp:
- set 1, %o1
+ set 1, %o1
.size setjmp,.-setjmp
.globl __sigsetjmp
+.type __sigsetjmp,function
__sigsetjmp:
1:
- /* Save our PC, SP and FP. Save the signal mask if requested with
- a tail-call for simplicity; it always returns zero. */
- ta ST_FLUSH_WINDOWS
+ /* Save our PC, SP and FP. Save the signal mask if requested with
+ a tail-call for simplicity; it always returns zero. */
+ ta ST_FLUSH_WINDOWS
- st %o7, [%o0 + (JB_PC * 4)]
- st %sp, [%o0 + (JB_SP * 4)]
- st %fp, [%o0 + (JB_FP * 4)]
+ st %o7, [%o0 + (JB_PC * 4)]
+ st %sp, [%o0 + (JB_SP * 4)]
+ st %fp, [%o0 + (JB_FP * 4)]
- mov %o7, %g1
- call __sigjmp_save
- mov %g1, %o7
+ mov %o7, %g1
+ call __sigjmp_save
+ mov %g1, %o7
.size __sigsetjmp,.-__sigsetjmp
diff --git a/mdk-stage1/dietlibc/sparc/shmat.c b/mdk-stage1/dietlibc/sparc/shmat.c
index 73b2d89a9..b7dce2e83 100644
--- a/mdk-stage1/dietlibc/sparc/shmat.c
+++ b/mdk-stage1/dietlibc/sparc/shmat.c
@@ -1,7 +1,7 @@
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
-#include <asm/ipc.h>
+#include <unistd.h>
extern void* __ipc();
diff --git a/mdk-stage1/dietlibc/sparc/start.S b/mdk-stage1/dietlibc/sparc/start.S
index e948aaddc..c6408ee8f 100644
--- a/mdk-stage1/dietlibc/sparc/start.S
+++ b/mdk-stage1/dietlibc/sparc/start.S
@@ -1,46 +1,50 @@
-#include "start.h"
-
-#ifdef __sparc__
- .section ".text"
- .align 4
- .global _start
- .type _start,@function
+ .section ".text"
+ .align 4
+ .global _start
+ .type _start,@function
_start:
- /* Terminate the stack frame, and reserve space for functions to
- drop their arguments. */
- mov %g0, %fp
- sub %sp, 6*4, %sp
+/* Terminate the stack frame, and reserve space for functions to
+ drop their arguments. */
+ mov %g0, %fp
+ sub %sp, 6*4, %sp
- /* Extract the arguments and environment as encoded on the stack. The
- argument info starts after one register window (16 words) past the SP. */
- ld [%sp+22*4], %o0
- add %sp, 23*4, %o1
+/* Extract the arguments and environment as encoded on the stack. The
+ argument info starts after one register window (16 words) past the SP. */
+ ld [%sp+22*4], %o0
+ add %sp, 23*4, %o1
add %o1, %o0, %o2
add %o2, %o0, %o2
add %o2, %o0, %o2
add %o2, %o0, %o2
add %o2, 4, %o2
- sethi %hi(environ), %o3
- or %o3, %lo(environ), %o3
+ sethi %hi(environ), %o3
+ or %o3, %lo(environ), %o3
st %o2, [%o3]
- /* When starting a binary via the dynamic linker, %g1 contains the
- address of the shared library termination function, which will be
- registered with atexit(). If we are statically linked, this will
- be NULL. */
+/* When starting a binary via the dynamic linker, %g1 contains the
+ address of the shared library termination function, which will be
+ registered with atexit(). If we are statically linked, this will
+ be NULL. */
- /* Let libc do the rest of the initialization, and call main. */
+/* Let libc do the rest of the initialization, and call main. */
+#ifdef WANT_DYNAMIC
+ call dyn_start
+#else
call main
- mov %g1, %o5
+#endif
+ mov %g1, %o3
b exit
mov %o0, %i0
- /* Die very horribly if exit returns. */
- unimp
+/* Die very horribly if exit returns. */
- .size _start, .-_start
-#endif
+/* here we go and "reuse" the return for weak-void functions */
+#include "dietuglyweaks.h"
+ ret
+ nop
+
+ .size _start, .-_start
diff --git a/mdk-stage1/dietlibc/sparc/udiv.S b/mdk-stage1/dietlibc/sparc/udiv.S
index 87479e7bd..fe8d04969 100644
--- a/mdk-stage1/dietlibc/sparc/udiv.S
+++ b/mdk-stage1/dietlibc/sparc/udiv.S
@@ -48,8 +48,6 @@
C_LABEL(name);\
.type name,@function;
-#define LOC(name) . ## L ## name
-
#define END(name) \
.size name, . - name
@@ -70,11 +68,11 @@ ENTRY(.udiv)
1:
cmp %o3, %o5 ! if %o1 exceeds %o0, done
- blu LOC(got_result) ! (and algorithm fails otherwise)
+ blu .Lgot_result ! (and algorithm fails otherwise)
clr %o2
sethi %hi(1 << (32 - 4 - 1)), %g1
cmp %o3, %g1
- blu LOC(not_really_big)
+ blu .Lnot_really_big
clr %o4
! Here the dividend is >= 2**(31-N) or so. We must be careful here,
@@ -92,7 +90,7 @@ ENTRY(.udiv)
! Now compute %g2.
2: addcc %o5, %o5, %o5
- bcc LOC(not_too_big)
+ bcc .Lnot_too_big
add %g2, 1, %g2
! We get here if the %o1 overflowed while shifting.
@@ -101,14 +99,14 @@ ENTRY(.udiv)
sll %g1, 4, %g1 ! high order bit
srl %o5, 1, %o5 ! rest of %o5
add %o5, %g1, %o5
- b LOC(do_single_div)
+ b .Ldo_single_div
sub %g2, 1, %g2
- LOC(not_too_big):
+ .Lnot_too_big:
3: cmp %o5, %o3
blu 2b
nop
- be LOC(do_single_div)
+ be .Ldo_single_div
nop
/* NB: these are commented out in the V8-Sparc manual as well */
/* (I do not understand this) */
@@ -123,15 +121,15 @@ ENTRY(.udiv)
! order bit set in the first step, just falling into the regular
! division loop will mess up the first time around.
! So we unroll slightly...
- LOC(do_single_div):
+ .Ldo_single_div:
subcc %g2, 1, %g2
- bl LOC(end_regular_divide)
+ bl .Lend_regular_divide
nop
sub %o3, %o5, %o3
mov 1, %o2
- b LOC(end_single_divloop)
+ b .Lend_single_divloop
nop
- LOC(single_divloop):
+ .Lsingle_divloop:
sll %o2, 1, %o2
bl 1f
srl %o5, 1, %o5
@@ -143,66 +141,66 @@ ENTRY(.udiv)
add %o3, %o5, %o3
sub %o2, 1, %o2
2:
- LOC(end_single_divloop):
+ .Lend_single_divloop:
subcc %g2, 1, %g2
- bge LOC(single_divloop)
+ bge .Lsingle_divloop
tst %o3
- b,a LOC(end_regular_divide)
+ b,a .Lend_regular_divide
-LOC(not_really_big):
+.Lnot_really_big:
1:
sll %o5, 4, %o5
cmp %o5, %o3
bleu 1b
addcc %o4, 1, %o4
- be LOC(got_result)
+ be .Lgot_result
sub %o4, 1, %o4
tst %o3 ! set up for initial iteration
-LOC(divloop):
+.Ldivloop:
sll %o2, 4, %o2
! depth 1, accumulated bits 0
- bl LOC(1.16)
+ bl .L1.16
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 2, accumulated bits 1
- bl LOC(2.17)
+ bl .L2.17
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 3, accumulated bits 3
- bl LOC(3.19)
+ bl .L3.19
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits 7
- bl LOC(4.23)
+ bl .L4.23
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (7*2+1), %o2
-LOC(4.23):
+.L4.23:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (7*2-1), %o2
-LOC(3.19):
+.L3.19:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits 5
- bl LOC(4.21)
+ bl .L4.21
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (5*2+1), %o2
-LOC(4.21):
+.L4.21:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -210,41 +208,41 @@ LOC(4.21):
-LOC(2.17):
+.L2.17:
! remainder is negative
addcc %o3,%o5,%o3
! depth 3, accumulated bits 1
- bl LOC(3.17)
+ bl .L3.17
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits 3
- bl LOC(4.19)
+ bl .L4.19
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (3*2+1), %o2
-LOC(4.19):
+.L4.19:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (3*2-1), %o2
-LOC(3.17):
+.L3.17:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits 1
- bl LOC(4.17)
+ bl .L4.17
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (1*2+1), %o2
-LOC(4.17):
+.L4.17:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -253,46 +251,46 @@ LOC(4.17):
-LOC(1.16):
+.L1.16:
! remainder is negative
addcc %o3,%o5,%o3
! depth 2, accumulated bits -1
- bl LOC(2.15)
+ bl .L2.15
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 3, accumulated bits -1
- bl LOC(3.15)
+ bl .L3.15
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits -1
- bl LOC(4.15)
+ bl .L4.15
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-1*2+1), %o2
-LOC(4.15):
+.L4.15:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (-1*2-1), %o2
-LOC(3.15):
+.L3.15:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits -3
- bl LOC(4.13)
+ bl .L4.13
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-3*2+1), %o2
-LOC(4.13):
+.L4.13:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -300,41 +298,41 @@ LOC(4.13):
-LOC(2.15):
+.L2.15:
! remainder is negative
addcc %o3,%o5,%o3
! depth 3, accumulated bits -3
- bl LOC(3.13)
+ bl .L3.13
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits -5
- bl LOC(4.11)
+ bl .L4.11
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-5*2+1), %o2
-LOC(4.11):
+.L4.11:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (-5*2-1), %o2
-LOC(3.13):
+.L3.13:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits -7
- bl LOC(4.9)
+ bl .L4.9
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-7*2+1), %o2
-LOC(4.9):
+.L4.9:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -344,16 +342,16 @@ LOC(4.9):
9:
-LOC(end_regular_divide):
+.Lend_regular_divide:
subcc %o4, 1, %o4
- bge LOC(divloop)
+ bge .Ldivloop
tst %o3
- bl,a LOC(got_result)
+ bl,a .Lgot_result
! non-restoring fixup here (one instruction only!)
sub %o2, 1, %o2
-LOC(got_result):
+.Lgot_result:
retl
mov %o2, %o0
diff --git a/mdk-stage1/dietlibc/sparc/umul.S b/mdk-stage1/dietlibc/sparc/umul.S
index 15038ab2a..5d7d60f2b 100644
--- a/mdk-stage1/dietlibc/sparc/umul.S
+++ b/mdk-stage1/dietlibc/sparc/umul.S
@@ -25,8 +25,6 @@
C_LABEL(name);\
.type name,@function;
-#define LOC(name) . ## L ## name
-
#define END(name) \
.size name, . - name
@@ -34,7 +32,7 @@ ENTRY(.umul)
or %o0, %o1, %o4
mov %o0, %y ! multiplier -> Y
andncc %o4, 0xfff, %g0 ! test bits 12..31 of *both* args
- be LOC(mul_shortway) ! if zero, can do it the short way
+ be .Lmul_shortway ! if zero, can do it the short way
andcc %g0, %g0, %o4 ! zero the partial product; clear N & V
/*
@@ -124,7 +122,7 @@ ENTRY(.umul)
addcc %o4, %o2, %o1 ! add compensation and put upper half in place
#endif
-LOC(mul_shortway):
+.Lmul_shortway:
/*
* Short multiply. 12 steps, followed by a final shift step.
* The resulting bits are off by 12 and (32-12) = 20 bit positions,
diff --git a/mdk-stage1/dietlibc/sparc/unified.S b/mdk-stage1/dietlibc/sparc/unified.S
index 3cd609da5..873a522df 100644
--- a/mdk-stage1/dietlibc/sparc/unified.S
+++ b/mdk-stage1/dietlibc/sparc/unified.S
@@ -1,6 +1,14 @@
#include <dietfeatures.h>
+#include "syscalls.h"
.text
+.weak exit
+.type exit,function
+exit:
+.global _exit
+.type _exit,function
+_exit:
+ mov __NR_exit, %g1
.global __unified_syscall
__unified_syscall:
ta 0x10
@@ -14,7 +22,7 @@ __unified_syscall:
cmp %l2, 0xfe
bgu 2f
neg %i0, %l3
-#ifdef WANT_THREAD_SAVE
+#ifdef WANT_THREAD_SAFE
call __errno_location
nop
#else
diff --git a/mdk-stage1/dietlibc/sparc/urem.S b/mdk-stage1/dietlibc/sparc/urem.S
index 943cb7873..f7a9fd394 100644
--- a/mdk-stage1/dietlibc/sparc/urem.S
+++ b/mdk-stage1/dietlibc/sparc/urem.S
@@ -48,8 +48,6 @@
C_LABEL(name);\
.type name,@function;
-#define LOC(name) . ## L ## name
-
#define END(name) \
.size name, . - name
@@ -70,11 +68,11 @@ ENTRY(.urem)
1:
cmp %o3, %o5 ! if %o1 exceeds %o0, done
- blu LOC(got_result) ! (and algorithm fails otherwise)
+ blu .Lgot_result ! (and algorithm fails otherwise)
clr %o2
sethi %hi(1 << (32 - 4 - 1)), %g1
cmp %o3, %g1
- blu LOC(not_really_big)
+ blu .Lnot_really_big
clr %o4
! Here the dividend is >= 2**(31-N) or so. We must be careful here,
@@ -92,7 +90,7 @@ ENTRY(.urem)
! Now compute %g2.
2: addcc %o5, %o5, %o5
- bcc LOC(not_too_big)
+ bcc .Lnot_too_big
add %g2, 1, %g2
! We get here if the %o1 overflowed while shifting.
@@ -101,14 +99,14 @@ ENTRY(.urem)
sll %g1, 4, %g1 ! high order bit
srl %o5, 1, %o5 ! rest of %o5
add %o5, %g1, %o5
- b LOC(do_single_div)
+ b .Ldo_single_div
sub %g2, 1, %g2
- LOC(not_too_big):
+ .Lnot_too_big:
3: cmp %o5, %o3
blu 2b
nop
- be LOC(do_single_div)
+ be .Ldo_single_div
nop
/* NB: these are commented out in the V8-Sparc manual as well */
/* (I do not understand this) */
@@ -123,15 +121,15 @@ ENTRY(.urem)
! order bit set in the first step, just falling into the regular
! division loop will mess up the first time around.
! So we unroll slightly...
- LOC(do_single_div):
+ .Ldo_single_div:
subcc %g2, 1, %g2
- bl LOC(end_regular_divide)
+ bl .Lend_regular_divide
nop
sub %o3, %o5, %o3
mov 1, %o2
- b LOC(end_single_divloop)
+ b .Lend_single_divloop
nop
- LOC(single_divloop):
+ .Lsingle_divloop:
sll %o2, 1, %o2
bl 1f
srl %o5, 1, %o5
@@ -143,66 +141,66 @@ ENTRY(.urem)
add %o3, %o5, %o3
sub %o2, 1, %o2
2:
- LOC(end_single_divloop):
+ .Lend_single_divloop:
subcc %g2, 1, %g2
- bge LOC(single_divloop)
+ bge .Lsingle_divloop
tst %o3
- b,a LOC(end_regular_divide)
+ b,a .Lend_regular_divide
-LOC(not_really_big):
+.Lnot_really_big:
1:
sll %o5, 4, %o5
cmp %o5, %o3
bleu 1b
addcc %o4, 1, %o4
- be LOC(got_result)
+ be .Lgot_result
sub %o4, 1, %o4
tst %o3 ! set up for initial iteration
-LOC(divloop):
+.Ldivloop:
sll %o2, 4, %o2
! depth 1, accumulated bits 0
- bl LOC(1.16)
+ bl .L1.16
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 2, accumulated bits 1
- bl LOC(2.17)
+ bl .L2.17
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 3, accumulated bits 3
- bl LOC(3.19)
+ bl .L3.19
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits 7
- bl LOC(4.23)
+ bl .L4.23
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (7*2+1), %o2
-LOC(4.23):
+.L4.23:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (7*2-1), %o2
-LOC(3.19):
+.L3.19:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits 5
- bl LOC(4.21)
+ bl .L4.21
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (5*2+1), %o2
-LOC(4.21):
+.L4.21:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -210,41 +208,41 @@ LOC(4.21):
-LOC(2.17):
+.L2.17:
! remainder is negative
addcc %o3,%o5,%o3
! depth 3, accumulated bits 1
- bl LOC(3.17)
+ bl .L3.17
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits 3
- bl LOC(4.19)
+ bl .L4.19
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (3*2+1), %o2
-LOC(4.19):
+.L4.19:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (3*2-1), %o2
-LOC(3.17):
+.L3.17:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits 1
- bl LOC(4.17)
+ bl .L4.17
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (1*2+1), %o2
-LOC(4.17):
+.L4.17:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -253,46 +251,46 @@ LOC(4.17):
-LOC(1.16):
+.L1.16:
! remainder is negative
addcc %o3,%o5,%o3
! depth 2, accumulated bits -1
- bl LOC(2.15)
+ bl .L2.15
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 3, accumulated bits -1
- bl LOC(3.15)
+ bl .L3.15
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits -1
- bl LOC(4.15)
+ bl .L4.15
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-1*2+1), %o2
-LOC(4.15):
+.L4.15:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (-1*2-1), %o2
-LOC(3.15):
+.L3.15:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits -3
- bl LOC(4.13)
+ bl .L4.13
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-3*2+1), %o2
-LOC(4.13):
+.L4.13:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -300,41 +298,41 @@ LOC(4.13):
-LOC(2.15):
+.L2.15:
! remainder is negative
addcc %o3,%o5,%o3
! depth 3, accumulated bits -3
- bl LOC(3.13)
+ bl .L3.13
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
! depth 4, accumulated bits -5
- bl LOC(4.11)
+ bl .L4.11
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-5*2+1), %o2
-LOC(4.11):
+.L4.11:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
add %o2, (-5*2-1), %o2
-LOC(3.13):
+.L3.13:
! remainder is negative
addcc %o3,%o5,%o3
! depth 4, accumulated bits -7
- bl LOC(4.9)
+ bl .L4.9
srl %o5,1,%o5
! remainder is positive
subcc %o3,%o5,%o3
b 9f
add %o2, (-7*2+1), %o2
-LOC(4.9):
+.L4.9:
! remainder is negative
addcc %o3,%o5,%o3
b 9f
@@ -344,16 +342,16 @@ LOC(4.9):
9:
-LOC(end_regular_divide):
+.Lend_regular_divide:
subcc %o4, 1, %o4
- bge LOC(divloop)
+ bge .Ldivloop
tst %o3
- bl,a LOC(got_result)
+ bl,a .Lgot_result
! non-restoring fixup here (one instruction only!)
add %o3, %o1, %o3
-LOC(got_result):
+.Lgot_result:
retl
mov %o3, %o0