summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorVladimir Medic <Vladimir.Medic@imgtec.com>2013-07-16 09:22:38 +0000
committerVladimir Medic <Vladimir.Medic@imgtec.com>2013-07-16 09:22:38 +0000
commit9273151c3bbc96c9b2911caffe3e1a724261cd06 (patch)
tree70790baba2cb6a2b3e4ac7212fedc76826a881e7 /utils
parent1cf95914b7ef65d517447d5b39fbda5ab1603d13 (diff)
downloadllvm-9273151c3bbc96c9b2911caffe3e1a724261cd06.tar.gz
llvm-9273151c3bbc96c9b2911caffe3e1a724261cd06.tar.bz2
llvm-9273151c3bbc96c9b2911caffe3e1a724261cd06.tar.xz
This patch allows targets to define weather the instruction mnemonics in asm matcher tables will contain '.' character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmMatcherEmitter.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp
index b45d40a0a9..101d8b822f 100644
--- a/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/utils/TableGen/AsmMatcherEmitter.cpp
@@ -837,9 +837,12 @@ void MatchableInfo::tokenizeAsmString(const AsmMatcherInfo &Info) {
}
case '.':
- if (InTok)
- AsmOperands.push_back(AsmOperand(String.slice(Prev, i)));
- Prev = i;
+ if (!(TheDef->getValue("MnemonicContainsDot")) ||
+ !(TheDef->getValueAsBit("MnemonicContainsDot"))) {
+ if (InTok)
+ AsmOperands.push_back(AsmOperand(String.slice(Prev, i)));
+ Prev = i;
+ }
InTok = true;
break;
@@ -2326,7 +2329,7 @@ static void emitMnemonicAliasVariant(raw_ostream &OS,const AsmMatcherInfo &Info,
}
if (AliasesFromMnemonic.empty())
return;
-
+
// Process each alias a "from" mnemonic at a time, building the code executed
// by the string remapper.
std::vector<StringMatcher::StringPair> Cases;