Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/powerpc Use register prefixes and load/stor...



details:   https://anonhg.NetBSD.org/src/rev/ef39fa169924
branches:  trunk
changeset: 550155:ef39fa169924
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jul 31 13:59:54 2003 +0000

description:
Use register prefixes and load/store pseudo-instructions.

diffstat:

 sys/arch/powerpc/powerpc/setjmp.S |  117 +++++++++++++++++++------------------
 1 files changed, 60 insertions(+), 57 deletions(-)

diffs (145 lines):

diff -r 307e5d278c60 -r ef39fa169924 sys/arch/powerpc/powerpc/setjmp.S
--- a/sys/arch/powerpc/powerpc/setjmp.S Thu Jul 31 13:54:30 2003 +0000
+++ b/sys/arch/powerpc/powerpc/setjmp.S Thu Jul 31 13:59:54 2003 +0000
@@ -1,8 +1,11 @@
-/*     $NetBSD: setjmp.S,v 1.1 1998/01/27 15:13:12 sakamoto Exp $      */
+/*     $NetBSD: setjmp.S,v 1.2 2003/07/31 13:59:54 matt Exp $  */
 /*     from:   OpenBSD: setjmp.S,v 1.2 1996/12/28 06:22:18 rahnds Exp  */
 /* kernel version of this file, does not have signal goop */
 /* int setjmp(jmp_buf env) */
 
+#define _NOREGNAMES
+#include <machine/asm.h>
+
 #define JMP_r1 0x04
 #define JMP_r14        0x08
 #define JMP_r15        0x0c
@@ -31,72 +34,72 @@
 
 .globl setjmp
 setjmp:
-       stw 31, JMP_r31(3)
+       streg %r31, JMP_r31(%r3)
        /* r1, r14-r30 */
-       stw 1,  JMP_r1 (3)
-       stw 14, JMP_r14(3)
-       stw 15, JMP_r15(3)
-       stw 16, JMP_r16(3)
-       stw 17, JMP_r17(3)
-       stw 18, JMP_r18(3)
-       stw 19, JMP_r19(3)
-       stw 20, JMP_r20(3)
-       stw 21, JMP_r21(3)
-       stw 22, JMP_r22(3)
-       stw 23, JMP_r23(3)
-       stw 24, JMP_r24(3)
-       stw 25, JMP_r25(3)
-       stw 26, JMP_r26(3)
-       stw 27, JMP_r27(3)
-       stw 28, JMP_r28(3)
-       stw 29, JMP_r29(3)
-       stw 30, JMP_r30(3)
+       streg %r1,  JMP_r1 (%r3)
+       streg %r14, JMP_r14(%r3)
+       streg %r15, JMP_r15(%r3)
+       streg %r16, JMP_r16(%r3)
+       streg %r17, JMP_r17(%r3)
+       streg %r18, JMP_r18(%r3)
+       streg %r19, JMP_r19(%r3)
+       streg %r20, JMP_r20(%r3)
+       streg %r21, JMP_r21(%r3)
+       streg %r22, JMP_r22(%r3)
+       streg %r23, JMP_r23(%r3)
+       streg %r24, JMP_r24(%r3)
+       streg %r25, JMP_r25(%r3)
+       streg %r26, JMP_r26(%r3)
+       streg %r27, JMP_r27(%r3)
+       streg %r28, JMP_r28(%r3)
+       streg %r29, JMP_r29(%r3)
+       streg %r30, JMP_r30(%r3)
        /* cr, lr, ctr, xer */
-       mfcr 0
-       stw 0, JMP_cr(3)
-       mflr 0
-       stw 0, JMP_lr(3)
-       mfctr 0
-       stw 0, JMP_ctr(3)
-       mfxer 0
-       stw 0, JMP_xer(3)
+       mfcr %r0
+       streg %r0, JMP_cr(%r3)
+       mflr %r0
+       streg %r0, JMP_lr(%r3)
+       mfctr %r0
+       streg %r0, JMP_ctr(%r3)
+       mfxer %r0
+       streg %r0, JMP_xer(%r3)
        /* f14-f31, fpscr */
-       li 3, 0
+       li %r3, 0
        blr
 
 
 .extern sigsetmask
 .globl longjmp
 longjmp:
-       lwz 31, JMP_r31(3)
+       ldreg %r31, JMP_r31(%r3)
        /* r1, r14-r30 */
-       lwz 1,  JMP_r1 (3)
-       lwz 14, JMP_r14(3)
-       lwz 15, JMP_r15(3)
-       lwz 16, JMP_r16(3)
-       lwz 17, JMP_r17(3)
-       lwz 18, JMP_r18(3)
-       lwz 19, JMP_r19(3)
-       lwz 20, JMP_r20(3)
-       lwz 21, JMP_r21(3)
-       lwz 22, JMP_r22(3)
-       lwz 23, JMP_r23(3)
-       lwz 24, JMP_r24(3)
-       lwz 25, JMP_r25(3)
-       lwz 26, JMP_r26(3)
-       lwz 27, JMP_r27(3)
-       lwz 28, JMP_r28(3)
-       lwz 29, JMP_r29(3)
-       lwz 30, JMP_r30(3)
+       ldreg %r1,  JMP_r1 (%r3)
+       ldreg %r14, JMP_r14(%r3)
+       ldreg %r15, JMP_r15(%r3)
+       ldreg %r16, JMP_r16(%r3)
+       ldreg %r17, JMP_r17(%r3)
+       ldreg %r18, JMP_r18(%r3)
+       ldreg %r19, JMP_r19(%r3)
+       ldreg %r20, JMP_r20(%r3)
+       ldreg %r21, JMP_r21(%r3)
+       ldreg %r22, JMP_r22(%r3)
+       ldreg %r23, JMP_r23(%r3)
+       ldreg %r24, JMP_r24(%r3)
+       ldreg %r25, JMP_r25(%r3)
+       ldreg %r26, JMP_r26(%r3)
+       ldreg %r27, JMP_r27(%r3)
+       ldreg %r28, JMP_r28(%r3)
+       ldreg %r29, JMP_r29(%r3)
+       ldreg %r30, JMP_r30(%r3)
        /* cr, lr, ctr, xer */
-       lwz 0, JMP_cr(3)
-       mtcr 0
-       lwz 0, JMP_lr(3)
-       mtlr 0
-       lwz 0, JMP_ctr(3)
-       mtctr 0
-       lwz 0, JMP_xer(3)
-       mtxer 0
+       ldreg %r0, JMP_cr(%r3)
+       mtcr %r0
+       ldreg %r0, JMP_lr(%r3)
+       mtlr %r0
+       ldreg %r0, JMP_ctr(%r3)
+       mtctr %r0
+       ldreg %r0, JMP_xer(%r3)
+       mtxer %r0
        /* f14-f31, fpscr */
-       mr 3, 4
+       mr %r3, %r4
        blr



Home | Main Index | Thread Index | Old Index