Source-Changes-HG archive

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

[src/trunk]: src/lib/csu/powerpc To make things clearer, use register prefixe...



details:   https://anonhg.NetBSD.org/src/rev/ba70bc82bfad
branches:  trunk
changeset: 534580:ba70bc82bfad
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 29 21:54:35 2002 +0000

description:
To make things clearer, use register prefixes in asm() code.

diffstat:

 lib/csu/powerpc/crt0.c     |  12 ++++++------
 lib/csu/powerpc/dot_init.h |  14 +++++++-------
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs (67 lines):

diff -r 844f5280b520 -r ba70bc82bfad lib/csu/powerpc/crt0.c
--- a/lib/csu/powerpc/crt0.c    Mon Jul 29 21:08:30 2002 +0000
+++ b/lib/csu/powerpc/crt0.c    Mon Jul 29 21:54:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.22 2002/05/09 20:32:59 matt Exp $ */
+/* $NetBSD: crt0.c,v 1.23 2002/07/29 21:54:35 matt Exp $ */
 
 /*
  * Copyright (c) 1997 Jason R. Thorpe.
@@ -68,10 +68,10 @@
         * _SDA_BASE is defined in the SVR4 ABI for PPC.
         * _SDA2_BASE is defined in the E[mbedded] ABI for PPC.
         */
-       __asm(  "lis 13,_SDA_BASE_@ha;"
-               "addi 13,13,_SDA_BASE_@l;"
-               "lis 2,_SDA2_BASE_@ha;"
-               "addi 2,2,_SDA2_BASE_@l" );
+       __asm(  "lis %r13,_SDA_BASE_@ha;"
+               "addi %r13,%r13,_SDA_BASE_@l;"
+               "lis %r2,_SDA2_BASE_@ha;"
+               "addi %r2,%r2,_SDA2_BASE_@l" );
 
        if ((namep = argv[0]) != NULL) {        /* NULL ptr if argc = 0 */
                if ((__progname = _strrchr(namep, '/')) == NULL)
@@ -105,7 +105,7 @@
  * NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
  */
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.22 2002/05/09 20:32:59 matt Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.23 2002/07/29 21:54:35 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "common.c"
diff -r 844f5280b520 -r ba70bc82bfad lib/csu/powerpc/dot_init.h
--- a/lib/csu/powerpc/dot_init.h        Mon Jul 29 21:08:30 2002 +0000
+++ b/lib/csu/powerpc/dot_init.h        Mon Jul 29 21:54:35 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dot_init.h,v 1.1 2001/07/17 12:16:43 tsubai Exp $      */
+/*     $NetBSD: dot_init.h,v 1.2 2002/07/29 21:54:35 matt Exp $        */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -51,18 +51,18 @@
                __asm (                                     \
                ".section "#sect",\"ax\",@progbits      \n" \
                #entry_pt":                             \n" \
-               "       stwu    1,-16(1)                \n" \
-               "       mflr    0                       \n" \
-               "       stw     0,12(1)                 \n" \
+               "       stwu    %r1,-16(%r1)            \n" \
+               "       mflr    %r0                     \n" \
+               "       stw     %r0,12(%r1)             \n" \
                "       /* fall thru */                 \n" \
                ".previous")
 
 #define MD_SECTION_EPILOGUE(sect)                          \
                __asm (                                     \
                ".section "#sect",\"ax\",@progbits      \n" \
-               "       lwz     0,12(1)                 \n" \
-               "       mtlr    0                       \n" \
-               "       la      1,16(1)                 \n" \
+               "       lwz     %r0,12(%r1)             \n" \
+               "       mtlr    %r0                     \n" \
+               "       la      %r1,16(%r1)             \n" \
                "       blr                             \n" \
                ".previous")
 



Home | Main Index | Thread Index | Old Index