summaryrefslogtreecommitdiffstats
path: root/sys/mips/mips/swtch.S
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-07-15 01:47:47 +0000
committerimp <imp@FreeBSD.org>2010-07-15 01:47:47 +0000
commit51a5ce204352b0d083412c214df7b5fa2bf9d41a (patch)
tree793ed2943f99db9ff014f61b2aaa28959b2adfd4 /sys/mips/mips/swtch.S
parent5cf2e8608d754524c56bea2a01e94041cdc91dd6 (diff)
downloadFreeBSD-src-51a5ce204352b0d083412c214df7b5fa2bf9d41a.zip
FreeBSD-src-51a5ce204352b0d083412c214df7b5fa2bf9d41a.tar.gz
Remove one layer of indirection. No need to call cpu_throw which then
calls mips_cpu_call via an obfuscated assembler call. Instead, delete the current cpu_throw, and rename mips_cpu_throw to cpu_throw. This is nicer to the cache on each context switch (since fixed jumps can be prefected, while jumps through a register can't). Incidentally, it also saves about 5 or 6 instructions. Reviewed by: jmallet@
Diffstat (limited to 'sys/mips/mips/swtch.S')
-rw-r--r--sys/mips/mips/swtch.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/mips/mips/swtch.S b/sys/mips/mips/swtch.S
index 0b30570..b83b8b8 100644
--- a/sys/mips/mips/swtch.S
+++ b/sys/mips/mips/swtch.S
@@ -216,7 +216,7 @@ LEAF(savectx)
move v0, zero
END(savectx)
-NON_LEAF(mips_cpu_throw, CALLFRAME_SIZ, ra)
+NON_LEAF(cpu_throw, CALLFRAME_SIZ, ra)
mfc0 t0, MIPS_COP_0_STATUS # t0 = saved status register
nop
nop
@@ -227,7 +227,7 @@ NON_LEAF(mips_cpu_throw, CALLFRAME_SIZ, ra)
# thread's context, so jump
# right to action
nop # BDSLOT
-END(mips_cpu_throw)
+END(cpu_throw)
/*
* cpu_switch(struct thread *old, struct thread *new, struct mutex *mtx);
OpenPOWER on IntegriCloud