mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-23 17:28:54 +00:00
disolve a hack, having CodeGenInstAlias decode the alias in the .td
file instead of the asmmatcher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -388,8 +388,16 @@ FlattenAsmStringVariants(StringRef Cur, unsigned Variant) {
|
||||
/// CodeGenInstAlias Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
CodeGenInstAlias::CodeGenInstAlias(Record *R) : TheDef(R), Operands(R) {
|
||||
CodeGenInstAlias::CodeGenInstAlias(Record *R, CodeGenTarget &T)
|
||||
: TheDef(R), Operands(R) {
|
||||
AsmString = R->getValueAsString("AsmString");
|
||||
|
||||
Result = R->getValueAsDag("ResultInst");
|
||||
|
||||
// Verify that the root of the result is an instruction.
|
||||
DefInit *DI = dynamic_cast<DefInit*>(Result->getOperator());
|
||||
if (DI == 0 || !DI->getDef()->isSubClassOf("Instruction"))
|
||||
throw TGError(R->getLoc(), "result of inst alias should be an instruction");
|
||||
|
||||
ResultInst = &T.getInstruction(DI->getDef());
|
||||
}
|
||||
|
Reference in New Issue
Block a user