re PR testsuite/46422 (FAIL: g++.dg/other/i386-?.C)

Fix PR target/46422.

2010-11-17  Quentin Neill  <quentin.neill.gnu@gmail.com>

	PR target/46422
	* config/i386/bmiintrin.h (__lzcnt_u16, __lzcnt_u32, __lzcnt_u64):
	Call the clz builtin.

From-SVN: r166889
This commit is contained in:
Quentin Neill 2010-11-18 00:10:35 +00:00 committed by Sebastian Pop
parent d1b2ae0d9c
commit d159880364
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2010-11-17 Quentin Neill <quentin.neill.gnu@gmail.com>
PR target/46422
* config/i386/bmiintrin.h (__lzcnt_u16, __lzcnt_u32, __lzcnt_u64):
Call the clz builtin.
2010-11-17 Dinar Temirbulatov <dtemirbulatov@gmail.com>
Steve Ellcey <sje@cup.hp.com>

View File

@ -35,13 +35,13 @@
extern __inline unsigned short __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__lzcnt_u16 (unsigned short __X)
{
return __builtin_ia32_lzcnt_u16 (__X);
return __builtin_clzs (__X);
}
extern __inline unsigned short __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__tzcnt_u16 (unsigned short __X)
{
return __builtin_ctzs(__X);
return __builtin_ctzs (__X);
}
@ -82,14 +82,14 @@ __blsr_u32 (unsigned int __X)
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__lzcnt_u32 (unsigned int __X)
{
return __builtin_ia32_lzcnt_u32 (__X);
return __builtin_clz (__X);
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__tzcnt_u32 (unsigned int __X)
{
return __builtin_ctz(__X);
return __builtin_ctz (__X);
}
@ -131,13 +131,13 @@ __blsr_u64 (unsigned long long __X)
extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__lzcnt_u64 (unsigned long long __X)
{
return __builtin_ia32_lzcnt_u64 (__X);
return __builtin_clzll (__X);
}
extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__tzcnt_u64 (unsigned long long __X)
{
return __builtin_ctzll(__X);
return __builtin_ctzll (__X);
}
#endif /* __x86_64__ */