summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2015-05-13 10:28:46 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2015-05-13 10:28:46 +0000
commitc3434b390d6ea255aa4bd82cfd6ddcdee99e4a23 (patch)
tree94dc79d894cf6e87f33787cba82f5a731a3a96be /llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
parenta7b142603da5ae63232b727bb20b997cadbaf4bb (diff)
downloadbcm5719-llvm-c3434b390d6ea255aa4bd82cfd6ddcdee99e4a23.tar.gz
bcm5719-llvm-c3434b390d6ea255aa4bd82cfd6ddcdee99e4a23.zip
Reverting r237234, "Use std::bitset for SubtargetFeatures"
The buildbots are still not satisfied. MIPS and ARM are failing (even though at least MIPS was expected to pass). llvm-svn: 237245
Diffstat (limited to 'llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h')
-rw-r--r--llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
index e054ba8be38..659ea909d7d 100644
--- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
@@ -22,7 +22,6 @@
#include "MCTargetDesc/AArch64MCTargetDesc.h" // For AArch64::X0 and friends.
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringSwitch.h"
-#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/ErrorHandling.h"
namespace llvm {
@@ -281,19 +280,15 @@ struct AArch64NamedImmMapper {
struct Mapping {
const char *Name;
uint32_t Value;
- FeatureBitset AvailableForFeatures;
+ uint64_t AvailableForFeatures;
// empty AvailableForFeatures means "always-on"
- bool isNameEqual(std::string Other,
- const FeatureBitset& FeatureBits) const {
- if (AvailableForFeatures.any() &&
- (AvailableForFeatures & FeatureBits).none())
+ bool isNameEqual(std::string Other, uint64_t FeatureBits=~0ULL) const {
+ if (AvailableForFeatures && !(AvailableForFeatures & FeatureBits))
return false;
return Name == Other;
}
- bool isValueEqual(uint32_t Other,
- const FeatureBitset& FeatureBits) const {
- if (AvailableForFeatures.any() &&
- (AvailableForFeatures & FeatureBits).none())
+ bool isValueEqual(uint32_t Other, uint64_t FeatureBits=~0ULL) const {
+ if (AvailableForFeatures && !(AvailableForFeatures & FeatureBits))
return false;
return Value == Other;
}
@@ -303,10 +298,8 @@ struct AArch64NamedImmMapper {
AArch64NamedImmMapper(const Mapping (&Mappings)[N], uint32_t TooBigImm)
: Mappings(&Mappings[0]), NumMappings(N), TooBigImm(TooBigImm) {}
- StringRef toString(uint32_t Value, const FeatureBitset& FeatureBits,
- bool &Valid) const;
- uint32_t fromString(StringRef Name, const FeatureBitset& FeatureBits,
- bool &Valid) const;
+ StringRef toString(uint32_t Value, uint64_t FeatureBits, bool &Valid) const;
+ uint32_t fromString(StringRef Name, uint64_t FeatureBits, bool &Valid) const;
/// Many of the instructions allow an alternative assembly form consisting of
/// a simple immediate. Currently the only valid forms are ranges [0, N) where
@@ -1199,9 +1192,8 @@ namespace AArch64SysReg {
size_t NumInstMappings;
SysRegMapper() { }
- uint32_t fromString(StringRef Name, const FeatureBitset& FeatureBits,
- bool &Valid) const;
- std::string toString(uint32_t Bits, const FeatureBitset& FeatureBits) const;
+ uint32_t fromString(StringRef Name, uint64_t FeatureBits, bool &Valid) const;
+ std::string toString(uint32_t Bits, uint64_t FeatureBits) const;
};
struct MSRMapper : SysRegMapper {
OpenPOWER on IntegriCloud