From: Vladimir Medic Date: Tue, 16 Jul 2013 09:22:38 +0000 (+0000) Subject: This patch allows targets to define weather the instruction mnemonics in asm matcher... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75429adb4d02432471c0625892c798ca775dd0a4;p=platform%2Fupstream%2Fllvm.git This patch allows targets to define weather the instruction mnemonics in asm matcher tables will contain '.' character. llvm-svn: 186388 --- diff --git a/llvm/include/llvm/Target/Target.td b/llvm/include/llvm/Target/Target.td index 97df64c..82cd4dd 100644 --- a/llvm/include/llvm/Target/Target.td +++ b/llvm/include/llvm/Target/Target.td @@ -444,6 +444,9 @@ class Instruction { /// constraint. For example, "$Rn = $Rd". string TwoOperandAliasConstraint = ""; + /// Does the instruction mnemonic allow '.' + bit MnemonicContainsDot = 0; + ///@} /// UseNamedOperandTable - If set, the operand indices of this instruction diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index b45d40a..101d8b8 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/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 Cases;