summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCCodeEmitter.cpp
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-02-13 18:39:37 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-02-13 18:39:37 +0000
commitafe6c2b001a924cd74bd0aacfed5984d9af004b0 (patch)
treee028f30be64937c842b04895eab4abe731478dfb /lib/Target/PowerPC/PPCCodeEmitter.cpp
parent84ad8378eea47288fb1c923312689bdd01cd4264 (diff)
downloadllvm-afe6c2b001a924cd74bd0aacfed5984d9af004b0.tar.gz
llvm-afe6c2b001a924cd74bd0aacfed5984d9af004b0.tar.bz2
llvm-afe6c2b001a924cd74bd0aacfed5984d9af004b0.tar.xz
Enable exception handling int JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCCodeEmitter.cpp')
-rw-r--r--lib/Target/PowerPC/PPCCodeEmitter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCCodeEmitter.cpp b/lib/Target/PowerPC/PPCCodeEmitter.cpp
index 8f5e6fcbf0..a23f4e41eb 100644
--- a/lib/Target/PowerPC/PPCCodeEmitter.cpp
+++ b/lib/Target/PowerPC/PPCCodeEmitter.cpp
@@ -20,6 +20,7 @@
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
+#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Compiler.h"
@@ -38,6 +39,11 @@ namespace {
/// getMachineOpValue - evaluates the MachineOperand of a given MachineInstr
///
int getMachineOpValue(MachineInstr &MI, MachineOperand &MO);
+
+ void getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.addRequired<MachineModuleInfo>();
+ MachineFunctionPass::getAnalysisUsage(AU);
+ }
public:
static char ID;
@@ -82,6 +88,8 @@ bool PPCCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
assert((MF.getTarget().getRelocationModel() != Reloc::Default ||
MF.getTarget().getRelocationModel() != Reloc::Static) &&
"JIT relocation model must be set to static or default!");
+
+ MCE.setModuleInfo(&getAnalysis<MachineModuleInfo>());
do {
MovePCtoLROffset = 0;
MCE.startFunction(MF);
@@ -101,6 +109,9 @@ void PPCCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) {
default:
MCE.emitWordBE(getBinaryCodeForInstr(*I));
break;
+ case TargetInstrInfo::LABEL:
+ MCE.emitLabel(MI.getOperand(0).getImm());
+ break;
case PPC::IMPLICIT_DEF_GPRC:
case PPC::IMPLICIT_DEF_G8RC:
case PPC::IMPLICIT_DEF_F8: