CACAO
Data Structures | Functions | Variables
cacao::jit::compiler2::x86_64 Namespace Reference

Data Structures

class  X86_64
 X86_64. More...
 
class  X86_64LoweringVisitor
 
class  Cond
 x86_64 registers flags More...
 
struct  OpReg
 Opcode ref field. More...
 
struct  REX
 REX Prefix Builder. More...
 
class  CodeSegmentBuilder
 
struct  InstructionEncoding
 
struct  SrcOp
 Simple wrapper for the operand of an single operand x86_64 instruction. More...
 
struct  SrcMemOp
 
struct  DstMemOp
 
struct  Src1Op
 Simple wrapper for first operand of an x86_64 instruction. More...
 
struct  Src2Op
 Simple wrapper for second operand of an x86_64 instruction. More...
 
struct  DstSrc1Op
 Simple wrapper for first operand of an x86_64 instruction which is also used for the result. More...
 
struct  DstSrc2Op
 
struct  DstSrcOp
 Simple wrapper for first operand of an x86_64 instruction which is also used for the result. More...
 
struct  DstOp
 Simple wrapper for destination of an x86_64 instruction. More...
 
class  ModRMOperand
 
class  ModRMOperandDesc
 
struct  DstModRM
 Simple wrapper for a ModRM destination operand. More...
 
struct  SrcModRM
 Simple wrapper for a ModRM source operand. More...
 
class  X86_64Instruction
 Superclass for general purpose register instruction. More...
 
class  GPInstruction
 Superclass for general purpose register instruction. More...
 
class  MoveInst
 Move super instruction. More...
 
class  ALUInstruction
 This abstract class represents a x86_64 ALU instruction. More...
 
class  AddInst
 
class  OrInst
 
class  AdcInst
 
class  SbbInst
 
class  AndInst
 
class  SubInst
 
class  XorInst
 
class  CmpInst
 
class  PatchInst
 
class  EnterInst
 
class  LeaveInst
 
class  BreakInst
 
class  IMulInst
 
class  IMulImmInst
 
class  IDivInst
 
class  CDQInst
 
class  RetInst
 
class  NegInst
 
class  CallInst
 
class  MovInst
 
class  MovModRMInst
 Load from pointer. More...
 
class  LEAInst
 
class  MovSXInst
 Move with Sign-Extension. More...
 
class  MovDSEGInst
 Move data seg to register. More...
 
class  JumpInst
 
class  CondJumpInst
 
class  CondTrapInst
 
class  CMovInst
 
class  IndirectJumpInst
 
class  CVTSI2SDInst
 Convert Dword Integer to Scalar Double-Precision FP Value. More...
 
class  CVTSI2SSInst
 Convert Dword Integer to Scalar Single-Precision FP Value. More...
 
class  CVTTSS2SIInst
 Convert with truncation Scalar Single-FP Value to DW Integer. More...
 
class  CVTTSD2SIInst
 
class  CVTSS2SDInst
 
class  CVTSD2SSInst
 
class  FLDInst
 
class  FSTPInst
 
class  FFREEInst
 
class  FINCSTPInst
 
class  UCOMISInst
 
class  UCOMISSInst
 
class  UCOMISDInst
 
class  XORPInst
 
class  XORPSInst
 
class  XORPDInst
 
class  SSEAluInst
 SSE Alu Instruction. More...
 
class  SSEAluSDInst
 SSE Alu Instruction (Double-Precision) More...
 
class  SSEAluSSInst
 SSE Alu Instruction (Single-Precision) More...
 
class  AddSDInst
 Add Scalar Double-Precision Floating-Point Values. More...
 
class  MulSDInst
 Multiply Scalar Double-Precision Floating-Point Values. More...
 
class  SubSDInst
 Subtract Scalar Double-Precision Floating-Point Values. More...
 
class  DivSDInst
 Divide Scalar Double-Precision Floating-Point Values. More...
 
class  FPRemInst
 
class  AddSSInst
 Add Scalar Single-Precision Floating-Point Values. More...
 
class  MulSSInst
 Multiply Scalar Single-Precision Floating-Point Values. More...
 
