[cfe-commits] r82578 - /cfe/trunk/lib/Basic/Targets.cpp
Daniel Dunbar
daniel at zuster.org
Tue Sep 22 14:44:58 PDT 2009
Author: ddunbar
Date: Tue Sep 22 16:44:58 2009
New Revision: 82578
URL: http://llvm.org/viewvc/llvm-project?rev=82578&view=rev
Log:
Reconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=82578&r1=82577&r2=82578&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Sep 22 16:44:58 2009
@@ -1037,9 +1037,6 @@
{
llvm::Triple Triple(TripleStr);
- DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
- "i64:32:32-f32:32:32-f64:32:32-"
- "v64:64:64-v128:128:128-a0:0:32");
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
@@ -1065,6 +1062,16 @@
if (Arch.startswith("thumb"))
IsThumb = true;
+
+ if (IsThumb) {
+ DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
+ "i64:64:64-f32:32:32-f64:64:64-"
+ "v64:64:64-v128:128:128-a0:0:32");
+ } else {
+ DescriptionString = ("e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
+ "i64:64:64-f32:32:32-f64:64:64-"
+ "v64:64:64-v128:128:128-a0:0:64");
+ }
}
virtual const char *getABI() const { return ABI.c_str(); }
virtual bool setABI(const std::string &Name) {
@@ -1078,6 +1085,16 @@
DoubleAlign = LongLongAlign = 32;
SizeType = UnsignedLong;
+ if (IsThumb) {
+ DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
+ "i64:32:32-f32:32:32-f64:32:32-"
+ "v64:64:64-v128:128:128-a0:0:32");
+ } else {
+ DescriptionString = ("e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
+ "i64:32:32-f32:32:32-f64:32:32-"
+ "v64:64:64-v128:128:128-a0:0:64");
+ }
+
// FIXME: Override "preferred align" for double and long long.
} else if (Name == "aapcs") {
// FIXME: Enumerated types are variable width in straight AAPCS.
More information about the cfe-commits
mailing list