CACAO
Public Types | Public Member Functions | Private Attributes
cacao::jit::compiler2::x86_64::GPInstruction Class Reference

Superclass for general purpose register instruction. More...

Inheritance diagram for cacao::jit::compiler2::x86_64::GPInstruction:
cacao::jit::compiler2::x86_64::X86_64Instruction cacao::jit::compiler2::MachineInstruction cacao::jit::compiler2::memory::ManagerMixin< MachineInstruction > cacao::jit::compiler2::x86_64::ALUInstruction cacao::jit::compiler2::x86_64::CallInst cacao::jit::compiler2::x86_64::CDQInst cacao::jit::compiler2::x86_64::CMovInst cacao::jit::compiler2::x86_64::FLDInst cacao::jit::compiler2::x86_64::FPRemInst cacao::jit::compiler2::x86_64::FSTPInst cacao::jit::compiler2::x86_64::IDivInst cacao::jit::compiler2::x86_64::IMulImmInst cacao::jit::compiler2::x86_64::IMulInst cacao::jit::compiler2::x86_64::LEAInst cacao::jit::compiler2::x86_64::MovDSEGInst cacao::jit::compiler2::x86_64::MoveInst cacao::jit::compiler2::x86_64::MovModRMInst cacao::jit::compiler2::x86_64::NegInst cacao::jit::compiler2::x86_64::RetInst cacao::jit::compiler2::x86_64::SSEAluInst cacao::jit::compiler2::x86_64::UCOMISInst cacao::jit::compiler2::x86_64::XORPInst

Public Types

enum  OperandSize {
  OS_8 = 1, OS_16 = 2, OS_32 = 4, OS_64 = 8,
  NO_SIZE = 0
}
 
enum  OperandType {
  Reg8, Reg16, Reg32, Reg64,
  Mem8, Mem16, Mem32, Mem64,
  NO_RESULT
}
 
enum  OpEncoding {
  Reg8Imm8, Reg16Imm16, Reg32Imm32, Reg64Imm64,
  MemImm8, MemImm16, MemImm32, MemImm64,
  Reg16Imm8, Reg32Imm8, Reg64Imm8, RegReg8,
  RegReg16, RegReg32, RegReg64, RegMem8,
  RegMem16, RegMem32, RegMem64, MemReg8,
  MemReg16, MemReg32, MemReg64, NO_ENCODING
}
 
- Public Types inherited from cacao::jit::compiler2::MachineInstruction
typedef alloc::vector
< MachineOperandDesc >::type 
operand_list
 
typedef operand_list::iterator operand_iterator
 
typedef
operand_list::const_iterator 
const_operand_iterator
 
typedef alloc::vector
< MachineOperandDesc >::type 
dummy_operand_list
 
typedef
dummy_operand_list::iterator 
dummy_operand_iterator
 
typedef
dummy_operand_list::const_iterator 
const_dummy_operand_iterator
 
typedef alloc::unordered_map
< EmbeddedMachineOperand
*, int >::type 
RefMapTy
 
typedef alloc::list
< MachineBasicBlock * >::type 
successor_list
 
typedef successor_list::iterator successor_iterator
 
typedef
successor_list::const_iterator 
const_successor_iterator
 

Public Member Functions

 GPInstruction (const char *name, MachineOperand *result, OperandSize op_size, std::size_t num_operands)
 
OperandSize get_op_size () const
 
- Public Member Functions inherited from cacao::jit::compiler2::x86_64::X86_64Instruction
 X86_64Instruction (const char *name, MachineOperand *result, std::size_t num_operands)
 
- Public Member Functions inherited from cacao::jit::compiler2::MachineInstruction
 MachineInstruction (const char *name, MachineOperand *result, std::size_t num_operands, const char *comment=NULL)
 
void set_comment (const char *c)
 
const char * get_comment () const
 
void set_operand (std::size_t i, MachineOperand *op)
 
void finalize_operands ()
 has to be called after all operands with embedded operands have been added More...
 
virtual void set_block (MachineBasicBlock *MBB)
 
MachineBasicBlockget_block () const
 
std::size_t op_size () const
 
MachineOperandDescoperator[] (std::size_t i)
 
const MachineOperandDescget (std::size_t i) const
 
MachineOperandDescget (std::size_t i)
 
operand_iterator begin ()
 
operand_iterator end ()
 
operand_iterator find (MachineOperand *op)
 
MachineOperandDescfront ()
 
MachineOperandDescback ()
 
const_operand_iterator begin () const
 
const_operand_iterator end () const
 
std::size_t dummy_op_size () const
 
const MachineOperandDescget_dummy (std::size_t i) const
 
MachineOperandDescget_dummy (std::size_t i)
 
dummy_operand_iterator dummy_begin ()
 
dummy_operand_iterator dummy_end ()
 
dummy_operand_iterator find_dummy (MachineOperand *op)
 
MachineOperandDescdummy_front ()
 
MachineOperandDescdummy_back ()
 
const_dummy_operand_iterator dummy_begin () const
 