class  SubSSInst
 Subtract Scalar Single-Precision Floating-Point Values. More...
 
class  DivSSInst
 Divide Scalar Single-Precision Floating-Point Values. More...
 
class  MovSDInst
 
class  MovImmSInst
 
class  MovImmSDInst
 
class  MovImmSSInst
 
class  MovSSInst
 
class  MachineMethodDescriptor
 MachineMethodDescriptor. More...
 
struct  IndexOp
 
struct  BaseOp
 
class  NativeAddress
 
class  X86_64ModRMOperand
 
class  X86_64Register
 x86_64 Register More...
 
class  FPUStackRegister
 
class  NativeRegister
 This represents a machine register usage. More...
 
class  GPRegister
 
class  SSERegister
 

Functions

template<class A , class B >
A * cast_to (B *)
 
u1 get_rex (X86_64Register *reg, X86_64Register *rm=NULL, bool opsiz64=true)
 
u1 get_rex (const X86_64Register *reg1, X86_64Register *reg2=NULL, GPInstruction::OperandSize op_size=GPInstruction::OS_32, X86_64Register *reg3=NULL)
 
bool use_sib (X86_64Register *base, X86_64Register *index)
 
u1 get_modrm (u1 reg, u1 base, s4 disp, bool use_sib=false)
 
u1 get_modrm (X86_64Register *reg, X86_64Register *base, s4 disp, bool use_sib=false)
 
u1 get_sib (X86_64Register *base, X86_64Register *index=NULL, u1 scale=1)
 
u1 get_modrm_u1 (u1 mod, u1 reg, u1 rm)
 
u1 get_modrm (u1 mod, X86_64Register *reg, X86_64Register *rm)
 
u1 get_modrm_reg2reg (X86_64Register *reg, X86_64Register *rm)
 
u1 get_modrm_1reg (u1 reg, X86_64Register *rm)
 
void add_CodeSegmentBuilder (CodeMemory *CM, const CodeSegmentBuilder &CSB)
 
template<>
StackSlotcast_to< StackSlot > (MachineOperand *op)
 
template<>
Immediatecast_to< Immediate > (MachineOperand *op)
 
template<class A , A >
A * cast_to (A *a)
 
GPInstruction::OperandSize get_OperandSize_from_Type (const Type::TypeID type)
 
GPInstruction::OpEncoding get_OpEncoding (MachineOperand *src1, MachineOperand *src2, GPInstruction::OperandSize op_size)
 
GPInstruction::OperandSize get_operand_size_from_Type (Type::TypeID type)
 
void emit_nop (CodeFragment code, int length)
 
u1 get_rex (X86_64Register *reg, const ModRMOperandDesc &modrm, bool opsize64)
 
OStreamoperator<< (OStream &OS, const ModRMOperandDesc &modrm)
 
OStreamoperator<< (OStream &OS, const MachineMethodDescriptor &MMD)
 
OStreamoperator<< (OStream &OS, const MachineMethodDescriptor *MMD)
 
template<>
X86_64ModRMOperandcast_to< X86_64ModRMOperand > (MachineOperand *op)
 
OStreamoperator<< (OStream &OS, const X86_64Register &reg)
 
template<>
Registercast_to< Register > (MachineOperand *op)
 
template<>
X86_64Registercast_to< X86_64Register > (Register *reg)
 
template<>
X86_64Registercast_to< X86_64Register > (MachineOperand *op)
 
template<>
X86_64Registercast_to< X86_64Register > (X86_64Register *reg)
 

Variables

FPUStackRegister ST0 (0)
 
FPUStackRegister ST1 (1)
 
FPUStackRegister ST2 (2)
 
FPUStackRegister ST3 (3)
 
FPUStackRegister ST4 (4)
 
FPUStackRegister ST5 (5)
 
FPUStackRegister ST6 (6)
 
FPUStackRegister ST7 (7)
 
GPRegister RAX ("RAX", 0x0, false, 0x0 *8, 8)
 
GPRegister RCX ("RCX", 0x1, false, 0x1 *8, 8)
 
GPRegister RDX ("RDX", 0x2, false, 0x2 *8, 8)
 
GPRegister RBX ("RBX", 0x3, false, 0x3 *8, 8)
 
