Rename attribute 'thumb' to a more descriptive 'thumb-mode'.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 7 Jul 2011 19:05:12 +0000 (19:05 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 7 Jul 2011 19:05:12 +0000 (19:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134626 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARM.td
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/ARMSubtarget.h
lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp

index 54a8e9873cfbaa0fb52db3b5fb527df198db071b..cf333ccd49ba660c3892814ffc7202d238e613a6 100644 (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">;
 
 //===----------------------------------------------------------------------===//
index 19059852bcf3839e7b945b89e44ee426892bb88b..506fe803621dcf8468d5acf6c03b92b988ee891f 100644 (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)
index a199f2bfe35eaf3980db0dad3612af00b18904c2..d22b6eb6b2436b82635f3bcabaa7ab9df03eb5d6 100644 (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; }
index b709cf5e74e5a7ecf3718cc1050a4110fcba95f4..1db33b5e92d3247d17854c99ef89fbfdc66460ad 100644 (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;