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