GPRegister RSP ("RSP", 0x4, false, 0x4 *8, 8)
 
GPRegister RBP ("RBP", 0x5, false, 0x5 *8, 8)
 
GPRegister RSI ("RSI", 0x6, false, 0x6 *8, 8)
 
GPRegister RDI ("RDI", 0x7, false, 0x7 *8, 8)
 
GPRegister R8 ("R8", 0x0, true, 0x8 *8, 8)
 
GPRegister R9 ("R9", 0x1, true, 0x9 *8, 8)
 
GPRegister R10 ("R10", 0x2, true, 0xa *8, 8)
 
GPRegister R11 ("R11", 0x3, true, 0xb *8, 8)
 
GPRegister R12 ("R12", 0x4, true, 0xc *8, 8)
 
GPRegister R13 ("R13", 0x5, true, 0xd *8, 8)
 
GPRegister R14 ("R14", 0x6, true, 0xe *8, 8)
 
GPRegister R15 ("R15", 0x7, true, 0xf *8, 8)
 
GPRegisterIntegerArgumentRegisters []
 
GPRegisterIntegerCallerSavedRegisters []
 
std::size_t IntegerCallerSavedRegistersSize = 9
 
SSERegister XMM0 ("XMM0", 0x0, false, 0x0 *16, 16)
 
SSERegister XMM1 ("XMM1", 0x1, false, 0x1 *16, 16)
 
SSERegister XMM2 ("XMM2", 0x2, false, 0x2 *16, 16)
 
SSERegister XMM3 ("XMM3", 0x3, false, 0x3 *16, 16)
 
SSERegister XMM4 ("XMM4", 0x4, false, 0x4 *16, 16)
 
SSERegister XMM5 ("XMM5", 0x5, false, 0x5 *16, 16)
 
SSERegister XMM6 ("XMM6", 0x6, false, 0x6 *16, 16)
 
SSERegister XMM7 ("XMM7", 0x7, false, 0x7 *16, 16)
 
SSERegister XMM8 ("XMM8", 0x0, true, 0x8 *16, 16)
 
SSERegister XMM9 ("XMM9", 0x1, true, 0x9 *16, 16)
 
SSERegister XMM10 ("XMM10", 0x2, true, 0xa *16, 16)
 
SSERegister XMM11 ("XMM11", 0x3, true, 0xb *16, 16)
 
SSERegister XMM12 ("XMM12", 0x4, true, 0xc *16, 16)
 
SSERegister XMM13 ("XMM13", 0x5, true, 0xd *16, 16)
 
SSERegister XMM14 ("XMM14", 0x6, true, 0xe *16, 16)
 
SSERegister XMM15 ("XMM15", 0x7, true, 0xf *16, 16)
 
SSERegisterFloatArgumentRegisters []
 
const unsigned IntegerArgumentRegisterSize = 6
 
const unsigned FloatArgumentRegisterSize = 8
 

Function Documentation

void cacao::jit::compiler2::x86_64::add_CodeSegmentBuilder ( CodeMemory *  CM,
const CodeSegmentBuilder &  CSB 
)

Definition at line 266 of file X86_64EmitHelper.hpp.

template<class A , class B >
A* cacao::jit::compiler2::x86_64::cast_to ( B *  )
inline
template<class A , A >
A* cacao::jit::compiler2::x86_64::cast_to ( A *  a)
inline

Definition at line 44 of file X86_64Instructions.cpp.

template<>
Immediate* cacao::jit::compiler2::x86_64::cast_to< Immediate > ( MachineOperand *  op)
inline

Definition at line 297 of file X86_64EmitHelper.hpp.

template<>
Register* cacao::jit::compiler2::x86_64::cast_to< Register > ( MachineOperand *  op)
inline

Definition at line 122 of file X86_64Register.hpp.

template<>
StackSlot* cacao::jit::compiler2::x86_64::cast_to< StackSlot > ( MachineOperand *  op)
inline

Definition at line 274 of file X86_64EmitHelper.hpp.

template<>
X86_64ModRMOperand* cacao::jit::compiler2::x86_64::cast_to< X86_64ModRMOperand > ( MachineOperand *  op)
inline

