fix compile on Mac OS X

pull/2/head
weidai 2010-07-25 21:39:59 +00:00
parent 797192ea60
commit 0e44445b68
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
#include <setjmp.h> #include <setjmp.h>
#endif #endif
#ifdef CRYPTOPP_MSVC6PP_OR_LATER #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
#include <emmintrin.h> #include <emmintrin.h>
#endif #endif
@ -108,7 +108,7 @@ static bool TrySSE2()
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE #if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
AS2(por xmm0, xmm0) // executing SSE2 instruction AS2(por xmm0, xmm0) // executing SSE2 instruction
#elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE #elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
__mm128i x = _mm_setzero_si128(); __m128i x = _mm_setzero_si128();
return _mm_cvtsi128_si32(x) == 0; return _mm_cvtsi128_si32(x) == 0;
#endif #endif
} }
@ -130,7 +130,7 @@ static bool TrySSE2()
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE #if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
__asm __volatile ("por %xmm0, %xmm0"); __asm __volatile ("por %xmm0, %xmm0");
#elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE #elif CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
__mm128i x = _mm_setzero_si128(); __m128i x = _mm_setzero_si128();
result = _mm_cvtsi128_si32(x) == 0; result = _mm_cvtsi128_si32(x) == 0;
#endif #endif
} }