Message ID | AANLkTikBn5rJSmTvTiaufxjbEJnf3GfzkrYcVsJR1LYf@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Dec 7, 2010 at 20:32, asharif tools <asharif.tools@gmail.com> wrote: > 2010-12-7 Ahmad Sharif <asharif.tools@gmail.com> > > * gcc.target/i386/max-stack-align.c: New. OK if this passes on trunk. Diego.
On Thu, Dec 09, 2010 at 11:16:12AM -0500, Diego Novillo wrote: > On Tue, Dec 7, 2010 at 20:32, asharif tools <asharif.tools@gmail.com> wrote: > > > 2010-12-7 Ahmad Sharif <asharif.tools@gmail.com> > > > > * gcc.target/i386/max-stack-align.c: New. > > OK if this passes on trunk. It doesn't on i386, but it has been apparently committed. void foo() { int a, b, c, e, f, g, h, i; __asm__ volatile( " jb 1b \n\t" : : "c" (a), "d" (a), "S" (a), "D" (a), "r" (a), "a" (a) ,"r" (a), "r" (a) : "%""rbp" ); } %rbp there looks x86-64ish, was the testcase meant just for x86-64 and not i?86? Then you'd need to add { target lp64 } requirement. jb 1b when no 1: label is defined is only weird, you shouldn't put anything in there probably, preferrably not garbage as is done. The variables are all uninitialized, so the whole testcase is very questionable. And on i386 it expectedly fails with (%esp is reserved, %ebx on some targets that default to -fpic, or if -fpic is used in board flags, then you request another 8 registers (while i386 has just 8 in total)): /usr/src/gcc/gcc/testsuite/gcc.target/i386/max-stack-align.c: In function 'foo': /usr/src/gcc/gcc/testsuite/gcc.target/i386/max-stack-align.c:7:8: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' /usr/src/gcc/gcc/testsuite/gcc.target/i386/max-stack-align.c:7:8: error: 'asm' operand has impossible constraints Jakub
On Mon, Dec 13, 2010 at 9:00 AM, Jakub Jelinek <jakub@redhat.com> wrote: > On Thu, Dec 09, 2010 at 11:16:12AM -0500, Diego Novillo wrote: >> On Tue, Dec 7, 2010 at 20:32, asharif tools <asharif.tools@gmail.com> wrote: >> >> > 2010-12-7 Ahmad Sharif <asharif.tools@gmail.com> >> > >> > * gcc.target/i386/max-stack-align.c: New. >> >> OK if this passes on trunk. > > It doesn't on i386, but it has been apparently committed. > void foo() > { > int a, b, c, e, f, g, h, i; > __asm__ volatile( " jb 1b \n\t" > : : "c" (a), "d" (a), "S" (a), "D" (a), > "r" (a), "a" (a) ,"r" (a), "r" (a) > : "%""rbp" ); > } > > %rbp there looks x86-64ish, was the testcase meant just for x86-64 and not > i?86? Then you'd need to add { target lp64 } requirement. > > jb 1b when no 1: label is defined is only weird, you shouldn't put anything > in there probably, preferrably not garbage as is done. The variables are > all uninitialized, so the whole testcase is very questionable. > > And on i386 it expectedly fails with (%esp is reserved, %ebx on some targets > that default to -fpic, or if -fpic is used in board flags, then you > request another 8 registers (while i386 has just 8 in total)): > > /usr/src/gcc/gcc/testsuite/gcc.target/i386/max-stack-align.c: In function 'foo': > /usr/src/gcc/gcc/testsuite/gcc.target/i386/max-stack-align.c:7:8: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' > /usr/src/gcc/gcc/testsuite/gcc.target/i386/max-stack-align.c:7:8: error: 'asm' operand has impossible constraints > This is: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46895
diff --git a/gcc-4.4.3/gcc/testsuite/gcc.target/i386/max-stack-align.c b/ new file mode 100644 index 0000000..06e8a5e --- /dev/null +++ b/gcc-4.4.3/gcc/testsuite/gcc.target/i386/max-stack-align.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-fomit-frame-pointer" } */ + +void foo() +{ + int a, b, c, e, f, g, h, i; + __asm__ volatile( " jb 1b \n\t" + : : "c" (a), "d" (a), "S" (a), "D" (a), "r" (a), "a" (a) ,"r" (a), "r" (a) + : "%""rbp" ); +}