This commit is contained in:
Matheus
2024-05-25 20:35:19 -03:00
parent 3e1d79d5a5
commit 3bcc3e5585
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ arch_context_switch:
xor rsi, rsi ; is syscall? (no)
extern sched_userspacecheck
call sched_userspacecheck ; compiled with no_caller_saved_registers
cli
; rdi is the pointer to the context struct
mov rsp, rdi
+1
View File
@@ -240,6 +240,7 @@ arch_syscall_entry:
mov rcx, rax ; return value
extern sched_userspacecheck ; context, return, errno
call sched_userspacecheck ; compiled with __attribute__((no_caller_saved_registers))
cli
; restore context
add rsp, 32 ; r9 argument, cr2, gs, and fs are not popped.