X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FAlpha%2FAlphaJITInfo.h;h=ecb467fbc5ec950f77ee29c58b207413b68b1c66;hb=26207e5bf1123a793bd9b38bcda2f569a6b45ef2;hp=a12f54698b5550cdc44833c3dc21cd200620d7d0;hpb=4ee451de366474b9c228b4e5fa573795a715216d;p=oota-llvm.git diff --git a/lib/Target/Alpha/AlphaJITInfo.h b/lib/Target/Alpha/AlphaJITInfo.h index a12f54698b5..ecb467fbc5e 100644 --- a/lib/Target/Alpha/AlphaJITInfo.h +++ b/lib/Target/Alpha/AlphaJITInfo.h @@ -15,8 +15,6 @@ #define ALPHA_JITINFO_H #include "llvm/Target/TargetJITInfo.h" -#include "llvm/GlobalValue.h" -#include #include namespace llvm { @@ -25,11 +23,16 @@ namespace llvm { class AlphaJITInfo : public TargetJITInfo { protected: TargetMachine &TM; + + //because gpdist are paired and relative to the pc of the first inst, + //we need to have some state + std::map, void*> gpdistmap; public: - AlphaJITInfo(TargetMachine &tm) : TM(tm) + explicit AlphaJITInfo(TargetMachine &tm) : TM(tm) { useGOT = true; } - virtual void *emitFunctionStub(void *Fn, MachineCodeEmitter &MCE); + virtual void *emitFunctionStub(const Function* F, void *Fn, + JITCodeEmitter &JCE); virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn); virtual void relocate(void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char* GOTBase);