Rename attribute 'thumb' to a more descriptive 'thumb-mode'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2011-07-07 19:05:12 +00:00
parent d3ac47f805
commit 963b03c1a9
4 changed files with 10 additions and 9 deletions

View File

@ -20,7 +20,7 @@ include "llvm/Target/Target.td"
// ARM Subtarget state.
//
def ModeThumb : SubtargetFeature<"thumb", "IsThumb", "true",
def ModeThumb : SubtargetFeature<"thumb-mode", "InThumbMode", "true",
"Thumb mode">;
//===----------------------------------------------------------------------===//

View File

@ -53,7 +53,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU,
, SlowFPVMLx(false)
, HasVMLxForwarding(false)
, SlowFPBrcc(false)
, IsThumb(false)
, InThumbMode(false)
, HasThumb2(false)
, NoARM(false)
, PostRAScheduler(false)

View File

@ -67,8 +67,8 @@ protected:
/// SlowFPBrcc - True if floating point compare + branch is slow.
bool SlowFPBrcc;
/// IsThumb - True if we are in thumb mode, false if in ARM mode.
bool IsThumb;
/// InThumbMode - True if we are in thumb mode, false if in ARM mode.
bool InThumbMode;
/// HasThumb2 - True if Thumb2 instructions are supported.
bool HasThumb2;
@ -214,9 +214,9 @@ protected:
bool isAPCS_ABI() const { return TargetABI == ARM_ABI_APCS; }
bool isAAPCS_ABI() const { return TargetABI == ARM_ABI_AAPCS; }
bool isThumb() const { return IsThumb; }
bool isThumb1Only() const { return IsThumb && !HasThumb2; }
bool isThumb2() const { return IsThumb && HasThumb2; }
bool isThumb() const { return InThumbMode; }
bool isThumb1Only() const { return InThumbMode && !HasThumb2; }
bool isThumb2() const { return InThumbMode && HasThumb2; }
bool hasThumb2() const { return HasThumb2; }
bool isR9Reserved() const { return IsR9Reserved; }

View File

@ -88,6 +88,7 @@ std::string ARM_MC::ParseARMTriple(StringRef TT) {
unsigned Len = TT.size();
unsigned Idx = 0;
// FIXME: Enahnce Triple helper class to extract ARM version.
bool isThumb = false;
if (Len >= 5 && TT.substr(0, 4) == "armv")
Idx = 4;
@ -127,9 +128,9 @@ std::string ARM_MC::ParseARMTriple(StringRef TT) {
if (isThumb) {
if (ARMArchFeature.empty())
ARMArchFeature = "+thumb";
ARMArchFeature = "+thumb-mode";
else
ARMArchFeature += ",+thumb";
ARMArchFeature += ",+thumb-mode";
}
return ARMArchFeature;