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.5 (requested b...
details: https://anonhg.NetBSD.org/src/rev/8af0dd834b7d
branches: netbsd-1-6
changeset: 531436:8af0dd834b7d
user: tron <tron%NetBSD.org@localhost>
date: Fri Jul 23 13:55:29 2004 +0000
description:
Pull up revision 1.5 (requested by skrll in ticket #1725):
Convert to use register prefixes. (0 -> %r0, etc.)
diffstat:
lib/libc/arch/powerpc/gen/sigsetjmp.S | 52 +++---
lib/libc/arch/powerpc/string/bzero.S | 278 +++++++++++++++++-----------------
2 files changed, 165 insertions(+), 165 deletions(-)
diffs (truncated from 527 to 300 lines):
diff -r 0a36b885ea03 -r 8af0dd834b7d lib/libc/arch/powerpc/gen/sigsetjmp.S
--- a/lib/libc/arch/powerpc/gen/sigsetjmp.S Fri Jul 23 13:55:01 2004 +0000
+++ b/lib/libc/arch/powerpc/gen/sigsetjmp.S Fri Jul 23 13:55:29 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sigsetjmp.S,v 1.4 1998/10/03 12:30:38 tsubai Exp $ */
+/* $NetBSD: sigsetjmp.S,v 1.4.14.1 2004/07/23 13:55:29 tron Exp $ */
#include <sys/syscall.h>
@@ -6,42 +6,42 @@
#if defined(LIBC_SCCS)
.text
- .asciz "$NetBSD: sigsetjmp.S,v 1.4 1998/10/03 12:30:38 tsubai Exp $"
+ .asciz "$NetBSD: sigsetjmp.S,v 1.4.14.1 2004/07/23 13:55:29 tron Exp $"
#endif
ENTRY(sigsetjmp)
- mr 6,3
- or. 7,4,4
+ mr %r6,%r3
+ or. %r7,%r4,%r4
beq 1f
- li 3,1 # SIG_BLOCK
- li 4,0
- li 0,SYS_compat_13_sigprocmask13
+ li %r3,1 # SIG_BLOCK
+ li %r4,0
+ li %r0,SYS_compat_13_sigprocmask13
sc # assume no error XXX
1:
- mflr 11
- mfcr 12
- mr 10,1
- mr 9,2
- mr 8,3
- stmw 7,0(6)
- li 3,0
+ mflr %r11
+ mfcr %r12
+ mr %r10,%r1
+ mr %r9,%r2
+ mr %r8,%r3
+ stmw %r7,0(%r6)
+ li %r3,0
blr
ENTRY(siglongjmp)
- lmw 7,0(3)
- mr 6,4
- mtlr 11
- mtcr 12
- mr 2,9
- mr 1,10
- or. 7,7,7
+ lmw %r7,0(%r3)
+ mr %r6,%r4
+ mtlr %r11
+ mtcr %r12
+ mr %r2,%r9
+ mr %r1,%r10
+ or. %r7,%r7,%r7
beq 1f
- mr 4,8
- li 3,3 # SIG_SETMASK
- li 0,SYS_compat_13_sigprocmask13
+ mr %r4,8
+ li %r3,3 # SIG_SETMASK
+ li %r0,SYS_compat_13_sigprocmask13
sc # assume no error XXX
1:
- or. 3,6,6
+ or. %r3,%r6,%r6
bnelr
- li 3,1
+ li %r3,1
blr
diff -r 0a36b885ea03 -r 8af0dd834b7d lib/libc/arch/powerpc/string/bzero.S
--- a/lib/libc/arch/powerpc/string/bzero.S Fri Jul 23 13:55:01 2004 +0000
+++ b/lib/libc/arch/powerpc/string/bzero.S Fri Jul 23 13:55:29 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzero.S,v 1.4 2002/03/12 22:08:22 eeh Exp $ */
+/* $NetBSD: bzero.S,v 1.4.2.1 2004/07/23 13:55:29 tron Exp $ */
/*-
* Copyright (C) 2001 Martin J. Laubach <mjl%netbsd.org@localhost>
@@ -37,14 +37,14 @@
/*----------------------------------------------------------------------*/
/*
- void bzero(void *b r3, size_t len r4);
- void * memset(void *b r3, int c r4, size_t len r5);
+ void bzero(void *b %r3, size_t len %r4);
+ void * memset(void *b %r3, int c %r4, size_t len %r5);
*/
/*----------------------------------------------------------------------*/
-#define r_dst r3
-#define r_len r4
-#define r_val r0
+#define r_dst %r3
+#define r_len %r4
+#define r_val %r0
.text
.align 4
@@ -53,14 +53,14 @@
b cb_memset
ENTRY(memset)
- cmplwi cr1, r5, 0
- mr. r0, r4
- mr r8, r3
+ cmplwi cr1, %r5, 0
+ mr. %r0, %r4
+ mr %r8, %r3
beqlr- cr1 /* Nothing to do */
- rlwimi r0, r4, 8, 16, 23 /* word extend fill value */
- rlwimi r0, r0, 16, 0, 15
- mr r4, r5
+ rlwimi %r0, %r4, 8, 16, 23 /* word extend fill value */
+ rlwimi %r0, %r0, 16, 0, 15
+ mr %r4, %r5
bne- simple_fill /* =! 0, use trivial fill */
cb_memset:
@@ -68,17 +68,17 @@
#ifndef _KERNEL
/* First find out cache line size */
#ifdef PIC
- mflr r9
+ mflr %r9
bl _GLOBAL_OFFSET_TABLE_@local-4
- mflr r10
- mtlr r9
- lwz r5,cache_info@got(r10)
+ mflr %r10
+ mtlr %r9
+ lwz %r5,cache_info@got(%r10)
#else
- lis r5,cache_info@h
- ori r5,r5,cache_info@l
+ lis %r5,cache_info@h
+ ori %r5,%r5,cache_info@l
#endif
- lwz r6, 4(r5)
- cmpwi r6, -1
+ lwz %r6, 4(%r5)
+ cmpwi %r6, -1
bne+ cb_cacheline_known
/*----------------------------------------------------------------------*/
@@ -94,142 +94,142 @@
#define R0_SAVE 28
#define R8_SAVE 32
- mflr r6
- stw r6, 4(r1)
- stwu r1, -STKFRAME_SZ(r1)
+ mflr %r6
+ stw %r6, 4(%r1)
+ stwu %r1, -STKFRAME_SZ(%r1)
- stw r8, R8_SAVE(r1)
- stw r3, R3_SAVE(r1)
- stw r4, R4_SAVE(r1)
- stw r0, R0_SAVE(r1)
+ stw %r8, R8_SAVE(%r1)
+ stw %r3, R3_SAVE(%r1)
+ stw %r4, R4_SAVE(%r1)
+ stw %r0, R0_SAVE(%r1)
- li r0, CTL_MACHDEP /* Construct MIB */
- stw r0, MIB(r1)
- li r0, CPU_CACHEINFO
- stw r0, MIB+4(r1)
+ li %r0, CTL_MACHDEP /* Construct MIB */
+ stw %r0, MIB(%r1)
+ li %r0, CPU_CACHEINFO
+ stw %r0, MIB+4(%r1)
- li r0, 4*4 /* Oldlenp := 4*4 */
- stw r0, OLDPLEN(r1)
+ li %r0, 4*4 /* Oldlenp := 4*4 */
+ stw %r0, OLDPLEN(%r1)
- addi r3, r1, MIB
- li r4, 2 /* namelen */
- /* r5 already contains &cache_info */
- addi r6, r1, OLDPLEN
- li r7, 0
- li r8, 0
+ addi %r3, %r1, MIB
+ li %r4, 2 /* namelen */
+ /* %r5 already contains &cache_info */
+ addi %r6, %r1, OLDPLEN
+ li %r7, 0
+ li %r8, 0
bl PIC_PLT(_C_LABEL(sysctl))
- cmpwi r3, 0 /* Check result */
+ cmpwi %r3, 0 /* Check result */
beq 1f
/* Failure, try older sysctl */
- li r0, CTL_MACHDEP /* Construct MIB */
- stw r0, MIB(r1)
- li r0, CPU_CACHELINE
- stw r0, MIB+4(r1)
+ li %r0, CTL_MACHDEP /* Construct MIB */
+ stw %r0, MIB(%r1)
+ li %r0, CPU_CACHELINE
+ stw %r0, MIB+4(%r1)
- li r0, 4 /* Oldlenp := 4 */
- stw r0, OLDPLEN(r1)
+ li %r0, 4 /* Oldlenp := 4 */
+ stw %r0, OLDPLEN(%r1)
- addi r3, r1, MIB
- li r4, 2 /* namelen */
+ addi %r3, %r1, MIB
+ li %r4, 2 /* namelen */
#ifdef PIC
- mflr r9
+ mflr %r9
bl _GLOBAL_OFFSET_TABLE_@local-4
- mflr r10
- mtlr r9
- lwz r5,cache_info@got(r10)
- addi r5, r5, 4
+ mflr %r10
+ mtlr %r9
+ lwz %r5,cache_info@got(%r10)
+ addi %r5, %r5, 4
#else
- lis r5,cache_info+4@h
- ori r5,r5,cache_info+4@l
+ lis %r5,cache_info+4@h
+ ori %r5,%r5,cache_info+4@l
#endif
- addi r6, r1, OLDPLEN
- li r7, 0
- li r8, 0
+ addi %r6, %r1, OLDPLEN
+ li %r7, 0
+ li %r8, 0
bl PIC_PLT(_C_LABEL(sysctl))
1:
- lwz r8, R8_SAVE(r1)
- lwz r3, R3_SAVE(r1)
- lwz r4, R4_SAVE(r1)
- lwz r0, R0_SAVE(r1)
+ lwz %r8, R8_SAVE(%r1)
+ lwz %r3, R3_SAVE(%r1)
+ lwz %r4, R4_SAVE(%r1)
+ lwz %r0, R0_SAVE(%r1)
#ifdef PIC
bl _GLOBAL_OFFSET_TABLE_@local-4
- mflr r10
- lwz r9, cache_info@got(r10)
- lwz r9, 4(r9)
+ mflr %r10
+ lwz %r9, cache_info@got(%r10)
+ lwz %r9, 4(%r9)
#else
- lis r5, cache_info+4@ha
- lwz r9, cache_info+4@l(r5)
+ lis %r5, cache_info+4@ha
+ lwz %r9, cache_info+4@l(%r5)
#endif
- la r1, STKFRAME_SZ(r1)
- lwz r5, 4(r1)
- mtlr r5
+ la %r1, STKFRAME_SZ(%r1)
+ lwz %r5, 4(%r1)
+ mtlr %r5
- cntlzw r6, r9 /* compute shift value */
- li r5, 31
- subf r5, r6, r5
+ cntlzw %r6, %r9 /* compute shift value */
+ li %r5, 31
+ subf %r5, %r6, %r5
#ifdef PIC
- lwz r6, cache_sh@got(r10)
- stw r5, 0(r6)
+ lwz %r6, cache_sh@got(%r10)
+ stw %r5, 0(%r6)
#else
- lis r6, cache_sh@ha
- stw r5, cache_sh@l(r6)
+ lis %r6, cache_sh@ha
+ stw %r5, cache_sh@l(%r6)
Home |
Main Index |
Thread Index |
Old Index