summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorBernard Ogden <bogden@arm.com>2013-10-24 18:32:51 +0000
committerBernard Ogden <bogden@arm.com>2013-10-24 18:32:51 +0000
commitda13af380af2827e3332c695a8dfb59625883433 (patch)
tree5c40b58a6c428be39424703ff96ce681013d4010 /clang/lib/Basic/Targets.cpp
parent58a05cff9739e54df183be0c08c9bfcc2e89077e (diff)
downloadbcm5719-llvm-da13af380af2827e3332c695a8dfb59625883433.tar.gz
bcm5719-llvm-da13af380af2827e3332c695a8dfb59625883433.zip
Add driver support for FP, SIMD and crypto defaults.
Although we wire up a bit for v8fp for macro setting purposes, we don't set a macro yet. Need to ask list about that. Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0 llvm-svn: 193367
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 109c1b66357..429e699a37a 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -3598,7 +3598,8 @@ class ARMTargetInfo : public TargetInfo {
VFP2FPU = (1 << 0),
VFP3FPU = (1 << 1),
VFP4FPU = (1 << 2),
- NeonFPU = (1 << 3)
+ NeonFPU = (1 << 3),
+ FPARMV8 = (1 << 4)
};
// Possible HWDiv features.
@@ -3608,7 +3609,7 @@ class ARMTargetInfo : public TargetInfo {
};
static bool FPUModeIsVFP(FPUMode Mode) {
- return Mode & (VFP2FPU | VFP3FPU | VFP4FPU | NeonFPU);
+ return Mode & (VFP2FPU | VFP3FPU | VFP4FPU | NeonFPU | FPARMV8);
}
static const TargetInfo::GCCRegAlias GCCRegAliases[];
@@ -3622,7 +3623,7 @@ class ARMTargetInfo : public TargetInfo {
FP_Neon
} FPMath;
- unsigned FPU : 4;
+ unsigned FPU : 5;
unsigned IsAAPCS : 1;
unsigned IsThumb : 1;
@@ -3778,8 +3779,12 @@ public:
Features["neon"] = true;
Features["hwdiv"] = true;
Features["hwdiv-arm"] = true;
- } else if (CPU == "cortex-r5" || CPU == "cortex-a53"||
- CPU == "cortex-a57" || CPU == "cortex-m3" ||
+ } else if (CPU == "cortex-a53" || CPU == "cortex-a57") {
+ Features["fp-armv8"] = true;
+ Features["neon"] = true;
+ Features["hwdiv"] = true;
+ Features["hwdiv-arm"] = true;
+ } else if (CPU == "cortex-r5" || CPU == "cortex-m3" ||
CPU == "cortex-m4" ||
// Enable the hwdiv extension for all v8a AArch32 cores by
// default.
@@ -3806,6 +3811,8 @@ public:
FPU |= VFP3FPU;
else if (Features[i] == "+vfp4")
FPU |= VFP4FPU;
+ else if (Features[i] == "+fp-armv8")
+ FPU |= FPARMV8;
else if (Features[i] == "+neon")
FPU |= NeonFPU;
else if (Features[i] == "+hwdiv")
@@ -3960,7 +3967,7 @@ public:
// the VFP define, hence the soft float and arch check. This is subtly
// different from gcc, we follow the intent which was that it should be set
// when Neon instructions are actually available.
- if ((FPU & NeonFPU) && !SoftFloat && CPUArchVer == 7)
+ if ((FPU & NeonFPU) && !SoftFloat && CPUArchVer >= 7)
Builder.defineMacro("__ARM_NEON__");
if (CPUArchVer == 8)
OpenPOWER on IntegriCloud