Skip to content

Commit 01f40dc

Browse files
committed
Remove { for AArch64 instructions.
1 parent 4ad597c commit 01f40dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llvm/utils/TableGen/PrinterCapstone.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,8 +2690,13 @@ normalizedMnemonic(StringRef const &Mn, const bool Upper = true,
26902690
static inline std::string
26912691
getNormalMnemonic(StringRef TargetName, StringRef Mnemonic,
26922692
const bool Upper = true, const bool ReplaceDot = true) {
2693-
StringRef RemovePattern = TargetName.equals_insensitive("ARM") ? "[{}]" : "";
2694-
RemovePattern = TargetName.equals_insensitive("ARC") ? "[.]$" : "";
2693+
2694+
StringRef RemovePattern = "";
2695+
if (TargetName.equals_insensitive("ARM") || TargetName.equals_insensitive("AArch64")) {
2696+
RemovePattern = "[{}]";
2697+
} else if (TargetName.equals_insensitive("ARC")) {
2698+
RemovePattern = "[.]$";
2699+
}
26952700
return normalizedMnemonic(Mnemonic, Upper, ReplaceDot, RemovePattern);
26962701
}
26972702

0 commit comments

Comments
 (0)