From 963b03c1a9f6a9742671459f103ee9a566c6de58 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 7 Jul 2011 19:05:12 +0000 Subject: [PATCH] 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 --- lib/Target/ARM/ARM.td | 2 +- lib/Target/ARM/ARMSubtarget.cpp | 2 +- lib/Target/ARM/ARMSubtarget.h | 10 +++++----- lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/Target/ARM/ARM.td b/lib/Target/ARM/ARM.td index 54a8e9873cf..cf333ccd49b 100644 --- a/lib/Target/ARM/ARM.td +++ b/lib/Target/ARM/ARM.td @@ -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">; //===----------------------------------------------------------------------===// diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 19059852bcf..506fe803621 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -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) diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index a199f2bfe35..d22b6eb6b24 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -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; } diff --git a/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp b/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp index b709cf5e74e..1db33b5e92d 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp @@ -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; -- 2.11.0