summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-07 00:08:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-07 00:08:19 +0000
commit94ca42ff0407d71bacc41de4032d8dbe6358d33d (patch)
tree356d015c4799ce8e0d9c360403bdb98126e10129 /lib/Target/ARM/ARMSubtarget.h
parenta4acb008cb2a9953d9cb4c90ecf6424bd32ebc0c (diff)
downloadllvm-94ca42ff0407d71bacc41de4032d8dbe6358d33d.tar.gz
llvm-94ca42ff0407d71bacc41de4032d8dbe6358d33d.tar.bz2
llvm-94ca42ff0407d71bacc41de4032d8dbe6358d33d.tar.xz
Factor ARM triple parsing out of ARMSubtarget. Another step towards making ARM subtarget info available to MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--lib/Target/ARM/ARMSubtarget.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h
index 66e4426091..6969c38016 100644
--- a/lib/Target/ARM/ARMSubtarget.h
+++ b/lib/Target/ARM/ARMSubtarget.h
@@ -14,6 +14,7 @@
#ifndef ARMSUBTARGET_H
#define ARMSUBTARGET_H
+#include "MCTargetDesc/ARMMCTargetDesc.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include "llvm/MC/MCInstrItineraries.h"
#include "llvm/ADT/Triple.h"
@@ -39,11 +40,6 @@ protected:
None, VFPv2, VFPv3, NEON
};
- enum ThumbTypeEnum {
- Thumb1,
- Thumb2
- };
-
/// ARMArchVersion - ARM architecture version: V4, V4T (base), V5T, V5TE,
/// V6, V6T2, V7A, V7M, V7EM.
ARMArchEnum ARMArchVersion;
@@ -73,8 +69,8 @@ protected:
/// IsThumb - True if we are in thumb mode, false if in ARM mode.
bool IsThumb;
- /// ThumbMode - Indicates supported Thumb version.
- ThumbTypeEnum ThumbMode;
+ /// HasThumb2 - True if Thumb2 instructions are supported.
+ bool HasThumb2;
/// NoARM - True if subtarget does not support ARM mode execution.
bool NoARM;
@@ -161,7 +157,7 @@ protected:
/// of the specified triple.
///
ARMSubtarget(const std::string &TT, const std::string &CPU,
- const std::string &FS, bool isThumb);
+ const std::string &FS);
/// getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size
/// that still makes it profitable to inline the call.
@@ -217,9 +213,9 @@ protected:
bool isAAPCS_ABI() const { return TargetABI == ARM_ABI_AAPCS; }
bool isThumb() const { return IsThumb; }
- bool isThumb1Only() const { return IsThumb && (ThumbMode == Thumb1); }
- bool isThumb2() const { return IsThumb && (ThumbMode == Thumb2); }
- bool hasThumb2() const { return ThumbMode >= Thumb2; }
+ bool isThumb1Only() const { return IsThumb && !HasThumb2; }
+ bool isThumb2() const { return IsThumb && HasThumb2; }
+ bool hasThumb2() const { return HasThumb2; }
bool isR9Reserved() const { return IsR9Reserved; }