[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Feb 10 23:56:02 PST 2004
Changes in directory llvm/lib/Target/Sparc:
SparcV9CodeEmitter.cpp updated: 1.52 -> 1.53
---
Log message:
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.
---
Diffs of the changes: (+4 -2)
Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp
diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.52 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.53
--- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.52 Tue Feb 10 22:52:30 2004
+++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Tue Feb 10 23:55:00 2004
@@ -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 @@
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.
More information about the llvm-commits
mailing list