This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/53383] Allow -mpreferred-stack-boundary=3 on x86-64


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

--- Comment #12 from Jan Hubicka <hubicka at ucw dot cz> 2012-05-20 10:15:06 UTC ---
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
> 
> --- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2012-05-20 02:04:40 UTC ---
> (In reply to comment #10)
> > The problem is va_args doing alignment based on stack pointer, i.e. in:
> > int
> >
> >   return va_arg (p, __int128);
> > }
> > 
> 
> >         addq    $15, %rax
> >         andq    $-16, %rax
> 
> This isn't necessary.  If __int128 is put on stack by caller,
> the stack must be aligned at 16 bytes.

Not when you call function with -fpreferred-stack-boundary=3
and it is itself compiled with -fpreferred-stack-boudnary=4
and calls another functions passing __int128.
Thus the ABI incompatibility.
Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]