linuxolator/amd64: Don't mangle %r10 on return from syscall for EJUSTRETURN.

This fixes the %r10 content for rt_sigreturn.

Submitted by:	Yanko Yankulov <yanko.yankulov@gmail.com>
MFC after:	1 week
This commit is contained in:
kib 2018-06-14 12:35:57 +00:00
parent a470e72e9a
commit d006eed188

View File

@ -228,7 +228,8 @@ linux_set_syscall_retval(struct thread *td, int error)
* the syscall. So, do not clobber %rdx and %r10.
*/
td->td_retval[1] = frame->tf_rdx;
frame->tf_r10 = frame->tf_rcx;
if (error != EJUSTRETURN)
frame->tf_r10 = frame->tf_rcx;
cpu_set_syscall_retval(td, error);