mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
remove some code that was working around old sparc v9 backend bugs.
Add checking that the input/output operand list in spelled right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -127,27 +127,27 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
|
||||
if (neverHasSideEffects + hasSideEffects > 1)
|
||||
throw R->getName() + ": multiple conflicting side-effect flags set!";
|
||||
|
||||
DagInit *DI;
|
||||
try {
|
||||
DI = R->getValueAsDag("OutOperandList");
|
||||
} catch (...) {
|
||||
// Error getting operand list, just ignore it (sparcv9).
|
||||
AsmString.clear();
|
||||
OperandList.clear();
|
||||
return;
|
||||
}
|
||||
NumDefs = DI->getNumArgs();
|
||||
DagInit *DI = R->getValueAsDag("OutOperandList");
|
||||
|
||||
DagInit *IDI;
|
||||
try {
|
||||
IDI = R->getValueAsDag("InOperandList");
|
||||
} catch (...) {
|
||||
// Error getting operand list, just ignore it (sparcv9).
|
||||
AsmString.clear();
|
||||
OperandList.clear();
|
||||
return;
|
||||
}
|
||||
DI = (DagInit*)(new BinOpInit(BinOpInit::CONCAT, DI, IDI, new DagRecTy))->Fold(R, 0);
|
||||
if (DefInit *Init = dynamic_cast<DefInit*>(DI->getOperator())) {
|
||||
if (Init->getDef()->getName() != "ops" &&
|
||||
Init->getDef()->getName() != "outs")
|
||||
throw R->getName() + ": invalid def name for output list: use 'outs'";
|
||||
} else
|
||||
throw R->getName() + ": invalid output list: use 'outs'";
|
||||
|
||||
NumDefs = DI->getNumArgs();
|
||||
|
||||
DagInit *IDI = R->getValueAsDag("InOperandList");
|
||||
if (DefInit *Init = dynamic_cast<DefInit*>(IDI->getOperator())) {
|
||||
if (Init->getDef()->getName() != "ops" &&
|
||||
Init->getDef()->getName() != "ins")
|
||||
throw R->getName() + ": invalid def name for input list: use 'ins'";
|
||||
} else
|
||||
throw R->getName() + ": invalid input list: use 'ins'";
|
||||
|
||||
DI = (DagInit*)(new BinOpInit(BinOpInit::CONCAT,
|
||||
DI, IDI, new DagRecTy))->Fold(R, 0);
|
||||
|
||||
unsigned MIOperandNo = 0;
|
||||
std::set<std::string> OperandNames;
|
||||
|
Reference in New Issue
Block a user