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:
Sebastian Sumpf 2019-05-24 13:41:20 +02:00 committed by Christian Helmuth
parent fc68e97e4a
commit 5611020f33
1 changed files with 0 additions and 1 deletions

View File

@ -152,7 +152,6 @@ __gdt:
inc %rcx
mulq %rcx
movq %rax, %rcx
subq $8, %rcx
leaq __bootstrap_stack@GOTPCREL(%rip),%rax
movq (%rax), %rsp
addq %rcx, %rsp