Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/lib/libc/arch/powerpc Pull up revision 1.2 (requested b...
details: https://anonhg.NetBSD.org/src/rev/75aa4d09efc4
branches: netbsd-1-6
changeset: 531441:75aa4d09efc4
user: tron <tron%NetBSD.org@localhost>
date: Fri Jul 23 13:59:00 2004 +0000
description:
Pull up revision 1.2 (requested by skrll in ticket #1725):
Convert to use register prefixes. (0 -> %r0, etc.)
diffstat:
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/string/ffs.S | 12 +++---
lib/libc/arch/powerpc/string/strlen.S | 50 ++++++++++++++--------------
lib/libc/arch/powerpc/sys/__clone.S | 20 +++++-----
6 files changed, 111 insertions(+), 111 deletions(-)
diffs (truncated from 363 to 300 lines):
diff -r dfc98b47870c -r 75aa4d09efc4 lib/libc/arch/powerpc/gen/__setjmp14.S
--- a/lib/libc/arch/powerpc/gen/__setjmp14.S Fri Jul 23 13:56:07 2004 +0000
+++ b/lib/libc/arch/powerpc/gen/__setjmp14.S Fri Jul 23 13:59:00 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __setjmp14.S,v 1.1 1998/10/03 12:30:38 tsubai Exp $ */
+/* $NetBSD: __setjmp14.S,v 1.1.14.1 2004/07/23 13:59:00 tron 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.1.14.1 2004/07/23 13:59:00 tron 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 dfc98b47870c -r 75aa4d09efc4 lib/libc/arch/powerpc/gen/__sigsetjmp14.S
--- a/lib/libc/arch/powerpc/gen/__sigsetjmp14.S Fri Jul 23 13:56:07 2004 +0000
+++ b/lib/libc/arch/powerpc/gen/__sigsetjmp14.S Fri Jul 23 13:59:00 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __sigsetjmp14.S,v 1.1 1998/10/03 12:30:38 tsubai Exp $ */
+/* $NetBSD: __sigsetjmp14.S,v 1.1.14.1 2004/07/23 13:59:00 tron 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.1.14.1 2004/07/23 13:59:00 tron 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 dfc98b47870c -r 75aa4d09efc4 lib/libc/arch/powerpc/gen/_setjmp.S
--- a/lib/libc/arch/powerpc/gen/_setjmp.S Fri Jul 23 13:56:07 2004 +0000
+++ b/lib/libc/arch/powerpc/gen/_setjmp.S Fri Jul 23 13:59:00 2004 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $ */
+/* $NetBSD: _setjmp.S,v 1.1.16.1 2004/07/23 13:59:00 tron 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.1.16.1 2004/07/23 13:59:00 tron 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 dfc98b47870c -r 75aa4d09efc4 lib/libc/arch/powerpc/string/ffs.S
--- a/lib/libc/arch/powerpc/string/ffs.S Fri Jul 23 13:56:07 2004 +0000
+++ b/lib/libc/arch/powerpc/string/ffs.S Fri Jul 23 13:59:00 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.S,v 1.1 2001/11/25 01:09:59 mjl Exp $ */
+/* $NetBSD: ffs.S,v 1.1.4.1 2004/07/23 13:59:00 tron Exp $ */
/*-
* Copyright (C) 2001 Martin J. Laubach <mjl%netbsd.org@localhost>
@@ -31,11 +31,11 @@
.align 4
ENTRY(ffs)
- neg r4, r3
- and r3, r4, r3
- cntlzw r3, r3
- li r0, 32
- subf r3, r3, r0
+ neg %r4, %r3
+ and %r3, %r4, %r3
+ cntlzw %r3, %r3
+ li %r0, 32
+ subf %r3, %r3, %r0
blr
/*----------------------------------------------------------------------*/
diff -r dfc98b47870c -r 75aa4d09efc4 lib/libc/arch/powerpc/string/strlen.S
--- a/lib/libc/arch/powerpc/string/strlen.S Fri Jul 23 13:56:07 2004 +0000
+++ b/lib/libc/arch/powerpc/string/strlen.S Fri Jul 23 13:59:00 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strlen.S,v 1.1 2001/11/30 02:26:35 mjl Exp $ */
+/* $NetBSD: strlen.S,v 1.1.4.1 2004/07/23 13:59:00 tron Exp $ */
/*-
* Copyright (C) 2001 Martin J. Laubach <mjl%netbsd.org@localhost>
@@ -64,49 +64,49 @@
ENTRY(strlen)
/* Setup constants */
- lis r10, 0x7f7f
- lis r9, 0xfefe
- ori r10, r10, 0x7f7f
- ori r9, r9, 0xfeff
+ lis %r10, 0x7f7f
+ lis %r9, 0xfefe
+ ori %r10, %r10, 0x7f7f
+ ori %r9, %r9, 0xfeff
/* Mask out leading bytes on non aligned strings */
- rlwinm. r8, r3, 3, 27, 28 /* leading bits to mask */
- clrrwi r5, r3, 2 /* clear low 2 addr bits */
- li r0, -1
+ rlwinm. %r8, %r3, 3, 27, 28 /* leading bits to mask */
+ clrrwi %r5, %r3, 2 /* clear low 2 addr bits */
+ li %r0, -1
beq+ 3f /* skip alignment if already */
/* aligned */
- srw r0, r0, r8 /* make 0000...1111 mask */
+ srw %r0, %r0, %r8 /* make 0000...1111 mask */
- lwz r7, 0(r5)
- nor r0, r0, r0 /* invert mask */
- or r7, r7, r0 /* make leading bytes != 0 */
+ lwz %r7, 0(%r5)
+ nor %r0, %r0, %r0 /* invert mask */
+ or %r7, %r7, %r0 /* make leading bytes != 0 */
b 2f
-3: subi r5, r5, 4
+3: subi %r5, %r5, 4
-1: lwzu r7, 4(r5) /* fetch data word */
+1: lwzu %r7, 4(%r5) /* fetch data word */
-2: nor r0, r7, r10 /* do step 1 */
- add r6, r7, r9
- and. r0, r0, r6
+2: nor %r0, %r7, %r10 /* do step 1 */
+ add %r6, %r7, %r9
+ and. %r0, %r0, %r6
beq+ 1b /* no NUL bytes here */
- and r8, r7, r10 /* ok, a NUL is somewhere */
- or r7, r7, r10 /* do step 2 to find out */
- add r0, r8, r10 /* where */
- nor r8, r7, r0
+ and %r8, %r7, %r10 /* ok, a NUL is somewhere */
+ or %r7, %r7, %r10 /* do step 2 to find out */
+ add %r0, %r8, %r10 /* where */
+ nor %r8, %r7, %r0
Home |
Main Index |
Thread Index |
Old Index