1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Fix previous broken commit. A MachineOperand may have opType ==

MO_VirtualRegister but if the register number is one of a physical
register is it considered as a physical register.

llvm-svn: 11315
This commit is contained in:
Alkis Evlogimenos 2004-02-11 05:55:00 +00:00
parent 427c8ee657
commit 30c37082ae

View File

@ -29,6 +29,7 @@
#include "llvm/CodeGen/MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetData.h"
#include "Support/Debug.h"
@ -656,9 +657,10 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
std::cerr << "ERROR: PC relative disp unhandled:" << MO << "\n";
abort();
}
} else if (MO.getType() == MachineOperand::MO_MachineRegister ||
MO.getType() == MachineOperand::MO_CCRegister)
} else if (MO.isRegister() || MO.getType() == MachineOperand::MO_CCRegister)
{
assert(MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
"virtual register in machine code!");
// This is necessary because the Sparc backend doesn't actually lay out
// registers in the real fashion -- it skips those that it chooses not to
// allocate, i.e. those that are the FP, SP, etc.