Kernel: Fix signal trampoline
32 bit did not even support it and 64 bit did not align stack
This commit is contained in:
@@ -23,12 +23,18 @@ signal_trampoline:
|
||||
pushq %r14
|
||||
pushq %r15
|
||||
|
||||
// This is 16 byte aligned
|
||||
|
||||
movq 128(%rsp), %rdi
|
||||
movq 120(%rsp), %rax
|
||||
|
||||
// align stack to 16 bytes
|
||||
movq %rsp, %rbx
|
||||
andq $0x0F, %rbx
|
||||
subq %rbx, %rsp
|
||||
|
||||
call *%rax
|
||||
|
||||
// restore stack
|
||||
addq %rbx, %rsp
|
||||
popq %r15
|
||||
popq %r14
|
||||
popq %r13
|
||||
|
||||
Reference in New Issue
Block a user