Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/macppc Improve readability of this file by a...



details:   https://anonhg.NetBSD.org/src/rev/03d6f210e4d4
branches:  trunk
changeset: 959400:03d6f210e4d4
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 13 02:17:02 2021 +0000

description:
Improve readability of this file by adding register prefixes.

diffstat:

 sys/arch/macppc/macppc/locore.S |  72 ++++++++++++++++++++--------------------
 1 files changed, 36 insertions(+), 36 deletions(-)

diffs (139 lines):

diff -r b2fcb99995bf -r 03d6f210e4d4 sys/arch/macppc/macppc/locore.S
--- a/sys/arch/macppc/macppc/locore.S   Sat Feb 13 01:51:24 2021 +0000
+++ b/sys/arch/macppc/macppc/locore.S   Sat Feb 13 02:17:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.76 2021/02/13 01:11:58 thorpej Exp $      */
+/*     $NetBSD: locore.S,v 1.77 2021/02/13 02:17:02 thorpej Exp $      */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -83,64 +83,64 @@
 __start:
        bl      _C_LABEL(ofwinit)               /* init OF */
 
-       li      0,0
+       li      %r0,0
 #ifndef FIRMWORKSBUGS
-       mtmsr   0                       /* Disable FPU/MMU/exceptions */
+       mtmsr   %r0                     /* Disable FPU/MMU/exceptions */
 #endif
        isync
 
-       mr      13,6
-       mr      14,7
+       mr      %r13,%r6
+       mr      %r14,%r7
        bl      _C_LABEL(cpu_model_init)        /* init oeacpufeat */
 
 /* compute end of kernel memory */
-       lis     4,_C_LABEL(end)@ha
-       addi    4,4,_C_LABEL(end)@l
+       lis     %r4,_C_LABEL(end)@ha
+       addi    %r4,%r4,_C_LABEL(end)@l
 #if NKSYMS || defined(DDB) || defined(MODULAR)
        /* skip symbol table */
-       mr      6,13
-       mr      7,14
-       cmpwi   6,0
+       mr      %r6,%r13
+       mr      %r7,%r14
+       cmpwi   %r6,0
        beq     1f
-       add     9,6,7                   /* r9 = args + l */
-       lwz     9,-8(9)                 /* esym */
-       cmpwi   9,0
+       add     %r9,%r6,%r7             /* r9 = args + l */
+       lwz     %r9,-8(%r9)             /* esym */
+       cmpwi   %r9,0
        beq     1f
-       mr      4,9
+       mr      %r4,%r9
 1:
 #endif
 
 #if defined (PMAC_G5) || defined (MAMBO)
         /* and clear HID5 DCBZ bits (56/57), need to do this early */
-       mfspr   11,SPR_HID5
-       rldimi  11,0,6,56
+       mfspr   %r11,SPR_HID5
+       rldimi  %r11,%r0,6,56
        sync
-       mtspr   SPR_HID5,11
+       mtspr   SPR_HID5,%r11
        isync
        sync
 
        /* Setup HID1 features, prefetch + i-cacheability controlled by PTE */
-       mfspr   0,SPR_HID1
-       li      11,0x1200
-       sldi    11,11,44
-       or      0,0,11
-       mtspr   SPR_HID1,0
+       mfspr   %r0,SPR_HID1
+       li      %r11,0x1200
+       sldi    %r11,%r11,44
+       or      %r0,%r0,%r11
+       mtspr   SPR_HID1,%r0
        isync
        sync
 
        /* Restore r0 */
-       li      0,0
+       li      %r0,0
 #endif /* PMAC_G5 */
 
 
        /*
         * Initialize cpu_info[0]
         */
-       INIT_CPUINFO(4,1,9,0)
+       INIT_CPUINFO(%r4,%r1,%r9,%r0)
 
-       lis     3,__start@ha
-       addi    3,3,__start@l
-       mr      5,6                     /* args string */
+       lis     %r3,__start@ha
+       addi    %r3,%r3,__start@l
+       mr      %r5,%r6                 /* args string */
        bl      _C_LABEL(initppc)
        bl      _C_LABEL(main)
        b       _C_LABEL(OF_exit)
@@ -150,17 +150,17 @@
        .text
        .globl _C_LABEL(mfhid4)
 _C_LABEL(mfhid4):
-       mfspr   4, SPR_HID4 
-       std     4, 0(3)
+       mfspr   %r4, SPR_HID4 
+       std     %r4, 0(%r3)
        blr
 
 /* Set all 64 bits of HID4 */
        .text
        .globl _C_LABEL(mthid4)
 _C_LABEL(mthid4):
-       ld 4, 0(3)
+       ld %r4, 0(%r3)
        sync
-       mtspr SPR_HID4, 4 
+       mtspr SPR_HID4, %r4 
        isync 
        isync
        blr
@@ -168,11 +168,11 @@
        .text
        .globl _C_LABEL(change_hid4)
 _C_LABEL(change_hid4):
-       mfspr 6, SPR_HID4
-       rldicl 5, 6, 32, 0 
-       ori 5, 5, 0x100
-       rldicl 5, 5, 32, 0 
-       std 5, 0(3)
+       mfspr %r6, SPR_HID4
+       rldicl %r5, %r6, 32, 0 
+       ori %r5, %r5, 0x100
+       rldicl %r5, %r5, 32, 0 
+       std %r5, 0(%r3)
        blr
 #endif
 



Home | Main Index | Thread Index | Old Index