diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -169,6 +169,8 @@ /* Restore r10 earlier to avoid doing this multiply times. */ frame->tf_r10 = frame->tf_rcx; + /* Restore %rcx for machine context. */ + frame->tf_rcx = frame->tf_rip; td->td_retval[0] = 0; return (0);