Monero
Loading...
Searching...
No Matches
randomx::JitCompilerX86 Class Reference

#include <jit_compiler_x86.hpp>

Public Member Functions

 JitCompilerX86 ()
 ~JitCompilerX86 ()
void generateProgram (Program &, ProgramConfiguration &)
void generateProgramLight (Program &, ProgramConfiguration &, uint32_t)
template<size_t N>
void generateSuperscalarHash (SuperscalarProgram(&programs)[N], std::vector< uint64_t > &)
void generateDatasetInitCode ()
ProgramFuncgetProgramFunc ()
DatasetInitFuncgetDatasetInitFunc ()
uint8_tgetCode ()
size_t getCodeSize ()
void enableWriting ()
void enableExecution ()
void enableAll ()

Private Member Functions

void generateProgramPrologue (Program &, ProgramConfiguration &)
void generateProgramEpilogue (Program &, ProgramConfiguration &)
void genAddressReg (Instruction &, bool)
void genAddressRegDst (Instruction &)
void genAddressImm (Instruction &)
void genSIB (int scale, int index, int base)
void generateCode (Instruction &, int)
void generateSuperscalarCode (Instruction &, std::vector< uint64_t > &)
void emitByte (uint8_t val)
void emit32 (uint32_t val)
void emit64 (uint64_t val)
template<size_t N>
void emit (const uint8_t(&src)[N])
void emit (const uint8_t *src, size_t count)
void h_IADD_RS (Instruction &, int)
void h_IADD_M (Instruction &, int)
void h_ISUB_R (Instruction &, int)
void h_ISUB_M (Instruction &, int)
void h_IMUL_R (Instruction &, int)
void h_IMUL_M (Instruction &, int)
void h_IMULH_R (Instruction &, int)
void h_IMULH_M (Instruction &, int)
void h_ISMULH_R (Instruction &, int)
void h_ISMULH_M (Instruction &, int)
void h_IMUL_RCP (Instruction &, int)
void h_INEG_R (Instruction &, int)
void h_IXOR_R (Instruction &, int)
void h_IXOR_M (Instruction &, int)
void h_IROR_R (Instruction &, int)
void h_IROL_R (Instruction &, int)
void h_ISWAP_R (Instruction &, int)
void h_FSWAP_R (Instruction &, int)
void h_FADD_R (Instruction &, int)
void h_FADD_M (Instruction &, int)
void h_FSUB_R (Instruction &, int)
void h_FSUB_M (Instruction &, int)
void h_FSCAL_R (Instruction &, int)
void h_FMUL_R (Instruction &, int)
void h_FDIV_M (Instruction &, int)
void h_FSQRT_R (Instruction &, int)
void h_CBRANCH (Instruction &, int)
void h_CFROUND (Instruction &, int)
void h_ISTORE (Instruction &, int)
void h_NOP (Instruction &, int)

Private Attributes

std::vector< int32_tinstructionOffsets
int registerUsage [RegistersCount]
uint8_tcode
int32_t codePos

Static Private Attributes

static InstructionGeneratorX86 engine [256]

Constructor & Destructor Documentation

◆ JitCompilerX86()

randomx::JitCompilerX86::JitCompilerX86 ( )

◆ ~JitCompilerX86()

randomx::JitCompilerX86::~JitCompilerX86 ( )

Member Function Documentation

◆ emit() [1/2]

void randomx::JitCompilerX86::emit ( const uint8_t * src,
size_t count )
inlineprivate

◆ emit() [2/2]

template<size_t N>
void randomx::JitCompilerX86::emit ( const uint8_t(&) src[N])
inlineprivate

◆ emit32()

void randomx::JitCompilerX86::emit32 ( uint32_t val)
inlineprivate

◆ emit64()

void randomx::JitCompilerX86::emit64 ( uint64_t val)
inlineprivate

◆ emitByte()

void randomx::JitCompilerX86::emitByte ( uint8_t val)
inlineprivate

◆ enableAll()

void randomx::JitCompilerX86::enableAll ( )

◆ enableExecution()

void randomx::JitCompilerX86::enableExecution ( )

◆ enableWriting()

void randomx::JitCompilerX86::enableWriting ( )

◆ genAddressImm()

void randomx::JitCompilerX86::genAddressImm ( Instruction & instr)
private

◆ genAddressReg()

void randomx::JitCompilerX86::genAddressReg ( Instruction & instr,
bool rax = true )
private

◆ genAddressRegDst()

void randomx::JitCompilerX86::genAddressRegDst ( Instruction & instr)
private

◆ generateCode()

void randomx::JitCompilerX86::generateCode ( Instruction & instr,
int i )
private

◆ generateDatasetInitCode()

void randomx::JitCompilerX86::generateDatasetInitCode ( )

◆ generateProgram()

void randomx::JitCompilerX86::generateProgram ( Program & prog,
ProgramConfiguration & pcfg )

◆ generateProgramEpilogue()

void randomx::JitCompilerX86::generateProgramEpilogue ( Program & prog,
ProgramConfiguration & pcfg )
private

◆ generateProgramLight()

void randomx::JitCompilerX86::generateProgramLight ( Program & prog,
ProgramConfiguration & pcfg,
uint32_t datasetOffset )

◆ generateProgramPrologue()

void randomx::JitCompilerX86::generateProgramPrologue ( Program & prog,
ProgramConfiguration & pcfg )
private

