summaryrefslogtreecommitdiff
path: root/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpu.h')
-rwxr-xr-xcpu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpu.h b/cpu.h
index 6eae489..bec63fd 100755
--- a/cpu.h
+++ b/cpu.h
@@ -16,6 +16,7 @@ NAMESPACE_BEGIN(CryptoPP)
// these should not be used directly
extern CRYPTOPP_DLL bool g_x86DetectionDone;
extern CRYPTOPP_DLL bool g_hasSSE2;
+extern CRYPTOPP_DLL bool g_hasISSE;
extern CRYPTOPP_DLL bool g_hasMMX;
extern CRYPTOPP_DLL bool g_hasSSSE3;
extern CRYPTOPP_DLL bool g_isP4;
@@ -26,6 +27,7 @@ CRYPTOPP_DLL bool CpuId(word32 input, word32 *output);
#if CRYPTOPP_BOOL_X64
inline bool HasSSE2() {return true;}
+inline bool HasISSE() {return true;}
inline bool HasMMX() {return true;}
#else
@@ -36,6 +38,13 @@ inline bool HasSSE2()
return g_hasSSE2;
}
+inline bool HasISSE()
+{
+ if (!g_x86DetectionDone)
+ DetectX86Features();
+ return g_hasISSE;
+}
+
inline bool HasMMX()
{
if (!g_x86DetectionDone)
@@ -79,9 +88,11 @@ inline bool IsP4() {return false;}
// assume MMX and SSE2 if intrinsics are enabled
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_X64
inline bool HasSSE2() {return true;}
+inline bool HasISSE() {return true;}
inline bool HasMMX() {return true;}
#else
inline bool HasSSE2() {return false;}
+inline bool HasISSE() {return false;}
inline bool HasMMX() {return false;}
#endif