LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AlphaJITInfo.h

Go to the documentation of this file.
00001 //===- AlphaJITInfo.h - Alpha impl. of the JIT interface ----*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains the Alpha implementation of the TargetJITInfo class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef ALPHA_JITINFO_H
00015 #define ALPHA_JITINFO_H
00016 
00017 #include "llvm/Target/TargetJITInfo.h"
00018 
00019 namespace llvm {
00020   class TargetMachine;
00021 
00022   class AlphaJITInfo : public TargetJITInfo {
00023   protected:
00024     TargetMachine &TM;
00025   public:
00026     explicit AlphaJITInfo(TargetMachine &tm) : TM(tm)
00027     { useGOT = true; }
00028 
00029     virtual void *emitFunctionStub(const Function* F, void *Fn,
00030                                    MachineCodeEmitter &MCE);
00031     virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn);
00032     virtual void relocate(void *Function, MachineRelocation *MR,
00033                           unsigned NumRelocs, unsigned char* GOTBase);
00034 
00035     /// replaceMachineCodeForFunction - Make it so that calling the function
00036     /// whose machine code is at OLD turns into a call to NEW, perhaps by
00037     /// overwriting OLD with a branch to NEW.  This is used for self-modifying
00038     /// code.
00039     ///
00040     virtual void replaceMachineCodeForFunction(void *Old, void *New);
00041   private:
00042     static const unsigned GOToffset = 4096;
00043 
00044   };
00045 }
00046 
00047 #endif



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.