Kernel: Fix yield stack pointer value
Stack pointer was pointing to value of return address on return instead of past it. This did not affect anything as ig Processor::yield() didn't use stack after calling the trampoline
This commit is contained in:
parent
5d62fa3f10
commit
a08b9b82a6
|
|
@ -1,9 +1,9 @@
|
|||
.global asm_yield_trampoline
|
||||
asm_yield_trampoline:
|
||||
movl %esp, %ecx
|
||||
leal 4(%esp), %ecx
|
||||
movl 4(%esp), %esp
|
||||
|
||||
pushl (%ecx)
|
||||
pushl -4(%ecx)
|
||||
pushl %ecx
|
||||
pushl %eax
|
||||
pushl %ebx
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
.global asm_yield_trampoline
|
||||
asm_yield_trampoline:
|
||||
movq %rsp, %rcx
|
||||
leaq 8(%rsp), %rcx
|
||||
movq %rdi, %rsp
|
||||
|
||||
subq $8, %rsp
|
||||
pushq (%rcx)
|
||||
pushq -8(%rcx)
|
||||
pushq %rcx
|
||||
pushq %rax
|
||||
pushq %rbx
|
||||
|
|
|
|||
Loading…
Reference in New Issue