aboutsummaryrefslogtreecommitdiff
path: root/simd/arm/neon-compat.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'simd/arm/neon-compat.h.in')
-rw-r--r--simd/arm/neon-compat.h.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/simd/arm/neon-compat.h.in b/simd/arm/neon-compat.h.in
index 23d6d28c..436c402a 100644
--- a/simd/arm/neon-compat.h.in
+++ b/simd/arm/neon-compat.h.in
@@ -23,13 +23,17 @@
#cmakedefine HAVE_VLD1_U16_X2
#cmakedefine HAVE_VLD1Q_U8_X4
-/* Define compiler-independent count-leading-zeros macros */
+/* Define compiler-independent count-leading-zeros and byte-swap macros */
#if defined(_MSC_VER) && !defined(__clang__)
#define BUILTIN_CLZ(x) _CountLeadingZeros(x)
#define BUILTIN_CLZLL(x) _CountLeadingZeros64(x)
+#define BUILTIN_BSWAP32(x) _byteswap_ulong(x)
+#define BUILTIN_BSWAP64(x) _byteswap_uint64(x)
#elif defined(__clang__) || defined(__GNUC__)
#define BUILTIN_CLZ(x) __builtin_clz(x)
#define BUILTIN_CLZLL(x) __builtin_clzll(x)
+#define BUILTIN_BSWAP32(x) __builtin_bswap32(x)
+#define BUILTIN_BSWAP64(x) __builtin_bswap64(x)
#else
#error "Unknown compiler"
#endif