[PATCH] Add testcase for possible bug in gcc-4_4 ix86 branch
Jakub Jelinek
jakub@redhat.com
Mon Dec 13 17:14:00 GMT 2010
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
More information about the Gcc-patches
mailing list