diff options
author | Vladimir Sukharev <vladimir.sukharev@arm.com> | 2015-05-14 09:50:14 +0000 |
---|---|---|
committer | Vladimir Sukharev <vladimir.sukharev@arm.com> | 2015-05-14 09:50:14 +0000 |
commit | 8ccf0a3aa7e51f7bec106e1c1e5a8d17931eac39 (patch) | |
tree | edb7c44bf4a84ef595aee7c190a261928998d7bc /llvm/lib/Target | |
parent | d5b3e376d287fcdca568aae4f682688bd5b78c33 (diff) | |
download | bcm5719-llvm-8ccf0a3aa7e51f7bec106e1c1e5a8d17931eac39.tar.gz bcm5719-llvm-8ccf0a3aa7e51f7bec106e1c1e5a8d17931eac39.zip |
[AArch64] Slight naming changes and comments for AArch64NamedImmMapper
Reviewers: echristo
Subscribers: llvm-commits
Follow-up to: http://reviews.llvm.org/D8496#158595
Relates to: http://reviews.llvm.org/rL235089
llvm-svn: 237354
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h index 659ea909d7d..15350e762ad 100644 --- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -280,15 +280,16 @@ struct AArch64NamedImmMapper { struct Mapping { const char *Name; uint32_t Value; - uint64_t AvailableForFeatures; - // empty AvailableForFeatures means "always-on" + uint64_t FeatureBitSet; // Set of features this mapping is available for + // Zero value of FeatureBitSet means the mapping is always available + bool isNameEqual(std::string Other, uint64_t FeatureBits=~0ULL) const { - if (AvailableForFeatures && !(AvailableForFeatures & FeatureBits)) + if (FeatureBitSet && !(FeatureBitSet & FeatureBits)) return false; return Name == Other; } bool isValueEqual(uint32_t Other, uint64_t FeatureBits=~0ULL) const { - if (AvailableForFeatures && !(AvailableForFeatures & FeatureBits)) + if (FeatureBitSet && !(FeatureBitSet & FeatureBits)) return false; return Value == Other; } @@ -298,7 +299,9 @@ struct AArch64NamedImmMapper { AArch64NamedImmMapper(const Mapping (&Mappings)[N], uint32_t TooBigImm) : Mappings(&Mappings[0]), NumMappings(N), TooBigImm(TooBigImm) {} + // Maps value to string, depending on availability for FeatureBits given StringRef toString(uint32_t Value, uint64_t FeatureBits, bool &Valid) const; + // Maps string to value, depending on availability for FeatureBits given uint32_t fromString(StringRef Name, uint64_t FeatureBits, bool &Valid) const; /// Many of the instructions allow an alternative assembly form consisting of |