Definition at line 184 of file X86_64ModRMOperand.hpp.

template<>
X86_64Register* cacao::jit::compiler2::x86_64::cast_to< X86_64Register > ( Register *  reg)
inline

Definition at line 129 of file X86_64Register.hpp.

template<>
X86_64Register* cacao::jit::compiler2::x86_64::cast_to< X86_64Register > ( MachineOperand *  op)
inline

Definition at line 140 of file X86_64Register.hpp.

template<>
X86_64Register* cacao::jit::compiler2::x86_64::cast_to< X86_64Register > ( X86_64Register *  reg)
inline

Definition at line 153 of file X86_64Register.hpp.

void cacao::jit::compiler2::x86_64::emit_nop ( CodeFragment  code,
int  length 
)

Definition at line 255 of file X86_64Instructions.cpp.

u1 cacao::jit::compiler2::x86_64::get_modrm ( u1  reg,
u1  base,
s4  disp,
bool  use_sib = false 
)
inline

Definition at line 149 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_modrm ( X86_64Register *  reg,
X86_64Register *  base,
s4  disp,
bool  use_sib = false 
)
inline

Definition at line 187 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_modrm ( u1  mod,
X86_64Register *  reg,
X86_64Register *  rm 
)
inline

Definition at line 223 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_modrm_1reg ( u1  reg,
X86_64Register *  rm 
)
inline

Definition at line 229 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_modrm_reg2reg ( X86_64Register *  reg,
X86_64Register *  rm 
)
inline

Definition at line 226 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_modrm_u1 ( u1  mod,
u1  reg,
u1  rm 
)
inline

Definition at line 212 of file X86_64EmitHelper.hpp.

GPInstruction::OpEncoding cacao::jit::compiler2::x86_64::get_OpEncoding ( MachineOperand *  src1,
MachineOperand *  src2,
GPInstruction::OperandSize  op_size 
)

Definition at line 67 of file X86_64Instructions.cpp.

GPInstruction::OperandSize cacao::jit::compiler2::x86_64::get_operand_size_from_Type ( Type::TypeID  type)

Definition at line 161 of file X86_64Instructions.cpp.

GPInstruction::OperandSize cacao::jit::compiler2::x86_64::get_OperandSize_from_Type ( const Type::TypeID  type)

Definition at line 49 of file X86_64Instructions.cpp.

u1 cacao::jit::compiler2::x86_64::get_rex ( X86_64Register *  reg,
X86_64Register *  rm = NULL,
bool  opsiz64 = true 
)
inline

Definition at line 95 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_rex ( const X86_64Register *  reg1,
X86_64Register *  reg2 = NULL,
GPInstruction::OperandSize  op_size = GPInstruction::OS_32,
X86_64Register *  reg3 = NULL 
)
inline

Definition at line 118 of file X86_64EmitHelper.hpp.

u1 cacao::jit::compiler2::x86_64::get_rex ( X86_64Register *  reg,
const ModRMOperandDesc &  modrm,
bool  opsize64 
)
inline

Definition at line 447 of file X86_64Instructions.cpp.

u1 cacao::jit::compiler2::x86_64::get_sib ( X86_64Register *  base,
X86_64Register *  index = NULL,
u1  scale = 1 
)
inline

Definition at line 191 of file X86_64EmitHelper.hpp.

OStream & cacao::jit::compiler2::x86_64::operator<< ( OStream &  OS,
const MachineMethodDescriptor &  MMD 
)

Definition at line 32 of file X86_64MachineMethodDescriptor.cpp.

OStream& cacao::jit::compiler2::x86_64::operator<< ( OStream &  OS,
const MachineMethodDescriptor *  MMD 
)
inline

Definition at line 90 of file X86_64MachineMethodDescriptor.hpp.

OStream& cacao::jit::compiler2::x86_64::operator<< ( OStream &  OS,
const X86_64Register &  reg 
)
inline

Definition at line 95 of file X86_64Register.hpp.

bool cacao::jit::compiler2::x86_64::use_sib ( X86_64Register *  base,
X86_64Register *  index 
)
inline

Definition at line 145 of file X86_64EmitHelper.hpp.

