[AArch64] Detect AES/SHA1/SHA2/CRC32 in CPUDetect.
This commit is contained in:
parent
1b6969ca67
commit
3a3b782f3c
|
@ -239,8 +239,14 @@ void CPUInfo::Detect()
|
||||||
if (GetCPUImplementer() == 0x51 && GetCPUPart() == 0x6F) // Krait(300) is 0x6F, Scorpion is 0x4D
|
if (GetCPUImplementer() == 0x51 && GetCPUPart() == 0x6F) // Krait(300) is 0x6F, Scorpion is 0x4D
|
||||||
bIDIVa = bIDIVt = true;
|
bIDIVa = bIDIVt = true;
|
||||||
// These two require ARMv8 or higher
|
// These two require ARMv8 or higher
|
||||||
|
#ifdef _M_ARM_64
|
||||||
bFP = CheckCPUFeature("fp");
|
bFP = CheckCPUFeature("fp");
|
||||||
bASIMD = CheckCPUFeature("asimd");
|
bASIMD = CheckCPUFeature("asimd");
|
||||||
|
bAES = CheckCPUFeature("aes");
|
||||||
|
bCRC32 = CheckCPUFeature("crc32");
|
||||||
|
bSHA1 = CheckCPUFeature("sha1");
|
||||||
|
bSHA2 = CheckCPUFeature("sha2");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
// On android, we build a separate library for ARMv7 so this is fine.
|
// On android, we build a separate library for ARMv7 so this is fine.
|
||||||
// TODO: Check for ARMv7 on other platforms.
|
// TODO: Check for ARMv7 on other platforms.
|
||||||
|
|
|
@ -75,6 +75,9 @@ struct CPUInfo
|
||||||
// ARMv8 specific
|
// ARMv8 specific
|
||||||
bool bFP;
|
bool bFP;
|
||||||
bool bASIMD;
|
bool bASIMD;
|
||||||
|
bool bCRC32;
|
||||||
|
bool bSHA1;
|
||||||
|
bool bSHA2;
|
||||||
|
|
||||||
// Call Detect()
|
// Call Detect()
|
||||||
explicit CPUInfo();
|
explicit CPUInfo();
|
||||||
|
|
Loading…
Reference in New Issue