Commit d1598803 by Quentin Neill Committed by Sebastian Pop

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
parent d1b2ae0d
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>
......@@ -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__ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment