| Submitter | asharif tools |
|---|---|
| Date | Dec. 14, 2010, 3:23 a.m. |
| Message ID | <AANLkTinguPDaq1yfhYXNQ+q1Zxf+OrRGC87tSXmOAitS@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/75460/ |
| State | New |
| Headers | show |
Comments
asharif tools <asharif.tools@gmail.com> writes: > Index: gcc/testsuite/gcc.target/i386/max-stack-align.c > =================================================================== > --- gcc/testsuite/gcc.target/i386/max-stack-align.c (revision 0) > +++ gcc/testsuite/gcc.target/i386/max-stack-align.c (revision 0) > @@ -0,0 +1,14 @@ > +/* { dg-do compile } */ > +/* { dg-options "-fomit-frame-pointer" } */ > +/* { dg-require-effective-target lp64 } */ > + > +void foo() > +{ > + int a=0, b=0, c=0, e=0, f=0, g=0, h=0, i=0; > + __asm__ __volatile__ ("addl %%rbp,%%rbp" > + : "=rbp"(a) > + : "rbp"(b) > + : "rbp" > + ); > +} You should be able to use "=r" and "r" instead of "=rbp" and "rbp". If that works, then this patch is OK. Thanks. Ian
On Mon, Dec 13, 2010 at 08:20:38PM -0800, Ian Lance Taylor wrote: > asharif tools <asharif.tools@gmail.com> writes: > > > Index: gcc/testsuite/gcc.target/i386/max-stack-align.c > > =================================================================== > > --- gcc/testsuite/gcc.target/i386/max-stack-align.c (revision 0) > > +++ gcc/testsuite/gcc.target/i386/max-stack-align.c (revision 0) > > @@ -0,0 +1,14 @@ > > +/* { dg-do compile } */ > > +/* { dg-options "-fomit-frame-pointer" } */ > > +/* { dg-require-effective-target lp64 } */ > > + > > +void foo() > > +{ > > + int a=0, b=0, c=0, e=0, f=0, g=0, h=0, i=0; > > + __asm__ __volatile__ ("addl %%rbp,%%rbp" > > + : "=rbp"(a) > > + : "rbp"(b) > > + : "rbp" > > + ); > > +} > > You should be able to use "=r" and "r" instead of "=rbp" and "rbp". If > that works, then this patch is OK. Also, please try to trim the list of variables (c through i), if you can still reproduce the problem with the testcase. And you can probably use just "" instead of "addl %%rbp,%%rbp". Jakub
Patch
Index: gcc/testsuite/gcc.target/i386/max-stack-align.c =================================================================== --- gcc/testsuite/gcc.target/i386/max-stack-align.c (revision 0) +++ gcc/testsuite/gcc.target/i386/max-stack-align.c (revision 0) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-fomit-frame-pointer" } */ +/* { dg-require-effective-target lp64 } */ + +void foo() +{ + int a=0, b=0, c=0, e=0, f=0, g=0, h=0, i=0; + __asm__ __volatile__ ("addl %%rbp,%%rbp" + : "=rbp"(a) + : "rbp"(b) + : "rbp" + ); +} +