1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Fix minor bug in previous checkin

llvm-svn: 15649
This commit is contained in:
Chris Lattner 2004-08-11 04:08:36 +00:00
parent c07b78eaa2
commit a86411806a

View File

@ -75,15 +75,16 @@ void AsmWriterEmitter::run(std::ostream &O) {
// If this is a two-address instruction and we are not accessing the
// 0th operand, remove an operand.
if (I->second.isTwoAddress && OpNo != 0) {
if (OpNo == 1)
unsigned MIOp = I->second.OperandList[OpNo].MIOperandNo;
if (I->second.isTwoAddress && MIOp != 0) {
if (MIOp == 1)
throw "Should refer to operand #0 instead of #1 for two-address"
" instruction '" + I->first + "'!";
--OpNo;
--MIOp;
}
O << "; " << I->second.OperandList[OpNo].PrinterMethodName
<< "(MI, " << I->second.OperandList[OpNo].MIOperandNo << ", MVT::"
<< "(MI, " << MIOp << ", MVT::"
<< getName(I->second.OperandList[OpNo].Ty) << "); O ";
LastEmitted = VarEnd;
}