#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/Config/alloca.h"
#include <cstdlib>
+#include <cstring>
using namespace llvm;
#ifdef _MSC_VER
MCE.emitWordLE(((unsigned *)&GV)[1]);
#else
MCE.startFunctionStub(4, 4);
- MCE.emitWordLE((unsigned)GV);
+ MCE.emitWordLE((intptr_t)GV);
#endif
return MCE.finishFunctionStub(0);
}
return MCE.finishFunctionStub(0);
}
+/// getPICJumpTableEntry - Returns the value of the jumptable entry for the
+/// specific basic block.
+intptr_t X86JITInfo::getPICJumpTableEntry(intptr_t BB, intptr_t Entry) {
+ return BB - PICBase;
+}
+
/// relocate - Before the JIT can run a block of code that has been emitted,
/// it must rewrite the code to contain the actual addresses of any
/// referenced global symbols.