Save/restore 64-bit registers for Padlock on x86_64
parent
5ea410c1d3
commit
7afd05c336
|
|
@ -27,10 +27,8 @@ PadlockRNG::PadlockRNG(word32 divisor)
|
|||
{
|
||||
#if defined(CRYPTOPP_X86_ASM_AVAILABLE)
|
||||
if (!HasPadlockRNG())
|
||||
throw PadlockRNG_Err("PadlockRNG", "PadlockRNG generator not available");
|
||||
#else
|
||||
throw PadlockRNG_Err("PadlockRNG", "PadlockRNG generator not available");
|
||||
#endif
|
||||
throw PadlockRNG_Err("PadlockRNG", "PadlockRNG generator not available");
|
||||
}
|
||||
|
||||
void PadlockRNG::GenerateBlock(byte *output, size_t size)
|
||||
|
|
@ -54,9 +52,9 @@ void PadlockRNG::GenerateBlock(byte *output, size_t size)
|
|||
|
||||
: "=g" (m_msr) : "g" (m_buffer.data()), "g" (m_divisor)
|
||||
#if (CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
|
||||
: "eax", "edx", "rdi", "cc"
|
||||
: "rax", "rbx", "rdx", "rdi", "cc"
|
||||
#else
|
||||
: "eax", "edx", "edi", "cc"
|
||||
: "eax", "ebx", "edx", "edi", "cc"
|
||||
#endif
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue