diff options
Diffstat (limited to 'gcc/config/i386/ia32intrin.h')
-rw-r--r-- | gcc/config/i386/ia32intrin.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/config/i386/ia32intrin.h b/gcc/config/i386/ia32intrin.h index 5e7c893fe85..1f728c840e1 100644 --- a/gcc/config/i386/ia32intrin.h +++ b/gcc/config/i386/ia32intrin.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of GCC. @@ -256,11 +256,7 @@ __writeeflags (unsigned long long X) #define _bswap64(a) __bswapq(a) #define _popcnt64(a) __popcntq(a) -#define _lrotl(a,b) __rolq((a), (b)) -#define _lrotr(a,b) __rorq((a), (b)) #else -#define _lrotl(a,b) __rold((a), (b)) -#define _lrotr(a,b) __rord((a), (b)) /* Read flags register */ extern __inline unsigned int @@ -280,6 +276,16 @@ __writeeflags (unsigned int X) #endif +/* On LP64 systems, longs are 64-bit. Use the appropriate rotate + * function. */ +#ifdef __LP64__ +#define _lrotl(a,b) __rolq((a), (b)) +#define _lrotr(a,b) __rorq((a), (b)) +#else +#define _lrotl(a,b) __rold((a), (b)) +#define _lrotr(a,b) __rord((a), (b)) +#endif + #define _bit_scan_forward(a) __bsfd(a) #define _bit_scan_reverse(a) __bsrd(a) #define _bswap(a) __bswapd(a) |