◆ generateSuperscalarCode()

void randomx::JitCompilerX86::generateSuperscalarCode ( Instruction & instr,
std::vector< uint64_t > & reciprocalCache )
private

◆ generateSuperscalarHash()

template<size_t N>
template void randomx::JitCompilerX86::generateSuperscalarHash ( SuperscalarProgram(&) programs[N],
std::vector< uint64_t > &  )

◆ genSIB()

void randomx::JitCompilerX86::genSIB ( int scale,
int index,
int base )
private

◆ getCode()

uint8_t * randomx::JitCompilerX86::getCode ( )
inline

◆ getCodeSize()

size_t randomx::JitCompilerX86::getCodeSize ( )

◆ getDatasetInitFunc()

DatasetInitFunc * randomx::JitCompilerX86::getDatasetInitFunc ( )
inline

◆ getProgramFunc()

ProgramFunc * randomx::JitCompilerX86::getProgramFunc ( )
inline

◆ h_CBRANCH()

void randomx::JitCompilerX86::h_CBRANCH ( Instruction & instr,
int i )
private

◆ h_CFROUND()

void randomx::JitCompilerX86::h_CFROUND ( Instruction & instr,
int i )
private

◆ h_FADD_M()

void randomx::JitCompilerX86::h_FADD_M ( Instruction & instr,
int i )
private

◆ h_FADD_R()

void randomx::JitCompilerX86::h_FADD_R ( Instruction & instr,
int i )
private

◆ h_FDIV_M()

void randomx::JitCompilerX86::h_FDIV_M ( Instruction & instr,
int i )
private

◆ h_FMUL_R()

void randomx::JitCompilerX86::h_FMUL_R ( Instruction & instr,
int i )
private

◆ h_FSCAL_R()

void randomx::JitCompilerX86::h_FSCAL_R ( Instruction & instr,
int i )
private

◆ h_FSQRT_R()

void randomx::JitCompilerX86::h_FSQRT_R ( Instruction & instr,
int i )
private

◆ h_FSUB_M()

void randomx::JitCompilerX86::h_FSUB_M ( Instruction & instr,
int i )
private

◆ h_FSUB_R()

void randomx::JitCompilerX86::h_FSUB_R ( Instruction & instr,
int i )
private

◆ h_FSWAP_R()

void randomx::JitCompilerX86::h_FSWAP_R ( Instruction & instr,
int i )
private

◆ h_IADD_M()

void randomx::JitCompilerX86::h_IADD_M ( Instruction & instr,
int i )
private

◆ h_IADD_RS()

void randomx::JitCompilerX86::h_IADD_RS ( Instruction & instr,
int i )
private

◆ h_IMUL_M()

void randomx::JitCompilerX86::h_IMUL_M ( Instruction & instr,
int i )
private

◆ h_IMUL_R()

void randomx::JitCompilerX86::h_IMUL_R ( Instruction & instr,
int i )
private

◆ h_IMUL_RCP()

void randomx::JitCompilerX86::h_IMUL_RCP ( Instruction & instr,
int i )
private

◆ h_IMULH_M()

void randomx::JitCompilerX86::h_IMULH_M ( Instruction & instr,
int i )
private

◆ h_IMULH_R()

void randomx::JitCompilerX86::h_IMULH_R ( Instruction & instr,
int i )
private

◆ h_INEG_R()

void randomx::JitCompilerX86::h_INEG_R ( Instruction & instr,
int i )
private

◆ h_IROL_R()

void randomx::JitCompilerX86::h_IROL_R ( Instruction & instr,
int i )
private

◆ h_IROR_R()

void randomx::JitCompilerX86::h_IROR_R ( Instruction & instr,
int i )
private

◆ h_ISMULH_M()

void randomx::JitCompilerX86::h_ISMULH_M ( Instruction & instr,
int i )
private

◆ h_ISMULH_R()

void randomx::JitCompilerX86::h_ISMULH_R ( Instruction & instr,
int i )
private

◆ h_ISTORE()

void randomx::JitCompilerX86::h_ISTORE ( Instruction & instr,
int i )
private

◆ h_ISUB_M()

void randomx::JitCompilerX86::h_ISUB_M ( Instruction & instr,
int i )
private

◆ h_ISUB_R()

void randomx::JitCompilerX86::h_ISUB_R ( Instruction & instr,
int i )
private

◆ h_ISWAP_R()

void randomx::JitCompilerX86::h_ISWAP_R ( Instruction & instr,
int i )
private

◆ h_IXOR_M()

void randomx::JitCompilerX86::h_IXOR_M ( Instruction & instr,
int i )
private

◆ h_IXOR_R()

void randomx::JitCompilerX86::h_IXOR_R ( Instruction & instr,
int i )
private

◆ h_NOP()

void randomx::JitCompilerX86::h_NOP ( Instruction & instr,
int i )
private

Member Data Documentation

◆ code

uint8_t* randomx::JitCompilerX86::code
private

◆ codePos

int32_t randomx::JitCompilerX86::codePos
private

◆ engine

InstructionGeneratorX86 randomx::JitCompilerX86::engine
staticprivate

◆ instructionOffsets

std::vector<int32_t> randomx::JitCompilerX86::instructionOffsets
private

◆ registerUsage

int randomx::JitCompilerX86::registerUsage[RegistersCount]
private

The documentation for this class was generated from the following files: