summaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/locore.s
diff options
context:
space:
mode:
authorLuoqi Chen <luoqi@FreeBSD.org>1999-09-07 20:02:24 +0000
committerLuoqi Chen <luoqi@FreeBSD.org>1999-09-07 20:02:24 +0000
commitab6ec55891c11f6dffcc0d8546333c1b8f5cc3e1 (patch)
treed110e6fcffa16ad26f5b0651a5f0d8598eb72653 /sys/amd64/amd64/locore.s
parentaa8fac6c4d3248b4ac1013fb61b9cf910a65ed61 (diff)
downloadsrc-test2-ab6ec55891c11f6dffcc0d8546333c1b8f5cc3e1.tar.gz
src-test2-ab6ec55891c11f6dffcc0d8546333c1b8f5cc3e1.zip
Notes
Diffstat (limited to 'sys/amd64/amd64/locore.s')
-rw-r--r--sys/amd64/amd64/locore.s10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index f2627266353c..ad499bd56a27 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -410,8 +410,6 @@ NON_GPROF_ENTRY(prepare_usermode)
ret /* goto user! */
-#define LCALL(x,y) .byte 0x9a ; .long y ; .word x
-
/*
* Signal trampoline, copied to top of user stack
*/
@@ -421,9 +419,13 @@ NON_GPROF_ENTRY(sigcode)
/* copy at 8(%esp)) */
pushl %eax
pushl %eax /* junk to fake return address */
+ testl $PSL_VM,SC_PS(%eax)
+ jne 1f
+ movl SC_GS(%eax),%gs /* restore %gs */
+1:
movl $SYS_sigreturn,%eax /* sigreturn() */
- LCALL(0x7,0) /* enter kernel with args on stack */
- hlt /* never gets here */
+ int $0x80 /* enter kernel with args on stack */
+2: jmp 2b
ALIGN_TEXT
_esigcode: