From 166dec49376850e6458ec258b8c8564f8b7f192b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 10 Oct 2010 07:28:56 +0000 Subject: MFC r213382: In makectx(), always use the tf_rsp from trap frame. %rsp is pushed unconditionally by hardware on the trap. PR: amd64/151167 --- sys/amd64/amd64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 7dfe492c86b6..e3aee9327fb0 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1443,7 +1443,7 @@ makectx(struct trapframe *tf, struct pcb *pcb) pcb->pcb_rbp = tf->tf_rbp; pcb->pcb_rbx = tf->tf_rbx; pcb->pcb_rip = tf->tf_rip; - pcb->pcb_rsp = (ISPL(tf->tf_cs)) ? tf->tf_rsp : (long)(tf + 1) - 8; + pcb->pcb_rsp = tf->tf_rsp; } int -- cgit v1.3