Displaying 4 results from an estimated 4 matches for "hasmnemonicfirst".
2016 Jul 15
2
TableGen change in LLVM 3.9 allows only prefix instruction notation
..., not a $foo variable or a singleton register.
if (AsmOperands.empty())
PrintFatalError(TheDef->getLoc(),
"Instruction '" + TheDef->getName() + "' has no tokens");
assert(!AsmOperands[0].Token.empty());
if (HasMnemonicFirst) {
Mnemonic = AsmOperands[0].Token;
if (Mnemonic[0] == '$')
PrintFatalError(TheDef->getLoc(),
"Invalid instruction mnemonic '" + Mnemonic + "'!");
// Remove the first operand, it is tracked...
2018 Jan 04
1
InstAlias with tied operands - can it be supported?
...n/AsmMatcherEmitter.cpp
b/utils/TableGen/AsmMatcherEmitter.cpp
index 1a820a5..252fd51 100644
--- a/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1526,7 +1526,7 @@ void AsmMatcherInfo::buildInfo() {
II->initialize(*this, SingletonRegisters, Variant,
HasMnemonicFirst);
// Validate the alias definitions.
- II->validate(CommentDelimiter, false);
+ II->validate(CommentDelimiter, true);
Matchables.push_back(std::move(II));
}
On 2017-12-15 03:40, Daniel Sanders wrote:
> Hi,
>
> On Instructions you can use checkEar...
2017 Dec 15
0
InstAlias with tied operands - can it be supported?
Hi,
On Instructions you can use checkEarlyTargetMatchPredicate() to check that the operands are the same. There's an example of that in MipsAsmParser.cpp for DATI and DAHI. I can't think of a reason TableGen couldn't be made to allow this for InstAlias too.
> On 15 Dec 2017, at 02:12, via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello,
>
> InstAlias
2017 Dec 15
2
InstAlias with tied operands - can it be supported?
Hello,
InstAlias does not allow tied operands (repeated operands) in the asm
string to be matched.
It seems this situation is explicitly prevented in
AsmMatcherEmitter.cpp:
if (!Hack)
PrintFatalError(TheDef->getLoc(),
"ERROR: matchable with tied operand '" + Tok +
"' can never be matched!");