Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Make a slight tweak to register usage to ...



details:   https://anonhg.NetBSD.org/src/rev/120669a61274
branches:  trunk
changeset: 535231:120669a61274
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Aug 12 19:33:01 2002 +0000

description:
Make a slight tweak to register usage to save an instruction.

diffstat:

 sys/arch/arm/arm32/cpuswitch.S |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (50 lines):

diff -r 97a7d917300f -r 120669a61274 sys/arch/arm/arm32/cpuswitch.S
--- a/sys/arch/arm/arm32/cpuswitch.S    Mon Aug 12 18:47:07 2002 +0000
+++ b/sys/arch/arm/arm32/cpuswitch.S    Mon Aug 12 19:33:01 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpuswitch.S,v 1.9 2002/08/06 19:20:29 thorpej Exp $    */
+/*     $NetBSD: cpuswitch.S,v 1.10 2002/08/12 19:33:01 thorpej Exp $   */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -292,8 +292,8 @@
        ldr     r7, Lcurpcb
        str     r0, [r7]
 
-       /* stash the old proc */
-       mov     r7, r1
+       /* stash the old proc while we call functions */
+       mov     r5, r1
 
 #if defined(LOCKDEBUG)
        /* release the sched_lock before handling interrupts */
@@ -316,20 +316,16 @@
        /* Push the old spl level onto the stack */
        str     r0, [sp, #-0x0004]!
 
-       mov     r5, r7
-
        /* First phase : find a new process */
 
        /* rem: r5 = old proc */
 
-
 Lswitch_search:
        IRQdisable
 #if defined(LOCKDEBUG)
        bl      _C_LABEL(sched_lock_idle)
 #endif
 
-
        /* Do we have any active queues  */
        ldr     r7, Lwhichqs
        ldr     r3, [r7]
@@ -339,7 +335,7 @@
        beq     _ASM_LABEL(idle)
 Lidle_ret:
 
-       /* restore old proc */
+       /* put old proc back in r1 */
        mov     r1, r5
 
        /* rem: r1 = old proc */



Home | Main Index | Thread Index | Old Index