On Thu, Jan 16, 2014 at 09:40:33AM -0800, H.J. Lu wrote: > On Thu, Jan 16, 2014 at 9:35 AM, Jakub Jelinek <ja...@redhat.com> wrote: > > On Thu, Jan 16, 2014 at 08:06:07AM -0800, Richard Henderson wrote: > >> On 01/15/2014 01:58 PM, Jakub Jelinek wrote: > >> > On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: > >> >> --- /dev/null > >> >> +++ b/gcc/testsuite/gcc.target/i386/pr54694.c > >> >> @@ -0,0 +1,11 @@ > >> >> +/* { dg-do compile } */ > >> >> +/* { dg-options "-O" } */ > >> >> + > >> >> +register void *hfp __asm__("%ebp"); /* { dg-message "note: for" > >> >> } */ > >> > > >> > Shouldn't that be %rbp for x86_64? Or do we treat it the same? > >> > >> We treat it the same. > > > > BTW, your fix broke the gcc.target/i386/pr9771-1.c > > test on i686-linux, the problem is that main normally dynamically realigns > > the stack. Wonder if the test should be turned into dg-do compile, > > or perhaps a hack like: > > int xmain() __asm__ ("main"); > > int xmain() > > instead of > > int main() > > to avoid the dynamic stack realigning in main (limit the test to *linux* > > then?), supply main written in assembly, something else? > > > > Jakub > > gcc.target/i386/pr9771-1.c has > > register long *B asm ("ebp"); > > It won't work without -maccumulate-outgoing-args.
Actually it does, with the above written hack for main it works all of: -m32 -O2 -fomit-frame-pointer -ffixed-ebp -m32 -O2 -fomit-frame-pointer -ffixed-ebp -maccumulate-outgoing-args -m32 -O2 -fomit-frame-pointer -ffixed-ebp -mno-accumulate-outgoing-args Jakub