LLVM API Documentation
#include "AlphaJITInfo.h"
#include "AlphaRelocations.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include <cstdlib>
#include <iostream>
#include <map>
Include dependency graph for AlphaJITInfo.cpp:
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "jit" |
#define | BUILD_OFormatI(Op, RA, LIT, FUN, RC) ((Op << 26) | (RA << 21) | (LIT << 13) | (1 << 12) | (FUN << 5) | (RC)) |
#define | BUILD_OFormat(Op, RA, RB, FUN, RC) ((Op << 26) | (RA << 21) | (RB << 16) | (FUN << 5) | (RC)) |
#define | BUILD_LDA(RD, RS, IMM16) ((0x08 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 65535)) |
#define | BUILD_LDAH(RD, RS, IMM16) ((0x09 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 65535)) |
#define | BUILD_LDQ(RD, RS, IMM16) ((0x29 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 0xFFFF)) |
#define | BUILD_JMP(RD, RS, IMM16) ((0x1A << 26) | ((RD) << 21) | ((RS) << 16) | (0x00 << 14) | ((IMM16) & 0x3FFF)) |
#define | BUILD_JSR(RD, RS, IMM16) ((0x1A << 26) | ((RD) << 21) | ((RS) << 16) | (0x01 << 14) | ((IMM16) & 0x3FFF)) |
#define | BUILD_SLLi(RD, RS, IMM8) (BUILD_OFormatI(0x12, RS, IMM8, 0x39, RD)) |
#define | BUILD_ORi(RD, RS, IMM8) (BUILD_OFormatI(0x11, RS, IMM8, 0x20, RD)) |
#define | BUILD_OR(RD, RS, RT) (BUILD_OFormat(0x11, RS, RT, 0x20, RD)) |
Functions | |
static void | EmitBranchToAt (void *At, void *To) |
void | AlphaCompilationCallback () |
static long | getUpper16 (long l) |
static long | getLower16 (long l) |
Variables | |
static TargetJITInfo::JITCompilerFn | JITCompilerFunction |
static const int | IMM_LOW = -32768 |
static const int | IMM_HIGH = 32767 |
static const int | IMM_MULT = 65536 |
#define BUILD_JMP | ( | RD, | |||
RS, | |||||
IMM16 | ) | ((0x1A << 26) | ((RD) << 21) | ((RS) << 16) | (0x00 << 14) | ((IMM16) & 0x3FFF)) |
#define BUILD_JSR | ( | RD, | |||
RS, | |||||
IMM16 | ) | ((0x1A << 26) | ((RD) << 21) | ((RS) << 16) | (0x01 << 14) | ((IMM16) & 0x3FFF)) |
Definition at line 40 of file AlphaJITInfo.cpp.
#define BUILD_LDA | ( | RD, | |||
RS, | |||||
IMM16 | ) | ((0x08 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 65535)) |
Definition at line 30 of file AlphaJITInfo.cpp.
#define BUILD_LDAH | ( | RD, | |||
RS, | |||||
IMM16 | ) | ((0x09 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 65535)) |
Definition at line 32 of file AlphaJITInfo.cpp.
#define BUILD_LDQ | ( | RD, | |||
RS, | |||||
IMM16 | ) | ((0x29 << 26) | ((RD) << 21) | ((RS) << 16) | ((IMM16) & 0xFFFF)) |
Definition at line 35 of file AlphaJITInfo.cpp.
#define BUILD_OFormat | ( | Op, | |||
RA, | |||||
RB, | |||||
FUN, | |||||
RC | ) | ((Op << 26) | (RA << 21) | (RB << 16) | (FUN << 5) | (RC)) |
Definition at line 27 of file AlphaJITInfo.cpp.
#define BUILD_OFormatI | ( | Op, | |||
RA, | |||||
LIT, | |||||
FUN, | |||||
RC | ) | ((Op << 26) | (RA << 21) | (LIT << 13) | (1 << 12) | (FUN << 5) | (RC)) |
Definition at line 25 of file AlphaJITInfo.cpp.
#define BUILD_OR | ( | RD, | |||
RS, | |||||
RT | ) | (BUILD_OFormat(0x11, RS, RT, 0x20, RD)) |
#define BUILD_ORi | ( | RD, | |||
RS, | |||||
IMM8 | ) | (BUILD_OFormatI(0x11, RS, IMM8, 0x20, RD)) |
#define BUILD_SLLi | ( | RD, | |||
RS, | |||||
IMM8 | ) | (BUILD_OFormatI(0x12, RS, IMM8, 0x39, RD)) |
#define DEBUG_TYPE "jit" |
Definition at line 14 of file AlphaJITInfo.cpp.
void AlphaCompilationCallback | ( | ) |
Definition at line 187 of file AlphaJITInfo.cpp.
Referenced by llvm::AlphaJITInfo::getLazyResolverFunction().
static void EmitBranchToAt | ( | void * | At, | |
void * | To | |||
) | [static] |
Definition at line 54 of file AlphaJITInfo.cpp.
References BUILD_JMP, BUILD_OR, BUILD_ORi, BUILD_SLLi, and DEBUG.
Referenced by llvm::PPCJITInfo::emitFunctionStub(), llvm::AlphaJITInfo::emitFunctionStub(), PPC32CompilationCallbackC(), and llvm::PPCJITInfo::replaceMachineCodeForFunction().
static long getLower16 | ( | long | l | ) | [static] |
Definition at line 229 of file AlphaJITInfo.cpp.
References getUpper16(), and IMM_MULT.
Referenced by llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::emitEpilogue(), llvm::AlphaRegisterInfo::emitPrologue(), and llvm::AlphaJITInfo::relocate().
static long getUpper16 | ( | long | l | ) | [static] |
Definition at line 218 of file AlphaJITInfo.cpp.
References IMM_HIGH, IMM_LOW, and IMM_MULT.
Referenced by llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::emitEpilogue(), llvm::AlphaRegisterInfo::emitPrologue(), getLower16(), and llvm::AlphaJITInfo::relocate().
const int IMM_HIGH = 32767 [static] |
Definition at line 215 of file AlphaJITInfo.cpp.
const int IMM_LOW = -32768 [static] |
Definition at line 214 of file AlphaJITInfo.cpp.
const int IMM_MULT = 65536 [static] |
Definition at line 216 of file AlphaJITInfo.cpp.
TargetJITInfo::JITCompilerFn JITCompilerFunction [static] |
Definition at line 78 of file AlphaJITInfo.cpp.
Referenced by llvm::X86JITInfo::getLazyResolverFunction(), llvm::PPCJITInfo::getLazyResolverFunction(), llvm::AlphaJITInfo::getLazyResolverFunction(), PPC32CompilationCallbackC(), and X86CompilationCallback2().