mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
arch/x64:Fix the issue where RFLAGS is not restored after a syscall return
When a syscall is invoked, the RFLAGS register is saved into R11. It must be restored before returning Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
This commit is contained in:
@@ -696,6 +696,10 @@ no_kstack_switch:
|
||||
|
||||
syscall_no_ring3:
|
||||
# endif
|
||||
/* Restore the value of RFLAGS from R11 */
|
||||
pushq %r11
|
||||
popfq
|
||||
|
||||
/* Return to address pointed in RCX - must be on stack */
|
||||
pushq %rcx
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user