summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit2bd65363a8e8c182ba1a0b4422d79c79ede9f1e3 (patch)
tree94783d5a58bc294eedf7bdbdd5f85b86c46644fb /llvm/lib/Target/ARM/ARMSubtarget.h
parent41e97da74f8f9cfdffbdcf48cb6ec41c4c3c4624 (diff)
downloadbcm5719-llvm-2bd65363a8e8c182ba1a0b4422d79c79ede9f1e3.tar.gz
bcm5719-llvm-2bd65363a8e8c182ba1a0b4422d79c79ede9f1e3.zip
Factor ARM triple parsing out of ARMSubtarget. Another step towards making ARM subtarget info available to MC.
llvm-svn: 134569
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h
index 66e4426091d..6969c38016b 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.h
+++ b/llvm/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; }
OpenPOWER on IntegriCloud