mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-29 06:53:53 +00:00
Fixed printing of offset operand for RETURN instruction.
llvm-svn: 928
This commit is contained in:
parent
1b4a9b22ad
commit
a52d8bfb65
@ -110,7 +110,7 @@ private :
|
||||
case BRLEZ: case BRLZ:
|
||||
case BRNZ: case BRGZ:
|
||||
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...
|
||||
}
|
||||
@ -140,6 +140,8 @@ void SparcAsmPrinter::printOperand(const MachineOperand &Op) {
|
||||
Out << "\t<*NULL Value*>";
|
||||
} else if (const BasicBlock *BB = dyn_cast<const BasicBlock>(Val)) {
|
||||
Out << getID(BB);
|
||||
} else if (const Method *M = dyn_cast<const Method>(Val)) {
|
||||
Out << getID(M);
|
||||
} else {
|
||||
Out << "<unknown value=" << Val << ">";
|
||||
}
|
||||
@ -171,6 +173,15 @@ void SparcAsmPrinter::emitMachineInst(const MachineInstr *MI) {
|
||||
printOperand(MI->getOperand(2));
|
||||
Out << endl;
|
||||
return;
|
||||
|
||||
case RETURN:
|
||||
assert(MI->getNumOperands() == 2 && "Unexpected RETURN instr!");
|
||||
printOperand(MI->getOperand(0));
|
||||
Out << "+";
|
||||
printOperand(MI->getOperand(1));
|
||||
Out << endl;
|
||||
return;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user