Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mvmeppc/stand/libsa Prefix register names with %, a...
details: https://anonhg.NetBSD.org/src/rev/b2b2e4d564c3
branches: trunk
changeset: 761042:b2b2e4d564c3
user: he <he%NetBSD.org@localhost>
date: Wed Jan 19 09:03:15 2011 +0000
description:
Prefix register names with %, apparently now required to build.
diffstat:
sys/arch/mvmeppc/stand/libsa/bugsyscalls.S | 20 +-
sys/arch/mvmeppc/stand/libsa/srt0.S | 148 ++++++++++++++--------------
2 files changed, 84 insertions(+), 84 deletions(-)
diffs (275 lines):
diff -r f271824fb28e -r b2b2e4d564c3 sys/arch/mvmeppc/stand/libsa/bugsyscalls.S
--- a/sys/arch/mvmeppc/stand/libsa/bugsyscalls.S Wed Jan 19 09:02:52 2011 +0000
+++ b/sys/arch/mvmeppc/stand/libsa/bugsyscalls.S Wed Jan 19 09:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bugsyscalls.S,v 1.2 2008/04/28 20:23:30 martin Exp $ */
+/* $NetBSD: bugsyscalls.S,v 1.3 2011/01/19 09:03:15 he Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <machine/asm.h>
-#define BSYS(num) addi r10,0,num ; sc
+#define BSYS(num) addi %r10,0,num ; sc
/*
@@ -60,8 +60,8 @@
*/
ENTRY(bugsys_instat)
BSYS(0x0002)
- li r4,0x8
- and r3,r3,r4
+ li %r4,0x8
+ and %r3,%r3,%r4
blr
/*
@@ -74,8 +74,8 @@
*/
ENTRY(bugsys_dskrd)
BSYS(0x0010)
- li r4,0x8
- and r3,r3,r4
+ li %r4,0x8
+ and %r3,%r3,%r4
blr
/*
@@ -88,8 +88,8 @@
*/
ENTRY(bugsys_dskwr)
BSYS(0x0011)
- li r4,0x8
- and r3,r3,r4
+ li %r4,0x8
+ and %r3,%r3,%r4
blr
/*
@@ -102,8 +102,8 @@
*/
ENTRY(bugsys_netio)
BSYS(0x001d)
- li r4,0x8
- and r3,r3,r4
+ li %r4,0x8
+ and %r3,%r3,%r4
blr
/*
diff -r f271824fb28e -r b2b2e4d564c3 sys/arch/mvmeppc/stand/libsa/srt0.S
--- a/sys/arch/mvmeppc/stand/libsa/srt0.S Wed Jan 19 09:02:52 2011 +0000
+++ b/sys/arch/mvmeppc/stand/libsa/srt0.S Wed Jan 19 09:03:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: srt0.S,v 1.3 2010/03/02 21:52:33 matt Exp $ */
+/* $NetBSD: srt0.S,v 1.4 2011/01/19 09:03:15 he Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -46,122 +46,122 @@
* have to relocate ourselves to the appropriate place.
* The firmware passes us the following registers:
*
- * r1 -> Temporary stack
- * r3 -> Residual Data
- * r4 -> The address we were loaded to
- * r5 -> Zero
+ * %r1 -> Temporary stack
+ * %r3 -> Residual Data
+ * %r4 -> The address we were loaded to
+ * %r5 -> Zero
*
* 2) We were booted over the network in Non-PReP mode. In this case,
* the load address is usually set using PPC-Bug's "niot" command,
* but we won't depend on it so relocation may be required. The
* firmware passes us the following registers:
*
- * r1 -> Temporary stack
- * r3 -> CLUN of the network device we booted from
- * r4 -> DLUN of the network device we booted from
- * r5 -> Non-zero
- * r6 -> Base address of network device
- * r7 -> Execution address of loaded program
- * r8 -> Address of IP-address data structure
- * r9 -> Pointer to start of filename string
- * r10 -> Pointer to end+1 of filename string
- * r11 -> Pointer to start of argument string
- * r12 -> Pointer to end+1 of argument string
+ * %r1 -> Temporary stack
+ * %r3 -> CLUN of the network device we booted from
+ * %r4 -> DLUN of the network device we booted from
+ * %r5 -> Non-zero
+ * %r6 -> Base address of network device
+ * %r7 -> Execution address of loaded program
+ * %r8 -> Address of IP-address data structure
+ * %r9 -> Pointer to start of filename string
+ * %r10 -> Pointer to end+1 of filename string
+ * %r11 -> Pointer to start of argument string
+ * %r12 -> Pointer to end+1 of argument string
*
* The obvious way to distinguish between the two boot modes is by
- * checking the value of r5.
+ * checking the value of %r5.
*/
ENTRY(_start)
bl 1f
-1: xor r0,r0,r0
+1: xor %r0,%r0,%r0
/* First, switch off Instruction and Data caches. */
- mfspr r13,SPR_HID0
- LDCONST(r14, HID0_DCE|HID0_ICE)
- andc r13,r13,r14
+ mfspr %r13,SPR_HID0
+ LDCONST(%r14, HID0_DCE|HID0_ICE)
+ andc %r13,%r13,%r14
sync
- mtspr SPR_HID0,r13
+ mtspr SPR_HID0,%r13
/*
* All registers now available. Let's see if we need to relocate
*/
- LDCONST(r13,_C_LABEL(_start)) /* Where we'd like to be */
- LDCONST(r14,_C_LABEL(edata)) /* End of data section */
- LDCONST(r15,0x3)
- add r14,r14,r15
- andc r14,r14,r15 /* Rounded up to the nearest 32-bits */
- sub r15,r14,r13 /* Our size, in bytes */
- mflr r16 /* Get address we were loaded to */
- subi r16,r16,0x4 /* Correct for branch */
- cmp cr0,r13,r16 /* Do we need to relocate? */
+ LDCONST(%r13,_C_LABEL(_start)) /* Where we'd like to be */
+ LDCONST(%r14,_C_LABEL(edata)) /* End of data section */
+ LDCONST(%r15,0x3)
+ add %r14,%r14,%r15
+ andc %r14,%r14,%r15 /* Rounded up to the nearest 32-bits */
+ sub %r15,%r14,%r13 /* Our size, in bytes */
+ mflr %r16 /* Get address we were loaded to */
+ subi %r16,%r16,0x4 /* Correct for branch */
+ cmp %cr0,%r13,%r16 /* Do we need to relocate? */
beq _ASM_LABEL(clrbss) /* No relocation necessary */
- li r17,0x4
+ li %r17,0x4
bgt 1f /* Relocate using forward copy? */
/* Nope. Need to copy in reverse in case of overlap */
- mr r13,r14 /* dest -> end */
- add r16,r16,r15 /* src + size */
- subi r17,r17,0x8 /* Increment is -4 */
+ mr %r13,%r14 /* dest -> end */
+ add %r16,%r16,%r15 /* src + size */
+ subi %r17,%r17,0x8 /* Increment is -4 */
/*
* Do the relocation
- * r13 -> dest
- * r15 -> number of bytes
- * r16 -> src
- * r17 -> Increment (+4 or -4)
+ * %r13 -> dest
+ * %r15 -> number of bytes
+ * %r16 -> src
+ * %r17 -> Increment (+4 or -4)
*/
-1: srwi r15,r15,0x2 /* Convert length to 32-bit words */
- mtctr r15 /* Save in counter register */
+1: srwi %r15,%r15,0x2 /* Convert length to 32-bit words */
+ mtctr %r15 /* Save in counter register */
-2: lwz r15,0(r16)
- stw r15,0(r13)
- add r16,r16,r17
- add r13,r13,r17
+2: lwz %r15,0(%r16)
+ stw %r15,0(%r13)
+ add %r16,%r16,%r17
+ add %r13,%r13,%r17
bdnz 2b
/* Now do an absolute jump to the relocated code */
- LDCONST(r13,_ASM_LABEL(clrbss))
- mtlr r13
+ LDCONST(%r13,_ASM_LABEL(clrbss))
+ mtlr %r13
blr
ASENTRY(clrbss)
- LDCONST(r13,_C_LABEL(edata)) /* End of the data section */
- LDCONST(r14,_C_LABEL(end)) /* End of BSS */
- LDCONST(r15,0x3)
- add r14,r14,r15
- andc r14,r14,r15 /* Round-up end of BSS to 32-bits */
- sub r15,r14,r13 /* r15 == length of BSS */
- srwi r15,r15,0x2
- mtctr r15 /* CTR == # of 32-bit words in BSS */
-1: stw r0,0(r13) /* Clear BSS */
- addi r13,r13,4
+ LDCONST(%r13,_C_LABEL(edata)) /* End of the data section */
+ LDCONST(%r14,_C_LABEL(end)) /* End of BSS */
+ LDCONST(%r15,0x3)
+ add %r14,%r14,%r15
+ andc %r14,%r14,%r15 /* Round-up end of BSS to 32-bits */
+ sub %r15,%r14,%r13 /* r15 == length of BSS */
+ srwi %r15,%r15,0x2
+ mtctr %r15 /* CTR == # of 32-bit words in BSS */
+1: stw %r0,0(%r13) /* Clear BSS */
+ addi %r13,%r13,4
bdnz 1b
/* Fix up our own stack */
- LDCONST(r1,stack)
- addi r1,r1,STACK_SIZE-0x10
- LDCONST(r13,0x0f)
- andc r1,r1,r13
+ LDCONST(%r1,stack)
+ addi %r1,%r1,STACK_SIZE-0x10
+ LDCONST(%r13,0x0f)
+ andc %r1,%r1,%r13
/*
* Copy the arguments passed in from Bug into bug_bootinfo
*
* See bugsyscalls.h for details.
*/
- LDCONST(r13,_C_LABEL(bug_bootinfo))
- stw r5,0x00(r13)
- stw r3,0x04(r13)
- stw r4,0x08(r13)
- stw r6,0x0c(r13)
- stw r7,0x10(r13)
- stw r8,0x14(r13)
- stw r9,0x18(r13)
- stw r10,0x1c(r13)
- stw r11,0x20(r13)
- stw r12,0x24(r13)
+ LDCONST(%r13,_C_LABEL(bug_bootinfo))
+ stw %r5,0x00(%r13)
+ stw %r3,0x04(%r13)
+ stw %r4,0x08(%r13)
+ stw %r6,0x0c(%r13)
+ stw %r7,0x10(%r13)
+ stw %r8,0x14(%r13)
+ stw %r9,0x18(%r13)
+ stw %r10,0x1c(%r13)
+ stw %r11,0x20(%r13)
+ stw %r12,0x24(%r13)
- mr r3,r13
+ mr %r3,%r13
bl _C_LABEL(main) /* void main(void) */
/* FALLTHROUGH */
@@ -169,7 +169,7 @@
* Return to the debugger, either because main() returned or via panic().
*/
ENTRY(_rtt)
- addi r10,0,0x0063
+ addi %r10,0,0x0063
sc
1: nop
b 1b
Home |
Main Index |
Thread Index |
Old Index