Variable Documentation

SSERegister * cacao::jit::compiler2::x86_64::FloatArgumentRegisters
Initial value:
= {
&XMM0, &XMM1, &XMM2, &XMM3, &XMM4, &XMM5, &XMM6, &XMM7
}
#define XMM0
Definition: md-abi.hpp:50
#define XMM7
Definition: md-abi.hpp:57
#define XMM4
Definition: md-abi.hpp:54
#define XMM3
Definition: md-abi.hpp:53
#define XMM6
Definition: md-abi.hpp:56
#define XMM5
Definition: md-abi.hpp:55
#define XMM2
Definition: md-abi.hpp:52
#define XMM1
Definition: md-abi.hpp:51

Definition at line 90 of file X86_64Register.cpp.

const unsigned cacao::jit::compiler2::x86_64::FloatArgumentRegisterSize = 8

Definition at line 206 of file X86_64Register.hpp.

GPRegister * cacao::jit::compiler2::x86_64::IntegerArgumentRegisters
Initial value:
= {
&RDI, &RSI, &RDX, &RCX, &R8, &R9
}
#define RSI
Definition: md-abi.hpp:38
#define RDX
Definition: md-abi.hpp:34
#define RDI
Definition: md-abi.hpp:39
#define R8
Definition: md-abi.hpp:39
#define RCX
Definition: md-abi.hpp:33
#define R9
Definition: md-abi.hpp:40

Definition at line 66 of file X86_64Register.cpp.

const unsigned cacao::jit::compiler2::x86_64::IntegerArgumentRegisterSize = 6

Definition at line 175 of file X86_64Register.hpp.

GPRegister* cacao::jit::compiler2::x86_64::IntegerCallerSavedRegisters[]
Initial value:
= {
&RAX,&R11,&R10,&R9,&R8,&RCX,&RDX,&RSI,&RDI}
#define RAX
Definition: md-abi.hpp:32
#define RSI
Definition: md-abi.hpp:38
#define RDX
Definition: md-abi.hpp:34
#define RDI
Definition: md-abi.hpp:39
#define R10
Definition: md-abi.hpp:41
#define R11
Definition: md-abi.hpp:42
#define R8
Definition: md-abi.hpp:39
#define RCX
Definition: md-abi.hpp:33
#define R9
Definition: md-abi.hpp:40

Definition at line 69 of file X86_64Register.cpp.

std::size_t cacao::jit::compiler2::x86_64::IntegerCallerSavedRegistersSize = 9

Definition at line 71 of file X86_64Register.cpp.

GPRegister cacao::jit::compiler2::x86_64::R10

Definition at line 168 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R11

Definition at line 169 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R12

Definition at line 170 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R13

Definition at line 171 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R14

Definition at line 172 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R15

Definition at line 173 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R8

Definition at line 166 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::R9

Definition at line 167 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RAX

Definition at line 158 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RBP

Definition at line 163 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RBX

Definition at line 161 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RCX

Definition at line 159 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RDI

Definition at line 165 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RDX

Definition at line 160 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RSI

Definition at line 164 of file X86_64Register.hpp.

GPRegister cacao::jit::compiler2::x86_64::RSP

Definition at line 162 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST0

Definition at line 196 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST1

Definition at line 197 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST2

Definition at line 198 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST3

Definition at line 199 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST4

Definition at line 200 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST5

Definition at line 201 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST6

Definition at line 202 of file X86_64Register.hpp.

FPUStackRegister cacao::jit::compiler2::x86_64::ST7

Definition at line 203 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM0

Definition at line 178 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM1

Definition at line 179 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM10

Definition at line 188 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM11

Definition at line 189 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM12

Definition at line 190 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM13

Definition at line 191 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM14

Definition at line 192 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM15

Definition at line 193 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM2

Definition at line 180 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM3

Definition at line 181 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM4

Definition at line 182 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM5

Definition at line 183 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM6

Definition at line 184 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM7

Definition at line 185 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM8

Definition at line 186 of file X86_64Register.hpp.

SSERegister cacao::jit::compiler2::x86_64::XMM9

Definition at line 187 of file X86_64Register.hpp.