mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
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
This commit is contained in:
parent
1cf95914b7
commit
9273151c3b
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user