aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2002-11-22 00:23:02 +0000
committerJulian Elischer <julian@FreeBSD.org>2002-11-22 00:23:02 +0000
commitc2f7aa6939c1466a4a9037abebeaa91b6c9e12f5 (patch)
tree34f11206334ad12eaddc59ca951622a6f95b5654 /tools
parent16d7acae14d91e9435577c1d286390d8b2d473c9 (diff)
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/KSE/ksetest/kse_asm.S19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/KSE/ksetest/kse_asm.S b/tools/KSE/ksetest/kse_asm.S
index d568988a71414..79859d8d60a0d 100644
--- a/tools/KSE/ksetest/kse_asm.S
+++ b/tools/KSE/ksetest/kse_asm.S
@@ -62,7 +62,7 @@ ENTRY(uts_to_thread)
movl $-1, %eax /* bzzzt, invalid context */
jmp 5f
2: movl 8(%esp), %eax /* get address of curthreadp */
- movl %edx, (%eax) /* we're now the current thread */
+ movl %edx, %ebx /* save the pointer for later */
/*
* From here on, we don't touch the old stack.
*/
@@ -85,14 +85,15 @@ ENTRY(uts_to_thread)
jmp 4f
3: fninit
fldcw MC_FP_CW_OFFSET(%edx)
-4: movl 48(%edx), %eax /* restore ax, bx, cx */
- movl 36(%edx), %ebx
- movl 44(%edx), %ecx
- pushl 68(%edx) /* flags on stack */
- pushl 40(%edx) /* %edx on stack */
- popl %edx /* %edx off stack */
- popf /* flags off stack */
-5: ret /* %eip off stack */
+4: pushl 68(%edx) /* flags */
+ pushl 48(%edx) /* eax */
+ pushl 36(%edx) /* ebx */
+ movl 40(%edx), %edx /* edx */
+ movl %ebx, (%eax) /* <---- set new mailbox pointer */
+ popl %ebx
+ popl %eax
+ popf
+5: ret
/*
* int thread_to_uts(struct kse_thr_mailbox *tm, struct kse_mailbox *km);