On Wed, Jul 27, 2011 at 10:46:06AM -0700, H.J. Lu wrote: > On Wed, Jul 27, 2011 at 10:26 AM, Kirill Yukhin <kirill.yuk...@gmail.com> > wrote: > > Sharp eye! Thanks. > > Updated patch is attached. > > Guys, with write approval, could you please commit that? > > > > I checked it in for you.
Unfortunately many of the new tests fail with old assembler, because the builtin in check_effective_target_bmi is optimized away (ignored, as well as using constant arguments, two reasons to get rid of it). Fixed thusly, tested on i686-linux and x86_64-linux, both with old and new binutils. Ok for trunk? 2011-07-27 Jakub Jelinek <ja...@redhat.com> * gcc.target/i386/i386.exp (check_effective_target_bmi): Make sure the builtin isn't optimized away. --- gcc/testsuite/gcc.target/i386/i386.exp.jj 2011-07-27 20:18:14.000000000 +0200 +++ gcc/testsuite/gcc.target/i386/i386.exp 2011-07-27 23:20:49.705402014 +0200 @@ -189,9 +189,9 @@ proc check_effective_target_xop { } { # Return 1 if bmi instructions can be compiled. proc check_effective_target_bmi { } { return [check_no_compiler_messages bmi object { - void __bextr_u32 (void) + unsigned int __bextr_u32 (unsigned int __X, unsigned int __Y) { - __builtin_ia32_bextr_u32 (0, 0); + return __builtin_ia32_bextr_u32 (__X, __Y); } } "-mbmi" ] } Jakub