25 #ifndef _JIT_COMPILER2_MACHINEINSTRUCTIONS
26 #define _JIT_COMPILER2_MACHINEINSTRUCTIONS
35 class MachineReplacementEntryInst;
36 class MachineReplacementPointCallSiteInst;
37 class MachineReplacementPointStaticSpecialInst;
38 class MachineDeoptInst;
55 num_operands), phi(phi) {
56 for(
unsigned i = 0;
i < num_operands; ++
i) {
75 class MachineConstInst :
public MachineInstruction {
80 MachineConstInst(
s8 value) : MachineInstruction(
"MConst",
81 new Immediate(value), 0) {}
83 virtual void emit(CodeMemory* CM)
const {};
89 class MachineLoadInst :
public MachineInstruction {
94 : MachineInstruction(
"MLoad", dst, 1) {
103 class MachineStoreInst :
public MachineInstruction {
108 : MachineInstruction(
"MStore", dst, 1) {
109 operands[0].op = src;
114 class MachineOperandInst :
public MachineInstruction {
118 MachineOperandInst(MachineOperand *MO)
119 : MachineInstruction(
"MachineOperandInst", MO, 0), MO(MO) {
135 class MachineMoveInst :
public MachineInstruction {
137 MachineMoveInst(
const char*
name,
140 : MachineInstruction(name, dst, 1) {
141 operands[0].op = src;
143 virtual bool accepts_immediate(
unsigned i, Immediate *imm)
const {
146 virtual MachineMoveInst* to_MachineMoveInst() {
149 virtual void emit(CodeMemory* CM)
const = 0;
virtual bool is_label() const
virtual bool is_trappable() const
PHIInst * get_PHIInst() const
MachineInstruction * get_call_inst() const
MachineReplacementPointStaticSpecialInst(MachineInstruction *call_inst, s4 source_id, std::size_t num_operands, DataSegment::IdxTy idx)
virtual void emit(CodeMemory *CM) const
emit machine code
virtual MachineReplacementPointCallSiteInst * to_MachineReplacementPointCallSiteInst()
void set_javalocal_index(std::size_t i, s4 javalocal_index)
Set the javalocal index of the i-th operand of this instruction.
virtual void link(CodeFragment &CF) const
link machine code
virtual void emit(CodeMemory *CM) const
emit machine code
virtual bool is_trappable() const
Represents a point in the program, where it is possible to recover the source state to perform on-sta...
MachinePhiInst(unsigned num_operands, Type::TypeID type, PHIInst *phi)
virtual MachineReplacementPointStaticSpecialInst * to_MachineReplacementPointStaticSpecialInst()
virtual void link(CodeFragment &CF) const
link machine code
JNIEnv jclass jobject const char * name
virtual MachineReplacementPointCallSiteInst * to_MachineReplacementPointCallSiteInst()
virtual MachineDeoptInst * to_MachineDeoptInst()
MachineDeoptInst(s4 source_id, std::size_t num_operands)
MachineJumpInst(const char *name)
virtual MachineReplacementEntryInst * to_MachineReplacementEntryInst()
MachineInstruction * call_inst
virtual bool is_phi() const
virtual void emit(CodeMemory *CM) const =0
emit machine code
virtual bool is_trappable() const
JavalocalIndexMapTy javalocal_indices
virtual void emit(CodeMemory *CM) const
emit machine code
std::size_t op_size() const
std::vector< T, Allocator< T > > type
virtual bool is_trappable() const =0
virtual MachineReplacementPointInst * to_MachineReplacementPointInst()
alloc::vector< s4 >::type JavalocalIndexMapTy
Specialication for INVOKESpecial and INVOKEStatic.
DataSegment::IdxTy get_idx() const
virtual MachineReplacementPointStaticSpecialInst * to_MachineReplacementPointStaticSpecialInst()
DataSegment::IdxTy idx
DataSegment index that contains the address of the call target.
virtual void link(CodeFragment &CF) const
link machine code
MachineReplacementPointInst(const char *name, s4 source_id, std::size_t num_operands)
Proxy to encode explicit and implicit successors.
virtual void emit(CodeMemory *CM) const
emit machine code
MachineReplacementPointCallSiteInst(MachineInstruction *call_inst, s4 source_id, std::size_t num_operands)
Represents a replacement point at a call site (INVOKE* ICMDs) The reference to the corresponding call...
MachineReplacementEntryInst(s4 source_id, std::size_t num_operands)
virtual MachinePhiInst * to_MachinePhiInst()
virtual void link(CodeFragment &CF) const
link machine code
s4 get_javalocal_index(std::size_t i)
virtual MachineReplacementEntryInst * to_MachineReplacementEntryInst()
virtual void link(CodeFragment &CF) const =0
link machine code
virtual MachineDeoptInst * to_MachineDeoptInst()
virtual void emit(CodeMemory *CM) const
emit machine code
virtual void emit(CodeMemory *CM) const
emit machine code