[llvm-commits] [llvm] r72698 - in /llvm/trunk/lib/Target/ARM: ARMSubtarget.cpp ARMSubtarget.h
Anton Korobeynikov
asl at math.spbu.ru
Mon Jun 1 13:00:49 PDT 2009
Author: asl
Date: Mon Jun 1 15:00:48 2009
New Revision: 72698
URL: http://llvm.org/viewvc/llvm-project?rev=72698&view=rev
Log:
Implement review feedback. Make thumb2 'normal' subtarget feature
Modified:
llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
llvm/trunk/lib/Target/ARM/ARMSubtarget.h
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=72698&r1=72697&r2=72698&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Mon Jun 1 15:00:48 2009
@@ -20,7 +20,8 @@
bool isThumb)
: ARMArchVersion(V4T)
, ARMFPUType(None)
- , ThumbMode((isThumb ? Thumb1 : ThumbNone))
+ , IsThumb(isThumb)
+ , ThumbMode(Thumb1)
, UseThumbBacktraces(false)
, IsR9Reserved(false)
, stackAlignment(4)
@@ -41,22 +42,18 @@
if (Len >= 5 && TT.substr(0, 4) == "armv")
Idx = 4;
else if (Len >= 6 && TT.substr(0, 6) == "thumb") {
- isThumb = true;
+ IsThumb = true;
if (Len >= 7 && TT[5] == 'v')
Idx = 6;
}
if (Idx) {
unsigned SubVer = TT[Idx];
if (SubVer > '4' && SubVer <= '9') {
- if (SubVer >= '7') {
+ if (SubVer >= '7')
ARMArchVersion = V7A;
- if (isThumb)
- ThumbMode = Thumb2;
- } else if (SubVer == '6') {
+ else if (SubVer == '6')
ARMArchVersion = V6;
- if (isThumb && Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == '2')
- ThumbMode = Thumb2;
- } else if (SubVer == '5') {
+ else if (SubVer == '5') {
ARMArchVersion = V5T;
if (Len >= Idx+3 && TT[Idx+1] == 't' && TT[Idx+2] == 'e')
ARMArchVersion = V5TE;
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.h?rev=72698&r1=72697&r2=72698&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.h Mon Jun 1 15:00:48 2009
@@ -31,7 +31,6 @@
};
enum ThumbTypeEnum {
- ThumbNone,
Thumb1,
Thumb2
};
@@ -43,7 +42,10 @@
/// ARMFPUType - Floating Point Unit type.
ARMFPEnum ARMFPUType;
- /// ThumbMode - ARM if in ARM mode, otherwise indicates Thumb version.
+ /// IsThumb - True if we are in thumb mode, false if in ARM mode.
+ bool IsThumb;
+
+ /// ThumbMode - Indicates supported Thumb version.
ThumbTypeEnum ThumbMode;
/// UseThumbBacktraces - True if we use thumb style backtraces.
@@ -102,8 +104,8 @@
bool isAPCS_ABI() const { return TargetABI == ARM_ABI_APCS; }
bool isAAPCS_ABI() const { return TargetABI == ARM_ABI_AAPCS; }
- bool isThumb() const { return ThumbMode >= Thumb1; }
- bool isThumb2() const { return ThumbMode >= Thumb2; }
+ bool isThumb() const { return IsThumb; }
+ bool isThumb2() const { return IsThumb && (ThumbMode >= Thumb2); }
bool useThumbBacktraces() const { return UseThumbBacktraces; }
bool isR9Reserved() const { return IsR9Reserved; }
More information about the llvm-commits
mailing list