diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/compiler-gcc4.h | 10 | ||||
| -rw-r--r-- | include/linux/compiler-intel.h | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 412bc6c2b023..dc16a858e77c 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -63,3 +63,13 @@ | |||
| 63 | #define __compiletime_warning(message) __attribute__((warning(message))) | 63 | #define __compiletime_warning(message) __attribute__((warning(message))) |
| 64 | #define __compiletime_error(message) __attribute__((error(message))) | 64 | #define __compiletime_error(message) __attribute__((error(message))) |
| 65 | #endif | 65 | #endif |
| 66 | |||
| 67 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
| 68 | #if __GNUC_MINOR__ >= 4 | ||
| 69 | #define __HAVE_BUILTIN_BSWAP32__ | ||
| 70 | #define __HAVE_BUILTIN_BSWAP64__ | ||
| 71 | #endif | ||
| 72 | #if __GNUC_MINOR__ >= 8 || (defined(__powerpc__) && __GNUC_MINOR__ >= 6) | ||
| 73 | #define __HAVE_BUILTIN_BSWAP16__ | ||
| 74 | #endif | ||
| 75 | #endif | ||
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h index d8e636e5607d..973ce10c40b6 100644 --- a/include/linux/compiler-intel.h +++ b/include/linux/compiler-intel.h | |||
| @@ -29,3 +29,10 @@ | |||
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | #define uninitialized_var(x) x | 31 | #define uninitialized_var(x) x |
| 32 | |||
| 33 | #ifndef __HAVE_BUILTIN_BSWAP16__ | ||
| 34 | /* icc has this, but it's called _bswap16 */ | ||
| 35 | #define __HAVE_BUILTIN_BSWAP16__ | ||
| 36 | #define __builtin_bswap16 _bswap16 | ||
| 37 | #endif | ||
| 38 | |||
