mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 01:49:41 +00:00
Re-enable SSE2 probes for Solaris
Fix VMAC-64 crash on 32-bit Solaris i86pc
This commit is contained in:
parent
cd16435544
commit
5d68850041
6
cpu.cpp
6
cpu.cpp
@ -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;
|
||||
|
4
vmac.cpp
4
vmac.cpp
@ -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
|
||||
}
|
||||
|
6
vmac.h
6
vmac.h
@ -68,10 +68,10 @@ protected:
|
||||
/// \tparam T_BlockCipher block cipher
|
||||
/// \tparam T_DigestBitSize digest size, in bits
|
||||
/// \details VMAC is a block cipher-based message authentication code algorithm
|
||||
/// using a universal hash proposed by Ted Krovetz and Wei Dai in April 2007. The
|
||||
/// algorithm was designed for high performance backed by a formal analysis.
|
||||
/// using a universal hash proposed by Ted Krovetz and Wei Dai in April 2007. The
|
||||
/// algorithm was designed for high performance backed by a formal analysis.
|
||||
/// \details The implementation is based on Ted Krovetz's public domain vmac.c
|
||||
/// and <a href="http://tools.ietf.org/html/draft-krovetz-vmac-01">draft-krovetz-vmac-01.txt</a>.
|
||||
/// and <a href="http://tools.ietf.org/html/draft-krovetz-vmac-01">draft-krovetz-vmac-01.txt</a>.
|
||||
/// \sa <a href="http://www.cryptolounge.org/wiki/VMAC">VMAC</a>.
|
||||
/// \since Crypto++ 5.5
|
||||
template <class T_BlockCipher, int T_DigestBitSize = 128>
|
||||
|
Loading…
Reference in New Issue
Block a user