mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Fix minor bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d963e602b
commit
9302ba416b
@ -75,15 +75,16 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
|||||||
|
|
||||||
// If this is a two-address instruction and we are not accessing the
|
// If this is a two-address instruction and we are not accessing the
|
||||||
// 0th operand, remove an operand.
|
// 0th operand, remove an operand.
|
||||||
if (I->second.isTwoAddress && OpNo != 0) {
|
unsigned MIOp = I->second.OperandList[OpNo].MIOperandNo;
|
||||||
if (OpNo == 1)
|
if (I->second.isTwoAddress && MIOp != 0) {
|
||||||
|
if (MIOp == 1)
|
||||||
throw "Should refer to operand #0 instead of #1 for two-address"
|
throw "Should refer to operand #0 instead of #1 for two-address"
|
||||||
" instruction '" + I->first + "'!";
|
" instruction '" + I->first + "'!";
|
||||||
--OpNo;
|
--MIOp;
|
||||||
}
|
}
|
||||||
|
|
||||||
O << "; " << I->second.OperandList[OpNo].PrinterMethodName
|
O << "; " << I->second.OperandList[OpNo].PrinterMethodName
|
||||||
<< "(MI, " << I->second.OperandList[OpNo].MIOperandNo << ", MVT::"
|
<< "(MI, " << MIOp << ", MVT::"
|
||||||
<< getName(I->second.OperandList[OpNo].Ty) << "); O ";
|
<< getName(I->second.OperandList[OpNo].Ty) << "); O ";
|
||||||
LastEmitted = VarEnd;
|
LastEmitted = VarEnd;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user