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:
Konstantin Belousov 2018-06-14 12:35:57 +00:00
parent ef8dcce3c2
commit 459ccd3c5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335135

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);