Fix RDSEEDFlag assignment

This commit is contained in:
EnderIce2 2024-05-01 05:14:44 +03:00
parent 6cedac03f5
commit 72d29a138d
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -30,16 +30,16 @@ namespace Random
if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0) if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0)
{ {
CPU::x86::AMD::CPUID0x00000007_ECX_0 cpuid; CPU::x86::AMD::CPUID0x00000007_ECX_0 cpuid;
RDRANDFlag = cpuid.EBX.RDSEED; RDSEEDFlag = cpuid.EBX.RDSEED;
} }
else if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_INTEL) == 0) else if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_INTEL) == 0)
{ {
CPU::x86::Intel::CPUID0x00000007_0 cpuid; CPU::x86::Intel::CPUID0x00000007_0 cpuid;
RDRANDFlag = cpuid.EBX.RDSEED; RDSEEDFlag = cpuid.EBX.RDSEED;
} }
} }
else else
RDRANDFlag = false; RDSEEDFlag = false;
if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) != 0) if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) != 0)
{ {
@ -55,7 +55,10 @@ namespace Random
} }
} }
else else
RDRANDFlag = 0; RDRANDFlag = false;
if (RDSEEDFlag)
fixme("RDSEED is not implemented yet!");
} }
uint16_t rand16() uint16_t rand16()