mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel headers
llvm-svn: 209506
This commit is contained in:
parent
f56e5acb21
commit
ff8ddaa911
@ -718,10 +718,10 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
|
|||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__)
|
||||||
// Keep track of which crypto features we have seen
|
// Keep track of which crypto features we have seen
|
||||||
enum {
|
enum {
|
||||||
HWCAP_AES = 0x1,
|
CAP_AES = 0x1,
|
||||||
HWCAP_PMULL = 0x2,
|
CAP_PMULL = 0x2,
|
||||||
HWCAP_SHA1 = 0x4,
|
CAP_SHA1 = 0x4,
|
||||||
HWCAP_SHA2 = 0x8
|
CAP_SHA2 = 0x8
|
||||||
};
|
};
|
||||||
uint32_t crypto = 0;
|
uint32_t crypto = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -747,13 +747,13 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
|
|||||||
// We need to check crypto seperately since we need all of the crypto
|
// We need to check crypto seperately since we need all of the crypto
|
||||||
// extensions to enable the subtarget feature
|
// extensions to enable the subtarget feature
|
||||||
if (CPUFeatures[I] == "aes")
|
if (CPUFeatures[I] == "aes")
|
||||||
crypto |= HWCAP_AES;
|
crypto |= CAP_AES;
|
||||||
else if (CPUFeatures[I] == "pmull")
|
else if (CPUFeatures[I] == "pmull")
|
||||||
crypto |= HWCAP_PMULL;
|
crypto |= CAP_PMULL;
|
||||||
else if (CPUFeatures[I] == "sha1")
|
else if (CPUFeatures[I] == "sha1")
|
||||||
crypto |= HWCAP_SHA1;
|
crypto |= CAP_SHA1;
|
||||||
else if (CPUFeatures[I] == "sha2")
|
else if (CPUFeatures[I] == "sha2")
|
||||||
crypto |= HWCAP_SHA2;
|
crypto |= CAP_SHA2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (LLVMFeatureStr != "")
|
if (LLVMFeatureStr != "")
|
||||||
@ -762,7 +762,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
|
|||||||
|
|
||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__)
|
||||||
// If we have all crypto bits we can add the feature
|
// If we have all crypto bits we can add the feature
|
||||||
if (crypto == (HWCAP_AES | HWCAP_PMULL | HWCAP_SHA1 | HWCAP_SHA2))
|
if (crypto == (CAP_AES | CAP_PMULL | CAP_SHA1 | CAP_SHA2))
|
||||||
Features.GetOrCreateValue("crypto").setValue(true);
|
Features.GetOrCreateValue("crypto").setValue(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user