Enable sse/sse2 fast path

Apply patch from cwitty to enable sse/sse2 fast path with
gcc. Patch #2860351
This commit is contained in:
riccardom 2009-09-19 19:07:59 +00:00
parent 47910a5264
commit f78ce4e966
2 changed files with 10 additions and 1 deletions

View File

@ -126,7 +126,7 @@ FORCEINLINE void memset_u16_le(void* dst, u16 val)
T1WriteWord((u8*)&u32val,2,val); T1WriteWord((u8*)&u32val,2,val);
////const __m128i temp = _mm_set_epi32(u32val,u32val,u32val,u32val); ////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); const __m128i temp = _mm_set_epi32(u32val,u32val,u32val,u32val);
MACRODO_N(NUM/8,_mm_store_si128((__m128i*)((u8*)dst+(X)*16), temp)); MACRODO_N(NUM/8,_mm_store_si128((__m128i*)((u8*)dst+(X)*16), temp));
#else #else

View File

@ -31,6 +31,15 @@
#define ENABLE_SSE2 #define ENABLE_SSE2
#endif #endif
#ifdef __GNUC__
#ifdef __SSE__
#define ENABLE_SSE
#endif
#ifdef __SSE2__
#define ENABLE_SSE2
#endif
#endif
#ifdef NOSSE #ifdef NOSSE
#undef ENABLE_SSE #undef ENABLE_SSE
#endif #endif