Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 Make cpu_switch return the correct value....



details:   https://anonhg.NetBSD.org/src/rev/92301e816b6c
branches:  trunk
changeset: 547103:92301e816b6c
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue May 13 08:26:32 2003 +0000

description:
Make cpu_switch return the correct value. From Stephan Uphoff, PR 21558

diffstat:

 sys/arch/i386/i386/locore.S |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r d78d43a335ee -r 92301e816b6c sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S       Tue May 13 08:07:39 2003 +0000
+++ b/sys/arch/i386/i386/locore.S       Tue May 13 08:26:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.8 2003/04/26 18:13:16 fvdl Exp $  */
+/*     $NetBSD: locore.S,v 1.9 2003/05/13 08:26:32 fvdl Exp $  */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -1853,7 +1853,7 @@
        SET_CURLWP(%edi,%ecx)
 
        /* Skip context switch if same lwp. */
-       movl    $1, %eax
+       movl    $1, %ebx
        cmpl    %edi,%esi
        je      switch_return
 
@@ -1961,7 +1961,7 @@
        je      1f
        movl    %eax,TF_EIP(%ebx)
 1:
-       xor     %eax,%eax
+       xor     %ebx,%ebx
 
 switch_return:
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)     
@@ -1971,6 +1971,8 @@
        call    _C_LABEL(Xspllower)     # process pending interrupts
        addl    $4,%esp
        movl    $IPL_HIGH,CPUVAR(ILEVEL)        # splhigh()
+
+       movl    %ebx,%eax
        
        popl    %edi
        popl    %esi



Home | Main Index | Thread Index | Old Index