sse4.2: protect against macros already being defined
GCC and clang (at least) but all the SSE4 stuff in smmintrin.h and
nmmintrin.h is just an empty shell which includes smmintrin.h.
@@ -74,7 +74,7 @@ SIMDE_BEGIN_DECLS_
#define SIMDE_SIDD_UNIT_MASK 0x40
#endif
-#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES)
+#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES) && !defined(_SIDD_UBYTE_OPS)
#define _SIDD_UBYTE_OPS SIMDE_SIDD_UBYTE_OPS
#define _SIDD_UWORD_OPS SIMDE_SIDD_UWORD_OPS
#define _SIDD_SBYTE_OPS SIMDE_SIDD_SBYTE_OPS
@@ -109,6 +109,7 @@ int simde_mm_cmpestrs (simde__m128i a, int la, simde__m128i b, int lb, const int
#define simde_mm_cmpestrs(a, la, b, lb, imm8) _mm_cmpestrs(a, la, b, lb, imm8)
#endif
#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES)
+ #undef _mm_cmpestrs
#define _mm_cmpestrs(a, la, b, lb, imm8) simde_mm_cmpestrs(a, la, b, lb, imm8)
#endif
@@ -128,6 +129,7 @@ int simde_mm_cmpestrz (simde__m128i a, int la, simde__m128i b, int lb, const int
#define simde_mm_cmpestrz(a, la, b, lb, imm8) _mm_cmpestrz(a, la, b, lb, imm8)
#endif
#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES)
+ #undef _mm_cmpestrz
#define _mm_cmpestrz(a, la, b, lb, imm8) simde_mm_cmpestrz(a, la, b, lb, imm8)
#endif
@@ -159,6 +161,7 @@ simde_mm_cmpgt_epi64 (simde__m128i a, simde__m128i b) {
#endif
}
#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES)
+ #undef _mm_cmpgt_epi64
#define _mm_cmpgt_epi64(a, b) simde_mm_cmpgt_epi64(a, b)
#endif
@@ -199,6 +202,7 @@ simde_mm_cmpistrs_16_(simde__m128i a) {
: simde_mm_cmpistrs_8_((a)))
#endif
#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES)
+ #undef _mm_cmpistrs
#define _mm_cmpistrs(a, b, imm8) simde_mm_cmpistrs(a, b, imm8)
#endif
@@ -239,6 +243,7 @@ simde_mm_cmpistrz_16_(simde__m128i b) {
: simde_mm_cmpistrz_8_((b)))
#endif
#if defined(SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES)
+ #undef _mm_cmpistrz
#define _mm_cmpistrz(a, b, imm8) simde_mm_cmpistrz(a, b, imm8)
#endif
