aboutsummaryrefslogtreecommitdiff
path: root/simd/arm/neon-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'simd/arm/neon-compat.h')
-rw-r--r--simd/arm/neon-compat.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/simd/arm/neon-compat.h b/simd/arm/neon-compat.h
index 543d8600..3d77527c 100644
--- a/simd/arm/neon-compat.h
+++ b/simd/arm/neon-compat.h
@@ -25,13 +25,17 @@
#define HAVE_VLD1Q_U8_X4
#endif
-/* 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