diff --git a/desmume/src/matrix.h b/desmume/src/matrix.h index a9ec857ea..9478fab4c 100644 --- a/desmume/src/matrix.h +++ b/desmume/src/matrix.h @@ -126,7 +126,7 @@ FORCEINLINE void memset_u16_le(void* dst, u16 val) T1WriteWord((u8*)&u32val,2,val); ////const __m128i temp = _mm_set_epi32(u32val,u32val,u32val,u32val); -#ifdef __INTEL_COMPILER +#if defined(__GNUC__) || defined(__INTEL_COMPILER) const __m128i temp = _mm_set_epi32(u32val,u32val,u32val,u32val); MACRODO_N(NUM/8,_mm_store_si128((__m128i*)((u8*)dst+(X)*16), temp)); #else diff --git a/desmume/src/types.h b/desmume/src/types.h index 27c6e28f6..0fc41753c 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -31,6 +31,15 @@ #define ENABLE_SSE2 #endif +#ifdef __GNUC__ +#ifdef __SSE__ +#define ENABLE_SSE +#endif +#ifdef __SSE2__ +#define ENABLE_SSE2 +#endif +#endif + #ifdef NOSSE #undef ENABLE_SSE #endif