http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #11 from H.J. Lu ---
(In reply to gidici61 from comment #8)
> (In reply to H.J. Lu from comment #7)
> > Since GCC finds out that g2 only needs 8 byte stack alignment,
> > it only needs to align stack to 8 byte when calling g2.
>
> Tha
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #10 from gidici61 at gmail dot com ---
(In reply to gidici61 from comment #9)
> I apologize. I forgot to specify that I used a 64 bit version of OS.
I should have written "System V ABi x86-64".
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #9 from gidici61 at gmail dot com ---
I apologize. I forgot to specify that I used a 64 bit version of OS.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #8 from gidici61 at gmail dot com ---
(In reply to H.J. Lu from comment #7)
> Since GCC finds out that g2 only needs 8 byte stack alignment,
> it only needs to align stack to 8 byte when calling g2.
Thank you. So this should be an exce
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #7 from H.J. Lu ---
Since GCC finds out that g2 only needs 8 byte stack alignment,
it only needs to align stack to 8 byte when calling g2.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #6 from gidici61 at gmail dot com ---
I don't understand why the addition of "putchar(p1)" in g2() C code changes
"subq $8, %rsp" to "subq $16 %rsp", while all the other assembler code remain
unchanged.
So, if the second ("subq $16 %rsp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #5 from gidici61 at gmail dot com ---
Please see also:
http://stackoverflow.com/questions/22941372/gcc-4-7-2-in-debian-wheezy-doesnt-always-properly-align-stack-pointer-is-this/23055211#23055211
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #4 from gidici61 at gmail dot com ---
(In reply to Andrew Pinski from comment #3)
> (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)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60926
--- Comment #3 from Andrew Pinski ---
(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
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" s
10 matches
Mail list logo