[Bug target/60926] Compiler doesn't properly align stack pointer
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 22 21:31:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to gidici61 from comment #2)
> Register rsp is correctly aligned before "call g1"; let's assume rsp=0xB0.
> "call g1" pushes rip (8 bytes) on the stack. Now rsp=0xA8.
> Then "pushq %rbp" subtracts 8. Now rsp=0xA0.
> "subq $8, %rsp" subtracts 8. Now rsp=0x98
> So before calling g2() rsp is not properly aligned.
call also pushes onto the stack.
More information about the Gcc-bugs
mailing list