Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/powerpc Convert to use register prefixes. (0 ...
details: https://anonhg.NetBSD.org/src/rev/7b9d3b5e6077
branches: trunk
changeset: 534589:7b9d3b5e6077
user: matt <matt%NetBSD.org@localhost>
date: Tue Jul 30 06:07:56 2002 +0000
description:
Convert to use register prefixes. (0 -> %r0, etc.)
diffstat:
lib/libc/arch/powerpc/SYS.h | 6 +-
lib/libc/arch/powerpc/gen/__setjmp14.S | 50 ++--
lib/libc/arch/powerpc/gen/__sigsetjmp14.S | 54 ++--
lib/libc/arch/powerpc/gen/_setjmp.S | 36 +-
lib/libc/arch/powerpc/gen/setjmp.S | 48 ++--
lib/libc/arch/powerpc/gen/sigsetjmp.S | 52 ++--
lib/libc/arch/powerpc/string/bzero.S | 278 +++++++++++++++---------------
lib/libc/arch/powerpc/string/ffs.S | 12 +-
lib/libc/arch/powerpc/string/strlen.S | 50 ++--
lib/libc/arch/powerpc/sys/Ovfork.S | 6 +-
lib/libc/arch/powerpc/sys/__clone.S | 20 +-
lib/libc/arch/powerpc/sys/__sigtramp1.S | 6 +-
lib/libc/arch/powerpc/sys/__vfork14.S | 6 +-
lib/libc/arch/powerpc/sys/brk.S | 30 +-
lib/libc/arch/powerpc/sys/cerror.S | 40 ++--
lib/libc/arch/powerpc/sys/fork.S | 6 +-
lib/libc/arch/powerpc/sys/pipe.S | 12 +-
lib/libc/arch/powerpc/sys/ptrace.S | 52 ++--
lib/libc/arch/powerpc/sys/sbrk.S | 28 +-
lib/libc/arch/powerpc/sys/setlogin.S | 20 +-
lib/libc/arch/powerpc/sys/sigpending.S | 10 +-
lib/libc/arch/powerpc/sys/sigprocmask.S | 20 +-
lib/libc/arch/powerpc/sys/sigsuspend.S | 6 +-
23 files changed, 424 insertions(+), 424 deletions(-)
diffs (truncated from 1440 to 300 lines):
diff -r 257b4b1d6440 -r 7b9d3b5e6077 lib/libc/arch/powerpc/SYS.h
--- a/lib/libc/arch/powerpc/SYS.h Tue Jul 30 05:58:42 2002 +0000
+++ b/lib/libc/arch/powerpc/SYS.h Tue Jul 30 06:07:56 2002 +0000
@@ -1,13 +1,13 @@
-/* $NetBSD: SYS.h,v 1.10 2002/05/26 12:24:57 wiz Exp $ */
+/* $NetBSD: SYS.h,v 1.11 2002/07/30 06:07:56 matt Exp $ */
#include <machine/asm.h>
#include <sys/syscall.h>
#ifdef __STDC__
-#define _DOSYSCALL(x) li 0,(SYS_ ## x) ;\
+#define _DOSYSCALL(x) li %r0,(SYS_ ## x) ;\
sc
#else
-#define _DOSYSCALL(x) li 0,(SYS_/**/x) ;\
+#define _DOSYSCALL(x) li %r0,(SYS_/**/x) ;\
sc
#endif /* __STDC__ */
diff -r 257b4b1d6440 -r 7b9d3b5e6077 lib/libc/arch/powerpc/gen/__setjmp14.S
--- a/lib/libc/arch/powerpc/gen/__setjmp14.S Tue Jul 30 05:58:42 2002 +0000
+++ b/lib/libc/arch/powerpc/gen/__setjmp14.S Tue Jul 30 06:07:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __setjmp14.S,v 1.1 1998/10/03 12:30:38 tsubai Exp $ */
+/* $NetBSD: __setjmp14.S,v 1.2 2002/07/30 06:07:57 matt Exp $ */
#include <sys/syscall.h>
@@ -6,7 +6,7 @@
#if defined(LIBC_SCCS)
.text
- .asciz "$NetBSD: __setjmp14.S,v 1.1 1998/10/03 12:30:38 tsubai Exp $"
+ .asciz "$NetBSD: __setjmp14.S,v 1.2 2002/07/30 06:07:57 matt Exp $"
#endif
/*
@@ -20,33 +20,33 @@
*/
ENTRY(__setjmp14)
- mr 6,3
- li 3,1 # SIG_BLOCK
- li 4,0
- addi 5,6,100 # &sigmask
- li 0,SYS___sigprocmask14
+ mr %r6,%r3
+ li %r3,1 # SIG_BLOCK
+ li %r4,0
+ addi %r5,%r6,100 # &sigmask
+ li %r0,SYS___sigprocmask14
sc # assume no error XXX
- mflr 11
- mfcr 12
- mr 10,1
- mr 9,2
- stmw 8,4(6) # save r8-r31
- li 3,0
+ mflr %r11
+ mfcr %r12
+ mr %r10,%r1
+ mr %r9,%r2
+ stmw %r8,4(%r6) # save r8-r31
+ li %r3,0
blr
ENTRY(__longjmp14)
- lmw 8,4(3) # load r8-r31
- mr 6,4
- mtlr 11
- mtcr 12
- mr 2,9
- mr 1,10
- addi 4,3,100 # &sigmask
- li 3,3 # SIG_SETMASK
- li 5,0
- li 0,SYS___sigprocmask14
+ lmw %r8,4(%r3) # load r8-r31
+ mr %r6,%r4
+ mtlr %r11
+ mtcr %r12
+ mr %r2,%r9
+ mr %r1,%r10
+ addi %r4,%r3,100 # &sigmask
+ li %r3,3 # SIG_SETMASK
+ li %r5,0
+ li %r0,SYS___sigprocmask14
sc # assume no error XXX
- or. 3,6,6
+ or. %r3,%r6,%r6
bnelr
- li 3,1
+ li %r3,1
blr
diff -r 257b4b1d6440 -r 7b9d3b5e6077 lib/libc/arch/powerpc/gen/__sigsetjmp14.S
--- a/lib/libc/arch/powerpc/gen/__sigsetjmp14.S Tue Jul 30 05:58:42 2002 +0000
+++ b/lib/libc/arch/powerpc/gen/__sigsetjmp14.S Tue Jul 30 06:07:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __sigsetjmp14.S,v 1.1 1998/10/03 12:30:38 tsubai Exp $ */
+/* $NetBSD: __sigsetjmp14.S,v 1.2 2002/07/30 06:07:57 matt Exp $ */
#include <sys/syscall.h>
@@ -6,43 +6,43 @@
#if defined(LIBC_SCCS)
.text
- .asciz "$NetBSD: __sigsetjmp14.S,v 1.1 1998/10/03 12:30:38 tsubai Exp $"
+ .asciz "$NetBSD: __sigsetjmp14.S,v 1.2 2002/07/30 06:07:57 matt Exp $"
#endif
ENTRY(__sigsetjmp14)
- mr 6,3
- or. 7,4,4
+ mr %r6,%r3
+ or. %r7,%r4,%r4
beq 1f
- li 3,1 # SIG_BLOCK
- li 4,0
- addi 5,6,100 # &sigmask
- li 0,SYS___sigprocmask14
+ li %r3,1 # SIG_BLOCK
+ li %r4,0
+ addi %r5,%r6,100 # &sigmask
+ li %r0,SYS___sigprocmask14
sc # assume no error XXX
1:
- mflr 11
- mfcr 12
- mr 10,1
- mr 9,2
- stmw 7,0(6) # save r7-r31
- li 3,0
+ mflr %r11
+ mfcr %r12
+ mr %r10,%r1
+ mr %r9,%r2
+ stmw %r7,0(%r6) # save r7-r31
+ li %r3,0
blr
ENTRY(__siglongjmp14)
- lmw 7,0(3) # load r7-r31
- mr 6,4
- mtlr 11
- mtcr 12
- mr 2,9
- mr 1,10
- or. 7,7,7
+ lmw %r7,0(%r3) # load r7-r31
+ mr %r6,%r4
+ mtlr %r11
+ mtcr %r12
+ mr %r2,%r9
+ mr %r1,%r10
+ or. %r7,%r7,%r7
beq 1f
- addi 4,3,100 # &sigmask
- li 3,3 # SIG_SETMASK
- li 5,0
- li 0,SYS___sigprocmask14
+ addi %r4,%r3,100 # &sigmask
+ li %r3,3 # SIG_SETMASK
+ li %r5,0
+ li %r0,SYS___sigprocmask14
sc # assume no error XXX
1:
- or. 3,6,6
+ or. %r3,%r6,%r6
bnelr
- li 3,1
+ li %r3,1
blr
diff -r 257b4b1d6440 -r 7b9d3b5e6077 lib/libc/arch/powerpc/gen/_setjmp.S
--- a/lib/libc/arch/powerpc/gen/_setjmp.S Tue Jul 30 05:58:42 2002 +0000
+++ b/lib/libc/arch/powerpc/gen/_setjmp.S Tue Jul 30 06:07:56 2002 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $ */
+/* $NetBSD: _setjmp.S,v 1.2 2002/07/30 06:07:57 matt Exp $ */
#include <machine/asm.h>
#if defined(LIBC_SCCS)
.text
- .asciz "$NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $"
+ .asciz "$NetBSD: _setjmp.S,v 1.2 2002/07/30 06:07:57 matt Exp $"
#endif
/*
@@ -18,21 +18,21 @@
*/
ENTRY(_setjmp)
- mflr 11
- mfcr 12
- mr 10,1
- mr 9,2
- stmw 9,8(3)
- li 3,0
- blr
+ mflr %r11 /* save return address */
+ mfcr %r12 /* save condition register */
+ mr %r10,%r1 /* save stack pointer */
+ mr %r9,%r2 /* save GPR2 (not needed) */
+ stmw %r9,8(%r3) /* save r9..r31 */
+ li %r3,0 /* indicate success */
+ blr /* return */
ENTRY(_longjmp)
- lmw 9,8(3)
- mtlr 11
- mtcr 12
- mr 2,9
- mr 1,10
- or. 3,4,4
- bnelr
- li 3,1
- blr
+ lmw %r9,8(%r3) /* save r9..r31 */
+ mtlr %r11 /* restore LR */
+ mtcr %r12 /* restore CR */
+ mr %r2,%r9 /* restore GPR2 (not needed) */
+ mr %r1,%r10 /* restore stack */
+ or. %r3,%r4,%r4 /* get return value */
+ bnelr /* return if not 0 */
+ li %r3,1 /* what's the point? */
+ blr /* return */
diff -r 257b4b1d6440 -r 7b9d3b5e6077 lib/libc/arch/powerpc/gen/setjmp.S
--- a/lib/libc/arch/powerpc/gen/setjmp.S Tue Jul 30 05:58:42 2002 +0000
+++ b/lib/libc/arch/powerpc/gen/setjmp.S Tue Jul 30 06:07:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setjmp.S,v 1.3 1998/10/03 12:30:38 tsubai Exp $ */
+/* $NetBSD: setjmp.S,v 1.4 2002/07/30 06:07:57 matt Exp $ */
#include <sys/syscall.h>
@@ -6,7 +6,7 @@
#if defined(LIBC_SCCS)
.text
- .asciz "$NetBSD: setjmp.S,v 1.3 1998/10/03 12:30:38 tsubai Exp $"
+ .asciz "$NetBSD: setjmp.S,v 1.4 2002/07/30 06:07:57 matt Exp $"
#endif
/*
@@ -20,32 +20,32 @@
*/
ENTRY(setjmp)
- mr 6,3
- li 3,1 # SIG_BLOCK
- li 4,0
- li 0,SYS_compat_13_sigprocmask13
+ mr %r6,%r3
+ li %r3,1 # SIG_BLOCK
+ li %r4,0
+ li %r0,SYS_compat_13_sigprocmask13
sc # assume no error XXX
- mflr 11
- mfcr 12
- mr 10,1
- mr 9,2
- mr 8,3
- stmw 8,4(6)
- li 3,0
+ mflr %r11
+ mfcr %r12
+ mr %r10,%r1
+ mr %r9,%r2
+ mr %r8,%r3
+ stmw %r8,4(%r6)
+ li %r3,0
blr
ENTRY(longjmp)
- lmw 8,4(3)
- mr 6,4
- mtlr 11
- mtcr 12
- mr 2,9
- mr 1,10
- mr 4,8
- li 3,3 # SIG_SETMASK
- li 0,SYS_compat_13_sigprocmask13
+ lmw %r8,4(%r3)
+ mr %r6,%r4
+ mtlr %r11
+ mtcr %r12
+ mr %r2,%r9
+ mr %r1,%r10
+ mr %r4,%r8
+ li %r3,3 # SIG_SETMASK
+ li %r0,SYS_compat_13_sigprocmask13
sc # assume no error XXX
- or. 3,6,6
+ or. %r3,%r6,%r6
bnelr
- li 3,1
+ li %r3,1
Home |
Main Index |
Thread Index |
Old Index