mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
fix: tricore
This commit is contained in:
parent
4b2ed3ee95
commit
717740dd49
@ -2622,8 +2622,10 @@ std::string getImplicitDefs(StringRef const &TargetName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline std::string normalizedMnemonic(StringRef const &Mn,
|
static inline std::string normalizedMnemonic(StringRef const &Mn,
|
||||||
const bool Upper = true) {
|
const bool Upper = true,
|
||||||
|
const bool ReplaceDot = true) {
|
||||||
auto Mnemonic = Upper ? Mn.upper() : Mn.str();
|
auto Mnemonic = Upper ? Mn.upper() : Mn.str();
|
||||||
|
if (ReplaceDot)
|
||||||
std::replace(Mnemonic.begin(), Mnemonic.end(), '.', '_');
|
std::replace(Mnemonic.begin(), Mnemonic.end(), '.', '_');
|
||||||
std::replace(Mnemonic.begin(), Mnemonic.end(), '|', '_');
|
std::replace(Mnemonic.begin(), Mnemonic.end(), '|', '_');
|
||||||
std::replace(Mnemonic.begin(), Mnemonic.end(), '+', 'p');
|
std::replace(Mnemonic.begin(), Mnemonic.end(), '+', 'p');
|
||||||
@ -3303,7 +3305,8 @@ void printInsnNameMapEnumEntry(StringRef const &TargetName,
|
|||||||
static std::set<std::string> MnemonicsSeen;
|
static std::set<std::string> MnemonicsSeen;
|
||||||
static std::set<std::string> EnumsSeen;
|
static std::set<std::string> EnumsSeen;
|
||||||
|
|
||||||
std::string Mnemonic = normalizedMnemonic(MI->Mnemonic.str(), false);
|
const bool replace_dot = !TargetName.equals_insensitive("TriCore");
|
||||||
|
std::string Mnemonic = normalizedMnemonic(MI->Mnemonic, false, replace_dot);
|
||||||
if (MnemonicsSeen.find(Mnemonic) != MnemonicsSeen.end())
|
if (MnemonicsSeen.find(Mnemonic) != MnemonicsSeen.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user