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:
Bananymous 2026-01-19 00:47:00 +02:00
parent 5d62fa3f10
commit a08b9b82a6
2 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,9 @@
.global asm_yield_trampoline .global asm_yield_trampoline
asm_yield_trampoline: asm_yield_trampoline:
movl %esp, %ecx leal 4(%esp), %ecx
movl 4(%esp), %esp movl 4(%esp), %esp
pushl (%ecx) pushl -4(%ecx)
pushl %ecx pushl %ecx
pushl %eax pushl %eax
pushl %ebx pushl %ebx

View File

@ -1,10 +1,10 @@
.global asm_yield_trampoline .global asm_yield_trampoline
asm_yield_trampoline: asm_yield_trampoline:
movq %rsp, %rcx leaq 8(%rsp), %rcx
movq %rdi, %rsp movq %rdi, %rsp
subq $8, %rsp subq $8, %rsp
pushq (%rcx) pushq -8(%rcx)
pushq %rcx pushq %rcx
pushq %rax pushq %rax
pushq %rbx pushq %rbx