g_hasISSE -> h_hasSSE. That's how old this function is...
parent
11eb9957d4
commit
a56f07709e
6
cpu.cpp
6
cpu.cpp
|
|
@ -143,7 +143,7 @@ static bool TrySSE2()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool g_x86DetectionDone = false;
|
bool g_x86DetectionDone = false;
|
||||||
bool g_hasISSE = false, g_hasSSE2 = false, g_hasSSSE3 = false, g_hasMMX = false, g_hasAESNI = false, g_hasCLMUL = false, g_isP4 = false;
|
bool g_hasSSE = false, g_hasSSE2 = false, g_hasSSSE3 = false, g_hasMMX = false, g_hasAESNI = false, g_hasCLMUL = false, g_isP4 = false;
|
||||||
word32 g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE;
|
word32 g_cacheLineSize = CRYPTOPP_L1_CACHE_LINE_SIZE;
|
||||||
|
|
||||||
void DetectX86Features()
|
void DetectX86Features()
|
||||||
|
|
@ -162,7 +162,7 @@ void DetectX86Features()
|
||||||
g_hasCLMUL = g_hasSSE2 && (cpuid1[2] & (1<<1));
|
g_hasCLMUL = g_hasSSE2 && (cpuid1[2] & (1<<1));
|
||||||
|
|
||||||
if ((cpuid1[3] & (1 << 25)) != 0)
|
if ((cpuid1[3] & (1 << 25)) != 0)
|
||||||
g_hasISSE = true;
|
g_hasSSE = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
word32 cpuid2[4];
|
word32 cpuid2[4];
|
||||||
|
|
@ -170,7 +170,7 @@ void DetectX86Features()
|
||||||
if (cpuid2[0] >= 0x080000001)
|
if (cpuid2[0] >= 0x080000001)
|
||||||
{
|
{
|
||||||
CpuId(0x080000001, cpuid2);
|
CpuId(0x080000001, cpuid2);
|
||||||
g_hasISSE = (cpuid2[3] & (1 << 22)) != 0;
|
g_hasSSE = (cpuid2[3] & (1 << 22)) != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
4
cpu.h
4
cpu.h
|
|
@ -117,7 +117,7 @@ inline bool HasMMX() {return true;}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
extern CRYPTOPP_DLL bool g_hasSSE2;
|
extern CRYPTOPP_DLL bool g_hasSSE2;
|
||||||
extern CRYPTOPP_DLL bool g_hasISSE;
|
extern CRYPTOPP_DLL bool g_hasSSE;
|
||||||
extern CRYPTOPP_DLL bool g_hasMMX;
|
extern CRYPTOPP_DLL bool g_hasMMX;
|
||||||
|
|
||||||
inline bool HasSSE2()
|
inline bool HasSSE2()
|
||||||
|
|
@ -131,7 +131,7 @@ inline bool HasSSE()
|
||||||
{
|
{
|
||||||
if (!g_x86DetectionDone)
|
if (!g_x86DetectionDone)
|
||||||
DetectX86Features();
|
DetectX86Features();
|
||||||
return g_hasISSE;
|
return g_hasSSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool HasMMX()
|
inline bool HasMMX()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue