diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-07 07:07:08 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-07 07:07:08 +0000 |
commit | 0ddff1b5359433faf2eb1c4ff5320ddcbd42f52f (patch) | |
tree | 1a7077a4920b307fe6172cf8eb4a9483a8e93fbd /lib/Target/ARM/ARMSubtarget.cpp | |
parent | cbd40f8357437a15c653cb8cccd7124a1bb55ae2 (diff) |
Compute feature bits at time of MCSubtargetInfo initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 4affc15715..12f12ad862 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -38,7 +38,7 @@ StrictAlign("arm-strict-align", cl::Hidden, ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) - : ARMGenSubtargetInfo() + : ARMGenSubtargetInfo(TT, CPU, FS) , ARMProcFamily(Others) , HasV4TOps(false) , HasV5TOps(false) @@ -78,9 +78,6 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, if (CPUString.empty()) CPUString = "generic"; - if (TT.find("eabi") != std::string::npos) - TargetABI = ARM_ABI_AAPCS; - // Insert the architecture feature derived from the target triple into the // feature string. This is important for setting features that are implied // based on the architecture version. @@ -92,7 +89,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, ArchFS = FS; } - ParseSubtargetFeatures(ArchFS, CPUString); + ParseSubtargetFeatures(CPUString, ArchFS); // Thumb2 implies at least V6T2. FIXME: Fix tests to explicitly specify a // ARM version or CPU and then remove this. @@ -105,6 +102,9 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, // After parsing Itineraries, set ItinData.IssueWidth. computeIssueWidth(); + if (TT.find("eabi") != std::string::npos) + TargetABI = ARM_ABI_AAPCS; + if (isAAPCS_ABI()) stackAlignment = 8; |