LLVM API Documentation

SparcV9JITInfo.cpp File Reference

#include "SparcV9JITInfo.h"
#include "SparcV9Relocations.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include <iostream>

Include dependency graph for SparcV9JITInfo.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "jit"
#define BUILD_SETHI(RD, C)   (((RD) << 25) | (4 << 22) | (C & ((1 << 22)-1)))
#define BUILD_ORI(RS, C, RD)
#define BUILD_BA(DISP)   ((8 << 25) | (2 << 22) | (DISP & ((1 << 22)-1)))
#define BUILD_CALL(OFFSET)   ((1 << 30) | (OFFSET & (1 << 30)-1))

Functions

static void InsertJumpAtAddr (int64_t JumpTarget, unsigned *Addr)
static void SaveRegisters (uint64_t DoubleFP[], uint64_t CC[], uint64_t Globals[])
static void RestoreRegisters (uint64_t DoubleFP[], uint64_t CC[], uint64_t Globals[])
static void CompilationCallback ()

Variables

static TargetJITInfo::JITCompilerFn JITCompilerFunction


Define Documentation

#define BUILD_BA ( DISP   )     ((8 << 25) | (2 << 22) | (DISP & ((1 << 22)-1)))

Definition at line 32 of file SparcV9JITInfo.cpp.

Referenced by InsertJumpAtAddr().

#define BUILD_CALL ( OFFSET   )     ((1 << 30) | (OFFSET & (1 << 30)-1))

Definition at line 33 of file SparcV9JITInfo.cpp.

Referenced by CompilationCallback().

#define BUILD_ORI ( RS,
C,
RD   ) 

Value:

((2 << 30) | (RD << 25) | (2 << 19) | (RS << 14) |\
                              (1 << 13) | (C & ((1 << 12)-1)))

Definition at line 30 of file SparcV9JITInfo.cpp.

#define BUILD_SETHI ( RD,
C   )     (((RD) << 25) | (4 << 22) | (C & ((1 << 22)-1)))

BUILD_SETHI/BUILD_ORI/BUILD_BA/BUILD_CALL - These macros build sparc machine instructions using lots of magic defined by the Sparc ISA.

Definition at line 29 of file SparcV9JITInfo.cpp.

Referenced by llvm::SparcV9JITInfo::emitFunctionStub(), and InsertJumpAtAddr().

#define DEBUG_TYPE   "jit"

Definition at line 14 of file SparcV9JITInfo.cpp.


Function Documentation

static void CompilationCallback (  )  [static]

Definition at line 189 of file SparcV9JITInfo.cpp.

References abort(), BUILD_CALL, DEBUG, InsertJumpAtAddr(), JITCompilerFunction, Offset, RestoreRegisters(), SaveRegisters(), and Target.

Referenced by llvm::SparcV9JITInfo::emitFunctionStub(), and llvm::SparcV9JITInfo::getLazyResolverFunction().

static void InsertJumpAtAddr ( int64_t  JumpTarget,
unsigned *  Addr 
) [static]

Definition at line 35 of file SparcV9JITInfo.cpp.

References BUILD_BA, BUILD_ORI, and BUILD_SETHI.

Referenced by CompilationCallback(), llvm::SparcV9JITInfo::emitFunctionStub(), and llvm::SparcV9JITInfo::replaceMachineCodeForFunction().

static void RestoreRegisters ( uint64_t  DoubleFP[],
uint64_t  CC[],
uint64_t  Globals[] 
) [static]

Definition at line 131 of file SparcV9JITInfo.cpp.

References abort().

Referenced by CompilationCallback().

static void SaveRegisters ( uint64_t  DoubleFP[],
uint64_t  CC[],
uint64_t  Globals[] 
) [static]

Definition at line 74 of file SparcV9JITInfo.cpp.

References abort().

Referenced by CompilationCallback().


Variable Documentation

TargetJITInfo::JITCompilerFn JITCompilerFunction [static]

JITCompilerFunction - This contains the address of the JIT function used to compile a function lazily.

Definition at line 25 of file SparcV9JITInfo.cpp.