projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: improve RTABI 4.2 conformance on Linux
[oota-llvm.git]
/
lib
/
Support
/
Host.cpp
diff --git
a/lib/Support/Host.cpp
b/lib/Support/Host.cpp
index 7e86e2ffcf28a4ddef0abdba39591c426a2e9096..e2dd6d522bb7f19863125128cf9d9b5f3259ee42 100644
(file)
--- a/
lib/Support/Host.cpp
+++ b/
lib/Support/Host.cpp
@@
-7,7
+7,7
@@
//
//===----------------------------------------------------------------------===//
//
//
//===----------------------------------------------------------------------===//
//
-// This
header
file implements the operating system Host concept.
+// This file implements the operating system Host concept.
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
@@
-570,6
+570,8
@@
StringRef sys::getHostCPUName() {
.Case("A2", "a2")
.Case("POWER6", "pwr6")
.Case("POWER7", "pwr7")
.Case("A2", "a2")
.Case("POWER6", "pwr6")
.Case("POWER7", "pwr7")
+ .Case("POWER8", "pwr8")
+ .Case("POWER8E", "pwr8")
.Default(generic);
}
#elif defined(__linux__) && defined(__arm__)
.Default(generic);
}
#elif defined(__linux__) && defined(__arm__)
@@
-718,10
+720,10
@@
bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
#if defined(__aarch64__)
// Keep track of which crypto features we have seen
enum {
#if defined(__aarch64__)
// Keep track of which crypto features we have seen
enum {
-
HW
CAP_AES = 0x1,
-
HW
CAP_PMULL = 0x2,
-
HW
CAP_SHA1 = 0x4,
-
HW
CAP_SHA2 = 0x8
+ CAP_AES = 0x1,
+ CAP_PMULL = 0x2,
+ CAP_SHA1 = 0x4,
+ CAP_SHA2 = 0x8
};
uint32_t crypto = 0;
#endif
};
uint32_t crypto = 0;
#endif
@@
-744,16
+746,16
@@
bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
.Default("");
#if defined(__aarch64__)
.Default("");
#if defined(__aarch64__)
- // We need to check crypto sep
e
rately since we need all of the crypto
+ // We need to check crypto sep
a
rately since we need all of the crypto
// extensions to enable the subtarget feature
if (CPUFeatures[I] == "aes")
// extensions to enable the subtarget feature
if (CPUFeatures[I] == "aes")
- crypto |=
HW
CAP_AES;
+ crypto |= CAP_AES;
else if (CPUFeatures[I] == "pmull")
else if (CPUFeatures[I] == "pmull")
- crypto |=
HW
CAP_PMULL;
+ crypto |= CAP_PMULL;
else if (CPUFeatures[I] == "sha1")
else if (CPUFeatures[I] == "sha1")
- crypto |=
HW
CAP_SHA1;
+ crypto |= CAP_SHA1;
else if (CPUFeatures[I] == "sha2")
else if (CPUFeatures[I] == "sha2")
- crypto |=
HW
CAP_SHA2;
+ crypto |= CAP_SHA2;
#endif
if (LLVMFeatureStr != "")
#endif
if (LLVMFeatureStr != "")
@@
-762,7
+764,7
@@
bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
#if defined(__aarch64__)
// If we have all crypto bits we can add the feature
#if defined(__aarch64__)
// If we have all crypto bits we can add the feature
- if (crypto == (
HWCAP_AES | HWCAP_PMULL | HWCAP_SHA1 | HW
CAP_SHA2))
+ if (crypto == (
CAP_AES | CAP_PMULL | CAP_SHA1 |
CAP_SHA2))
Features.GetOrCreateValue("crypto").setValue(true);
#endif
Features.GetOrCreateValue("crypto").setValue(true);
#endif