const_dummy_operand_iterator dummy_end () const
 
successor_iterator successor_begin ()
 
successor_iterator successor_end ()
 
const_successor_iterator successor_begin () const
 
MachineBasicBlocksuccessor_front () const
 
MachineBasicBlocksuccessor_back () const
 
const_successor_iterator successor_end () const
 
std::size_t successor_size () const
 
bool successor_empty () const
 
std::size_t get_id () const
 
const char * get_name () const
 
const MachineOperandDescget_result () const
 
MachineOperandDescget_result ()
 
void set_result (MachineOperand *MO)
 
virtual bool accepts_immediate (std::size_t i, Immediate *imm) const
 
virtual bool is_label () const
 
virtual bool is_phi () const
 
virtual bool is_move () const
 
virtual bool is_jump () const
 
virtual bool is_end () const
 
virtual MachineMoveInst * to_MachineMoveInst ()
 
virtual MachinePhiInstto_MachinePhiInst ()
 
OStreamprint (OStream &OS) const
 print instruction More...
 
virtual OStreamprint_successor_label (OStream &OS, std::size_t index) const
 print successor label More...
 
virtual OStreamprint_operands (OStream &OS) const
 print operands More...
 
virtual OStreamprint_result (OStream &OS) const
 print result More...
 
virtual void emit (CodeMemory *CM) const
 emit machine code More...
 
virtual void link (CodeFragment &CF) const
 link machine code More...
 
virtual ~MachineInstruction ()
 destructor More...
 

Private Attributes

OperandSize op_size
 

Additional Inherited Members

- Static Public Member Functions inherited from cacao::jit::compiler2::memory::ManagerMixin< MachineInstruction >
static voidoperator new (std::size_t size) throw (std::bad_alloc)
 normal new More...
 
static voidoperator new (std::size_t size, void *ptr) throw ()
 placement new More...
 
static voidoperator new (std::size_t size, const std::nothrow_t &nt) throw ()
 nothrow new More...
 
static void operator delete (void *pMemory) throw ()
 normal delete More...
 
static void operator delete (void *pMemory, void *ptr) throw ()
 placement delete More...
 
static void operator delete (void *pMemory, const std::nothrow_t &) throw ()
 nothrow delete More...
 
static voidoperator new[] (std::size_t size) throw (std::bad_alloc)
 normal new[] More...
 
static voidoperator new[] (std::size_t size, void *ptr) throw ()
 placement new[] More...
 
static voidoperator new[] (std::size_t size, const std::nothrow_t &nt) throw ()
 nothrow new[] More...
 
static void operator delete[] (void *pMemory) throw ()
 normal delete[] More...
 
static void operator delete[] (void *pMemory, void *ptr) throw ()
 placement delete[] More...
 
static void operator delete[] (void *pMemory, const std::nothrow_t &) throw ()
 nothrow delete[] More...
 
- Protected Attributes inherited from cacao::jit::compiler2::MachineInstruction
const std::size_t id
 
operand_list operands
 
dummy_operand_list dummy_operands
 dummy_operands is a list of operands embedded in the real operands of this instruction that need register allocation (for example indirect addressing on x86) More...
 
RefMapTy ref_map
 
successor_list successors
 
MachineOperandDesc result
 
const char * name
 
const char * comment
 
MachineBasicBlockblock
 

Detailed Description

Superclass for general purpose register instruction.

Definition at line 238 of file X86_64Instructions.hpp.

Member Enumeration Documentation

Enumerator
Reg8Imm8 
Reg16Imm16 
Reg32Imm32 
Reg64Imm64 
MemImm8 
MemImm16 
MemImm32 
MemImm64 
Reg16Imm8 
Reg32Imm8 
Reg64Imm8 
RegReg8 
RegReg16 
RegReg32 
RegReg64 
RegMem8 
RegMem16 
RegMem32 
RegMem64 
MemReg8 
MemReg16 
MemReg32 
MemReg64 
NO_ENCODING 

Definition at line 261 of file X86_64Instructions.hpp.

Enumerator
OS_8 
OS_16 
OS_32 
OS_64 
NO_SIZE 

Definition at line 240 of file X86_64Instructions.hpp.

Enumerator
Reg8 
Reg16 
Reg32 
Reg64 
Mem8 
Mem16 
Mem32 
Mem64 
NO_RESULT 

Definition at line 247 of file X86_64Instructions.hpp.

Constructor & Destructor Documentation

cacao::jit::compiler2::x86_64::GPInstruction::GPInstruction ( const char *  name,
MachineOperand result,
OperandSize  op_size,
std::size_t  num_operands 
)
inline

Definition at line 297 of file X86_64Instructions.hpp.

Member Function Documentation

OperandSize cacao::jit::compiler2::x86_64::GPInstruction::get_op_size ( ) const
inline

Definition at line 302 of file X86_64Instructions.hpp.

Field Documentation

OperandSize cacao::jit::compiler2::x86_64::GPInstruction::op_size
private

Definition at line 295 of file X86_64Instructions.hpp.


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