[Bug target/60926] Compiler doesn't properly align stack pointer

gidici61 at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 22 21:29:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926

--- Comment #2 from gidici61 at gmail dot com ---
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.



More information about the Gcc-bugs mailing list