mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 12:50:42 +00:00
Fixed printing of offset operand for RETURN instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ea21a6c82a
commit
2827d52868
@ -110,7 +110,7 @@ private :
|
|||||||
case BRLEZ: case BRLZ:
|
case BRLEZ: case BRLZ:
|
||||||
case BRNZ: case BRGZ:
|
case BRNZ: case BRGZ:
|
||||||
case BRGEZ: return 1 << 0;
|
case BRGEZ: return 1 << 0;
|
||||||
case RETURN: return 1 << 1; // Remove Arg #2 which is zero
|
// case RETURN: return 1 << 1; // Remove Arg #2 which is zero
|
||||||
|
|
||||||
default: return 0; // By default, don't hack operands...
|
default: return 0; // By default, don't hack operands...
|
||||||
}
|
}
|
||||||
@ -140,6 +140,8 @@ void SparcAsmPrinter::printOperand(const MachineOperand &Op) {
|
|||||||
Out << "\t<*NULL Value*>";
|
Out << "\t<*NULL Value*>";
|
||||||
} else if (const BasicBlock *BB = dyn_cast<const BasicBlock>(Val)) {
|
} else if (const BasicBlock *BB = dyn_cast<const BasicBlock>(Val)) {
|
||||||
Out << getID(BB);
|
Out << getID(BB);
|
||||||
|
} else if (const Method *M = dyn_cast<const Method>(Val)) {
|
||||||
|
Out << getID(M);
|
||||||
} else {
|
} else {
|
||||||
Out << "<unknown value=" << Val << ">";
|
Out << "<unknown value=" << Val << ">";
|
||||||
}
|
}
|
||||||
@ -171,6 +173,15 @@ void SparcAsmPrinter::emitMachineInst(const MachineInstr *MI) {
|
|||||||
printOperand(MI->getOperand(2));
|
printOperand(MI->getOperand(2));
|
||||||
Out << endl;
|
Out << endl;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case RETURN:
|
||||||
|
assert(MI->getNumOperands() == 2 && "Unexpected RETURN instr!");
|
||||||
|
printOperand(MI->getOperand(0));
|
||||||
|
Out << "+";
|
||||||
|
printOperand(MI->getOperand(1));
|
||||||
|
Out << endl;
|
||||||
|
return;
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user