Kernel: Cleanup stack alignment assembly
This commit is contained in:
parent
265b4c2b22
commit
99fc7817c6
|
@ -16,9 +16,8 @@ signal_trampoline:
|
||||||
movl 36(%esp), %eax
|
movl 36(%esp), %eax
|
||||||
|
|
||||||
// align stack to 16 bytes
|
// align stack to 16 bytes
|
||||||
movl %esp, %ebx
|
movl %esp, %ebp
|
||||||
andl $0x0F, %ebx
|
andl $-16, %esp
|
||||||
subl %ebx, %esp
|
|
||||||
|
|
||||||
subl $12, %esp
|
subl $12, %esp
|
||||||
pushl %edi
|
pushl %edi
|
||||||
|
@ -26,7 +25,7 @@ signal_trampoline:
|
||||||
addl $16, %esp
|
addl $16, %esp
|
||||||
|
|
||||||
// restore stack
|
// restore stack
|
||||||
addl %ebx, %esp
|
movl %ebp, %esp
|
||||||
popa
|
popa
|
||||||
|
|
||||||
leave
|
leave
|
||||||
|
|
|
@ -27,14 +27,13 @@ signal_trampoline:
|
||||||
movq 120(%rsp), %rax
|
movq 120(%rsp), %rax
|
||||||
|
|
||||||
// align stack to 16 bytes
|
// align stack to 16 bytes
|
||||||
movq %rsp, %rbx
|
movq %rsp, %rbp
|
||||||
andq $0x0F, %rbx
|
andq $-16, %rsp
|
||||||
subq %rbx, %rsp
|
|
||||||
|
|
||||||
call *%rax
|
call *%rax
|
||||||
|
|
||||||
// restore stack
|
// restore stack
|
||||||
addq %rbx, %rsp
|
movq %rbp, %rsp
|
||||||
popq %r15
|
popq %r15
|
||||||
popq %r14
|
popq %r14
|
||||||
popq %r13
|
popq %r13
|
||||||
|
|
Loading…
Reference in New Issue