ByteOrder.h: simplify compiler test

* A problem with our gcc requires adding casts for gcc4 when
  the __builtin_bswap functions are used with a format string
* Unlike gcc2, the __builtin_bswap functions do not get disabled
  despite using -fno-builtins, hence added compiler check in
  runtime_loader/utility.cpp
This commit is contained in:
Jessica Hamilton
2014-05-30 00:15:38 +12:00
parent 221ea8a17e
commit 44ec21c3ff
4 changed files with 7 additions and 10 deletions
+1 -5
View File
@@ -120,11 +120,7 @@ extern bool is_type_swapped(type_code type);
/* Private implementations */
extern double __swap_double(double arg);
extern float __swap_float(float arg);
#if (defined(__INTEL__) || defined(__x86_64__)) && GCC_VERSION >= 40300
#define __swap_int64(arg) __builtin_bswap64(arg)
#define __swap_int32(arg) __builtin_bswap32(arg)
#define __swap_int16(arg) __builtin_bswap16(arg)
#elif defined(__ARM__) && GCC_VERSION >= 40800
#if __GNUC__ >= 4
#define __swap_int64(arg) __builtin_bswap64(arg)
#define __swap_int32(arg) __builtin_bswap32(arg)
#define __swap_int16(arg) __builtin_bswap16(arg)