diff options
| author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-08-25 07:21:33 +0000 |
|---|---|---|
| committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-08-25 07:21:33 +0000 |
| commit | 2c8f9c2c23e0cafd7b85a7aec969c949349f747c (patch) | |
| tree | 4a488a30801bc68aca7b04ad6cebf406f9c34a69 /clang/lib/Headers/Intrin.h | |
| parent | bc385daaf7d9f2302fe54f17f7b9e2c1febd47e5 (diff) | |
| download | bcm5719-llvm-2c8f9c2c23e0cafd7b85a7aec969c949349f747c.tar.gz bcm5719-llvm-2c8f9c2c23e0cafd7b85a7aec969c949349f747c.zip | |
[X86] Expose the various _rot intrinsics on non-MS platforms
_rotl, _rotwl and _lrotl (and their right-shift counterparts) are official x86
intrinsics, and should be supported regardless of environment. This is in contrast
to _rotl8, _rotl16, and _rotl64 which are MS-specific.
Note that the MS documentation for _lrotl is different from the Intel
documentation. Intel explicitly documents it as a 64-bit rotate, while for MS,
since sizeof(unsigned long) for MSVC is always 4, a 32-bit rotate is implied.
Differential Revision: http://reviews.llvm.org/D12271
llvm-svn: 245923
Diffstat (limited to 'clang/lib/Headers/Intrin.h')
| -rw-r--r-- | clang/lib/Headers/Intrin.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/clang/lib/Headers/Intrin.h b/clang/lib/Headers/Intrin.h index 67c8a63265f..d687ff1f3d5 100644 --- a/clang/lib/Headers/Intrin.h +++ b/clang/lib/Headers/Intrin.h @@ -463,26 +463,6 @@ _rotr16(unsigned short _Value, unsigned char _Shift) { _Shift &= 0xf; return _Shift ? (_Value >> _Shift) | (_Value << (16 - _Shift)) : _Value; } -static __inline__ unsigned int __DEFAULT_FN_ATTRS -_rotl(unsigned int _Value, int _Shift) { - _Shift &= 0x1f; - return _Shift ? (_Value << _Shift) | (_Value >> (32 - _Shift)) : _Value; -} -static __inline__ unsigned int __DEFAULT_FN_ATTRS -_rotr(unsigned int _Value, int _Shift) { - _Shift &= 0x1f; - return _Shift ? (_Value >> _Shift) | (_Value << (32 - _Shift)) : _Value; -} -static __inline__ unsigned long __DEFAULT_FN_ATTRS -_lrotl(unsigned long _Value, int _Shift) { - _Shift &= 0x1f; - return _Shift ? (_Value << _Shift) | (_Value >> (32 - _Shift)) : _Value; -} -static __inline__ unsigned long __DEFAULT_FN_ATTRS -_lrotr(unsigned long _Value, int _Shift) { - _Shift &= 0x1f; - return _Shift ? (_Value >> _Shift) | (_Value << (32 - _Shift)) : _Value; -} static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS _rotl64(unsigned __int64 _Value, int _Shift) { |

