} else if (MO.isImmediate()) {
return MO.getImmedValue();
} else if (MO.isPCRelativeDisp()) {
- // FIXME!!!
- //return MO.getPCRelativeDisp();
+ MCE->saveBBreference(currBB, MO);
return 0;
} else {
assert(0 && "Unknown type of MachineOperand");
}
void SparcV9CodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) {
+ currBB = MBB.getBasicBlock();
MCE.startBasicBlock(MBB);
for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I)
emitInstruction(**I);
#ifndef SPARCV9CODEEMITTER_H
#define SPARCV9CODEEMITTER_H
+#include "llvm/BasicBlock.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
class SparcV9CodeEmitter : public MachineFunctionPass {
MachineCodeEmitter &MCE;
+ BasicBlock *BB;
public:
SparcV9CodeEmitter(MachineCodeEmitter &M) : MCE(M) {}