summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-05-26 04:29:07 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-05-26 04:29:07 +0000
commit4d19e6d39091900af1dab888dfcffd44727602b6 (patch)
treea35da4899a0c25d76c51caf7f1c82d4e53955897 /sys/arch/i386
parent0ef505cdc154de5c94519b7f6e82cadc294973ce (diff)
optimise one more jmp out of the idle loop; toby@ marco@ ok
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/locore.s19
-rw-r--r--sys/arch/i386/i386/mptramp.s4
2 files changed, 12 insertions, 11 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index df652a97c19..f27a00a8c3a 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.88 2005/05/25 23:17:47 niklas Exp $ */
+/* $OpenBSD: locore.s,v 1.89 2005/05/26 04:29:06 mickey Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1598,22 +1598,23 @@ ENTRY(idle)
movl $IPL_NONE,CPL # spl0()
call _C_LABEL(Xspllower) # process pending interrupts
+ jmp _C_LABEL(idle_start)
ENTRY(idle_loop)
- cli
- cmpl $0,_C_LABEL(whichqs)
- jnz _C_LABEL(idle_exit)
-#if NPCTR > 0 && NAPM == 0
- addl $1,_C_LABEL(pctr_idlcnt)
- adcl $0,_C_LABEL(pctr_idlcnt)+4
-#endif
#if NAPM > 0
call _C_LABEL(apm_cpu_idle)
#else
+#if NPCTR > 0
+ addl $1,_C_LABEL(pctr_idlcnt)
+ adcl $0,_C_LABEL(pctr_idlcnt)+4
+#endif
sti
hlt
#endif
- jmp _C_LABEL(idle_loop)
+ENTRY(idle_start)
+ cli
+ cmpl $0,_C_LABEL(whichqs)
+ jz _C_LABEL(idle_loop)
ENTRY(idle_exit)
sti
diff --git a/sys/arch/i386/i386/mptramp.s b/sys/arch/i386/i386/mptramp.s
index d35b6560c89..82ca28023f5 100644
--- a/sys/arch/i386/i386/mptramp.s
+++ b/sys/arch/i386/i386/mptramp.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: mptramp.s,v 1.2 2004/06/13 21:49:15 niklas Exp $ */
+/* $OpenBSD: mptramp.s,v 1.3 2005/05/26 04:29:06 mickey Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -251,7 +251,7 @@ mp_cont:
call _C_LABEL(cpu_hatch)
HALT(0x33)
xorl %esi,%esi
- jmp _C_LABEL(idle_loop)
+ jmp _C_LABEL(idle_start)
.data
_C_LABEL(mp_pdirpa):