diff options
author | Quentin Neill <quentin.neill.gnu@gmail.com> | 2010-11-18 00:10:35 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-11-18 00:10:35 +0000 |
commit | d1598803644378efe0392a019c672302beae1f93 (patch) | |
tree | 653b7d5ea044243a4ead250863cbaf85daa8e443 /gcc | |
parent | d1b2ae0d9c3b5df88b70b7cb19fef633e2dea852 (diff) | |
download | gcc-d1598803644378efe0392a019c672302beae1f93.zip gcc-d1598803644378efe0392a019c672302beae1f93.tar.gz gcc-d1598803644378efe0392a019c672302beae1f93.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/bmiintrin.h | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 162295b..00a4a4b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> diff --git a/gcc/config/i386/bmiintrin.h b/gcc/config/i386/bmiintrin.h index d3b3bbd..225f2ec 100644 --- a/gcc/config/i386/bmiintrin.h +++ b/gcc/config/i386/bmiintrin.h @@ -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__ */ |