Check if operand has an allocated reg before requesting it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-07-01 21:09:12 +00:00
parent 992dce13ec
commit 4363bdb0e5
3 changed files with 3 additions and 0 deletions

View File

@ -564,6 +564,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
} else {
for (i = 0; i < ArgCount; ++i) {
if (i == 1 && ArgCount == 3 && ArgType[2] == PPC32II::Simm16 &&
MI->getOperand(1).hasAllocatedReg() &&
MI->getOperand(1).getReg() == PPC32::R0) {
O << "0";
} else {

View File

@ -564,6 +564,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
} else {
for (i = 0; i < ArgCount; ++i) {
if (i == 1 && ArgCount == 3 && ArgType[2] == PPC32II::Simm16 &&
MI->getOperand(1).hasAllocatedReg() &&
MI->getOperand(1).getReg() == PPC32::R0) {
O << "0";
} else {

View File

@ -564,6 +564,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
} else {
for (i = 0; i < ArgCount; ++i) {
if (i == 1 && ArgCount == 3 && ArgType[2] == PPC32II::Simm16 &&
MI->getOperand(1).hasAllocatedReg() &&
MI->getOperand(1).getReg() == PPC32::R0) {
O << "0";
} else {