hw: fix stack alignment in bootstrap for x86_64
Fix initial stack pointer alignment for x86_64 in crt0.s startup code of bootstrap. SysV ABI states that upon function entry (rsp + 8) % 16 = 0. There, we have to align the stack to 16 bytes before all 'call' instruction not 8. Otherwise FPU (GP) exception might be raised later on because of unaligned FPU accesses. issue #3365
This commit is contained in:
parent
fc68e97e4a
commit
5611020f33
|
@ -152,7 +152,6 @@ __gdt:
|
||||||
inc %rcx
|
inc %rcx
|
||||||
mulq %rcx
|
mulq %rcx
|
||||||
movq %rax, %rcx
|
movq %rax, %rcx
|
||||||
subq $8, %rcx
|
|
||||||
leaq __bootstrap_stack@GOTPCREL(%rip),%rax
|
leaq __bootstrap_stack@GOTPCREL(%rip),%rax
|
||||||
movq (%rax), %rsp
|
movq (%rax), %rsp
|
||||||
addq %rcx, %rsp
|
addq %rcx, %rsp
|
||||||
|
|
Loading…
Reference in New Issue