Fix stack alignment
This commit is contained in:
@ -66,7 +66,9 @@
|
||||
_push_regs
|
||||
cld
|
||||
movq %rsp, %rdi
|
||||
sub $0x8, %rsp
|
||||
call intr_handleintr
|
||||
add $0x8, %rsp
|
||||
_pop_regs
|
||||
add $0x10, %rsp
|
||||
iretq
|
||||
|
||||
@ -2,10 +2,7 @@
|
||||
|
||||
.global proc_switch
|
||||
proc_switch:
|
||||
testq %rsi, %rsi
|
||||
je 1f
|
||||
movq %rsi, %cr3
|
||||
1:
|
||||
mov %rdi, %rsp
|
||||
_pop_regs
|
||||
add $0x10, %rsp
|
||||
|
||||
@ -4,4 +4,9 @@
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
xor %rbp, %rbp
|
||||
mov %rsp, %rbp
|
||||
and $-0x10, %rsp
|
||||
sub $0x8, %rsp
|
||||
|
||||
call _premain
|
||||
|
||||
Reference in New Issue
Block a user