mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[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
This commit is contained in:
parent
b6e5772812
commit
7d94a19e2e
@ -280,15 +280,16 @@ struct AArch64NamedImmMapper {
|
|||||||
struct Mapping {
|
struct Mapping {
|
||||||
const char *Name;
|
const char *Name;
|
||||||
uint32_t Value;
|
uint32_t Value;
|
||||||
uint64_t AvailableForFeatures;
|
uint64_t FeatureBitSet; // Set of features this mapping is available for
|
||||||
// empty AvailableForFeatures means "always-on"
|
// Zero value of FeatureBitSet means the mapping is always available
|
||||||
|
|
||||||
bool isNameEqual(std::string Other, uint64_t FeatureBits=~0ULL) const {
|
bool isNameEqual(std::string Other, uint64_t FeatureBits=~0ULL) const {
|
||||||
if (AvailableForFeatures && !(AvailableForFeatures & FeatureBits))
|
if (FeatureBitSet && !(FeatureBitSet & FeatureBits))
|
||||||
return false;
|
return false;
|
||||||
return Name == Other;
|
return Name == Other;
|
||||||
}
|
}
|
||||||
bool isValueEqual(uint32_t Other, uint64_t FeatureBits=~0ULL) const {
|
bool isValueEqual(uint32_t Other, uint64_t FeatureBits=~0ULL) const {
|
||||||
if (AvailableForFeatures && !(AvailableForFeatures & FeatureBits))
|
if (FeatureBitSet && !(FeatureBitSet & FeatureBits))
|
||||||
return false;
|
return false;
|
||||||
return Value == Other;
|
return Value == Other;
|
||||||
}
|
}
|
||||||
@ -298,7 +299,9 @@ struct AArch64NamedImmMapper {
|
|||||||
AArch64NamedImmMapper(const Mapping (&Mappings)[N], uint32_t TooBigImm)
|
AArch64NamedImmMapper(const Mapping (&Mappings)[N], uint32_t TooBigImm)
|
||||||
: Mappings(&Mappings[0]), NumMappings(N), TooBigImm(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;
|
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;
|
uint32_t fromString(StringRef Name, uint64_t FeatureBits, bool &Valid) const;
|
||||||
|
|
||||||
/// Many of the instructions allow an alternative assembly form consisting of
|
/// Many of the instructions allow an alternative assembly form consisting of
|
||||||
|
Loading…
Reference in New Issue
Block a user