Source-Changes-HG archive

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

[src/nathanw_sa]: src/sys/arch/arm/arm32 More register usage tweaks to reduce...



details:   https://anonhg.NetBSD.org/src/rev/ae32d363bab2
branches:  nathanw_sa
changeset: 506144:ae32d363bab2
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Aug 12 20:34:50 2002 +0000

description:
More register usage tweaks to reduce differences with trunk.

diffstat:

 sys/arch/arm/arm32/cpuswitch.S |  17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diffs (67 lines):

diff -r d8069784c2ed -r ae32d363bab2 sys/arch/arm/arm32/cpuswitch.S
--- a/sys/arch/arm/arm32/cpuswitch.S    Mon Aug 12 20:21:25 2002 +0000
+++ b/sys/arch/arm/arm32/cpuswitch.S    Mon Aug 12 20:34:50 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpuswitch.S,v 1.3.2.16 2002/08/12 20:21:25 thorpej Exp $       */
+/*     $NetBSD: cpuswitch.S,v 1.3.2.17 2002/08/12 20:34:50 thorpej Exp $       */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -236,15 +236,12 @@
        /* Enable interrupts */
        IRQenable
 
-       /* XXX - r1 needs to be preserved for cpu_switch */
-       mov     r7, r1
        ldr     r3, Lcpufuncs
        mov     r0, #0
        add     lr, pc, #Lidle_slept - . - 8
        ldr     pc, [r3, #CF_SLEEP]
 
 Lidle_slept:
-       mov     r1, r7
 
        /* Disable interrupts while we check for an active queue */
        IRQdisable
@@ -308,12 +305,9 @@
        /* Push the old spl level onto the stack */
        str     r0, [sp, #-0x0004]!
 
-       /* put old proc back in r1 */
-       mov     r1, r5
-
        /* First phase : find a new lwp */
 
-       /* rem: r1 = old lwp */
+       /* rem: r5 = old lwp */
 
 Lswitch_search:
        IRQdisable
@@ -327,6 +321,9 @@
        beq     _ASM_LABEL(idle)
 Lidle_ret:
 
+       /* put old proc back in r1 */
+       mov     r1, r5
+
        /* rem: r1 = old lwp */
        /* rem: r3 = whichqs */
        /* rem: interrupts are disabled */
@@ -778,7 +775,7 @@
        ldr     r1, Lcurlwp
        str     r0, [r1]
 
-       mov     r1, #0x00000000         /* r1 = old lwp = NULL */
+       mov     r5, #0x00000000         /* r5 = old lwp = NULL */
        b       Lswitch_search
 
 /*
@@ -857,7 +854,7 @@
        mov     r0, #0x00000000
        str     r0, [r1]
 
-       mov     r1, #0x00000000         /* r1 = old lwp = NULL */
+       mov     r5, #0x00000000         /* r5 = old lwp = NULL */
        b       Lswitch_search
 
 /* LINTSTUB: Func: void savectx(struct pcb *pcb) */



Home | Main Index | Thread Index | Old Index