Re-enable SSE2 probes for Solaris

Fix VMAC-64 crash on 32-bit Solaris i86pc
This commit is contained in:
Jeffrey Walton 2020-02-22 16:18:43 -05:00
parent cd16435544
commit 5d68850041
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 7 additions and 9 deletions

View File

@ -511,9 +511,9 @@ void DetectX86Features()
#endif
// Solaris 11 i86pc does not signal SSE support using
// OSXSAVE. We need to probe for SSE support. CR4 and
// bit 18 is not available to userland.
// TODO: cut something in when testing is available.
// OSXSAVE. We need to probe for SSE support.
if (g_hasSSE2 == false)
g_hasSSE2 = CPU_ProbeSSE2();
if (g_hasSSE2 == false)
goto done;

View File

@ -207,7 +207,6 @@ void VMAC_Base::VHASH_Update_SSE2(const word64 *data, size_t blocksRemainingInWo
#ifdef __GNUC__
__asm__ __volatile__
(
AS1( push %%ebx)
AS1( push %0) // L1KeyLength
AS1( pop %%ebx)
INTEL_NOPREFIX
@ -429,11 +428,10 @@ void VMAC_Base::VHASH_Update_SSE2(const word64 *data, size_t blocksRemainingInWo
AS1( emms)
#ifdef __GNUC__
ATT_PREFIX
AS1( pop %%ebx)
:
: "m" (L1KeyLength), "c" (blocksRemainingInWord64), "S" (data),
"D" (nhK+tagPart*2), "d" (m_isFirstBlock), "a" (polyS+tagPart*4)
: "esp", "memory", "cc"
: "ebx", "memory", "cc"
);
#endif
}