summaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Targets/SystemZ.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/Targets/SystemZ.h')
-rw-r--r--clang/lib/Basic/Targets/SystemZ.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets/SystemZ.h b/clang/lib/Basic/Targets/SystemZ.h
index e751806f4747..d7869e3754a8 100644
--- a/clang/lib/Basic/Targets/SystemZ.h
+++ b/clang/lib/Basic/Targets/SystemZ.h
@@ -29,11 +29,12 @@ class LLVM_LIBRARY_VISIBILITY SystemZTargetInfo : public TargetInfo {
int ISARevision;
bool HasTransactionalExecution;
bool HasVector;
+ bool SoftFloat;
public:
SystemZTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
: TargetInfo(Triple), CPU("z10"), ISARevision(8),
- HasTransactionalExecution(false), HasVector(false) {
+ HasTransactionalExecution(false), HasVector(false), SoftFloat(false) {
IntMaxType = SignedLong;
Int64Type = SignedLong;
TLSSupported = true;
@@ -47,6 +48,7 @@ public:
MinGlobalAlign = 16;
resetDataLayout("E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64");
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
+ HasStrictFP = true;
}
void getTargetDefines(const LangOptions &Opts,
@@ -63,6 +65,10 @@ public:
ArrayRef<TargetInfo::AddlRegName> getGCCAddlRegNames() const override;
+ bool isSPRegName(StringRef RegName) const override {
+ return RegName.equals("r15");
+ }
+
bool validateAsmConstraint(const char *&Name,
TargetInfo::ConstraintInfo &info) const override;
@@ -109,12 +115,17 @@ public:
DiagnosticsEngine &Diags) override {
HasTransactionalExecution = false;
HasVector = false;
+ SoftFloat = false;
for (const auto &Feature : Features) {
if (Feature == "+transactional-execution")
HasTransactionalExecution = true;
else if (Feature == "+vector")
HasVector = true;
+ else if (Feature == "+soft-float")
+ SoftFloat = true;
}
+ HasVector &= !SoftFloat;
+
// If we use the vector ABI, vector types are 64-bit aligned.
if (HasVector) {
MaxVectorAlign = 64;
@@ -144,6 +155,8 @@ public:
}
const char *getLongDoubleMangling() const override { return "g"; }
+
+ bool hasExtIntType() const override { return true; }
};
} // namespace targets
} // namespace clang