LLVM API Documentation
#include "PPCJITInfo.h"
#include "PPCRelocations.h"
#include "PPCTargetMachine.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Memory.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "jit" |
#define | BUILD_ADDIS(RD, RS, IMM16) ((15 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 65535)) |
#define | BUILD_ORI(RD, RS, UIMM16) ((24 << 26) | ((RS) << 21) | ((RD) << 16) | ((UIMM16) & 65535)) |
#define | BUILD_ORIS(RD, RS, UIMM16) ((25 << 26) | ((RS) << 21) | ((RD) << 16) | ((UIMM16) & 65535)) |
#define | BUILD_RLDICR(RD, RS, SH, ME) |
#define | BUILD_MTSPR(RS, SPR) ((31 << 26) | ((RS) << 21) | ((SPR) << 16) | (467 << 1)) |
#define | BUILD_BCCTRx(BO, BI, LINK) ((19 << 26) | ((BO) << 21) | ((BI) << 16) | (528 << 1) | ((LINK) & 1)) |
#define | BUILD_B(TARGET, LINK) ((18 << 26) | (((TARGET) & 0x00FFFFFF) << 2) | ((LINK) & 1)) |
#define | BUILD_LIS(RD, IMM16) BUILD_ADDIS(RD,0,IMM16) |
#define | BUILD_SLDI(RD, RS, IMM6) BUILD_RLDICR(RD,RS,IMM6,63-IMM6) |
#define | BUILD_MTCTR(RS) BUILD_MTSPR(RS,9) |
#define | BUILD_BCTR(LINK) BUILD_BCCTRx(20,0,LINK) |
Functions | |
static void | EmitBranchToAt (uint64_t At, uint64_t To, bool isCall, bool is64Bit) |
void | PPC32CompilationCallback () |
void | PPC64CompilationCallback () |
LLVM_LIBRARY_VISIBILITY void * | LLVMPPCCompilationCallback (unsigned *StubCallAddrPlus4, unsigned *OrigCallAddrPlus4, bool is64Bit) |
Variables | |
static TargetJITInfo::JITCompilerFn | JITCompilerFunction |
#define BUILD_ADDIS | ( | RD, | |
RS, | |||
IMM16 | |||
) | ((15 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 65535)) |
Definition at line 27 of file PPCJITInfo.cpp.
#define BUILD_B | ( | TARGET, | |
LINK | |||
) | ((18 << 26) | (((TARGET) & 0x00FFFFFF) << 2) | ((LINK) & 1)) |
Definition at line 40 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define BUILD_BCCTRx | ( | BO, | |
BI, | |||
LINK | |||
) | ((19 << 26) | ((BO) << 21) | ((BI) << 16) | (528 << 1) | ((LINK) & 1)) |
Definition at line 38 of file PPCJITInfo.cpp.
#define BUILD_BCTR | ( | LINK | ) | BUILD_BCCTRx(20,0,LINK) |
Definition at line 47 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define BUILD_LIS | ( | RD, | |
IMM16 | |||
) | BUILD_ADDIS(RD,0,IMM16) |
Definition at line 44 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define BUILD_MTCTR | ( | RS | ) | BUILD_MTSPR(RS,9) |
Definition at line 46 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define BUILD_MTSPR | ( | RS, | |
SPR | |||
) | ((31 << 26) | ((RS) << 21) | ((SPR) << 16) | (467 << 1)) |
Definition at line 36 of file PPCJITInfo.cpp.
#define BUILD_ORI | ( | RD, | |
RS, | |||
UIMM16 | |||
) | ((24 << 26) | ((RS) << 21) | ((RD) << 16) | ((UIMM16) & 65535)) |
Definition at line 29 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define BUILD_ORIS | ( | RD, | |
RS, | |||
UIMM16 | |||
) | ((25 << 26) | ((RS) << 21) | ((RD) << 16) | ((UIMM16) & 65535)) |
Definition at line 31 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define BUILD_RLDICR | ( | RD, | |
RS, | |||
SH, | |||
ME | |||
) |
Definition at line 33 of file PPCJITInfo.cpp.
#define BUILD_SLDI | ( | RD, | |
RS, | |||
IMM6 | |||
) | BUILD_RLDICR(RD,RS,IMM6,63-IMM6) |
Definition at line 45 of file PPCJITInfo.cpp.
Referenced by EmitBranchToAt().
#define DEBUG_TYPE "jit" |
Definition at line 14 of file PPCJITInfo.cpp.
Definition at line 49 of file PPCJITInfo.cpp.
References BUILD_B, BUILD_BCTR, BUILD_LIS, BUILD_MTCTR, BUILD_ORI, BUILD_ORIS, and BUILD_SLDI.
Referenced by llvm::PPCJITInfo::emitFunctionStub(), LLVMPPCCompilationCallback(), and llvm::PPCJITInfo::replaceMachineCodeForFunction().
LLVM_LIBRARY_VISIBILITY void* LLVMPPCCompilationCallback | ( | unsigned * | StubCallAddrPlus4, |
unsigned * | OrigCallAddrPlus4, | ||
bool | is64Bit | ||
) |
Definition at line 296 of file PPCJITInfo.cpp.
References EmitBranchToAt(), llvm::sys::Memory::InvalidateInstructionCache(), and JITCompilerFunction.
void PPC32CompilationCallback | ( | ) |
Definition at line 77 of file PPCJITInfo.cpp.
References llvm_unreachable.
Referenced by llvm::PPCJITInfo::emitFunctionStub(), and llvm::PPCJITInfo::getLazyResolverFunction().
void PPC64CompilationCallback | ( | ) |
Definition at line 208 of file PPCJITInfo.cpp.
References llvm_unreachable.
Referenced by llvm::PPCJITInfo::emitFunctionStub(), and llvm::PPCJITInfo::getLazyResolverFunction().
|
static |
Definition at line 25 of file PPCJITInfo.cpp.
Referenced by llvm::PPCJITInfo::getLazyResolverFunction(), and LLVMPPCCompilationCallback().