CACAO
|
Go to the source code of this file.
Macros | |
#define | MCODECHECK(icnt) |
#define | ALIGNCODENOP |
#define | PATCH_ALIGNMENT(addr, offset, size) ((((addr)+(offset)+(size)-1) & ~((size)-1)) - ((addr)+(offset))) |
#define | ICONST(r, c) |
#define | LCONST(r, c) |
#define | BRANCH_UNCONDITIONAL_SIZE 5 /* size in bytes of a branch */ |
#define | BRANCH_CONDITIONAL_SIZE 6 /* size in bytes of a branch */ |
#define | BRANCH_NOPS |
#define | PATCHER_CALL_SIZE 2 /* size in bytes of a patcher call */ |
#define | PATCHER_NOPS |
#define | M_BYTE1(a) |
#define | M_BYTE2(a, b) |
#define | M_MOV(a, b) emit_mov_reg_reg(cd, (a), (b)) |
#define | M_MOV_IMM(a, b) emit_mov_imm_reg(cd, (u8) (a), (b)) |
#define | M_IMOV(a, b) emit_movl_reg_reg(cd, (a), (b)) |
#define | M_IMOV_IMM(a, b) emit_movl_imm_reg(cd, (u4) (a), (b)) |
#define | M_FMOV(a, b) emit_movq_reg_reg(cd, (a), (b)) |
#define | M_DMOV(a, b) M_FMOV(a,b) |
#define | M_ILD(a, b, disp) emit_movl_membase_reg(cd, (b), (disp), (a)) |
#define | M_LLD(a, b, disp) emit_mov_membase_reg(cd, (b), (disp), (a)) |
#define | M_ILD32(a, b, disp) emit_movl_membase32_reg(cd, (b), (disp), (a)) |
#define | M_LLD32(a, b, disp) emit_mov_membase32_reg(cd, (b), (disp), (a)) |
#define | M_IST(a, b, disp) emit_movl_reg_membase(cd, (a), (b), (disp)) |
#define | M_LST(a, b, disp) emit_mov_reg_membase(cd, (a), (b), (disp)) |
#define | M_IST_IMM(a, b, disp) emit_movl_imm_membase(cd, (a), (b), (disp)) |
#define | M_LST_IMM32(a, b, disp) emit_mov_imm_membase(cd, (a), (b), (disp)) |
#define | M_IST32(a, b, disp) emit_movl_reg_membase32(cd, (a), (b), (disp)) |
#define | M_LST32(a, b, disp) emit_mov_reg_membase32(cd, (a), (b), (disp)) |
#define | M_IST32_IMM(a, b, disp) emit_movl_imm_membase32(cd, (a), (b), (disp)) |
#define | M_LST32_IMM32(a, b, disp) emit_mov_imm_membase32(cd, (a), (b), (disp)) |
#define | M_IADD(a, b) emit_alul_reg_reg(cd, ALU_ADD, (a), (b)) |
#define | M_ISUB(a, b) emit_alul_reg_reg(cd, ALU_SUB, (a), (b)) |
#define | M_IMUL(a, b) emit_imull_reg_reg(cd, (a), (b)) |
#define | M_IADD_IMM(a, b) emit_alul_imm_reg(cd, ALU_ADD, (a), (b)) |
#define | M_ISUB_IMM(a, b) emit_alul_imm_reg(cd, ALU_SUB, (a), (b)) |
#define | M_IMUL_IMM(a, b, c) emit_imull_imm_reg_reg(cd, (b), (a), (c)) |
#define | M_LADD(a, b) emit_alu_reg_reg(cd, ALU_ADD, (a), (b)) |
#define | M_LSUB(a, b) emit_alu_reg_reg(cd, ALU_SUB, (a), (b)) |
#define | M_LMUL(a, b) emit_imul_reg_reg(cd, (a), (b)) |
#define | M_LADD_IMM(a, b) emit_alu_imm_reg(cd, ALU_ADD, (a), (b)) |
#define | M_LSUB_IMM(a, b) emit_alu_imm_reg(cd, ALU_SUB, (a), (b)) |
#define | M_LMUL_IMM(a, b, c) emit_imul_imm_reg_reg(cd, (b), (a), (c)) |
#define | M_IINC(a) emit_incl_reg(cd, (a)) |
#define | M_LINC(a) emit_incq_reg(cd, (a)) |
#define | M_IDEC(a) emit_decl_reg(cd, (a)) |
#define | M_ALD(a, b, disp) |
#define | M_ALD32(a, b, disp) M_LLD32(a,b,disp) |
#define | M_ALD_DSEG(a, disp) M_ALD(a,RIP,disp) |
#define | M_ALD_MEM(a, disp) emit_mov_mem_reg(cd, (disp), (a)) |
#define | M_ALD_MEM_GET_OPC(p) ( *( (p) + 1)) |
#define | M_ALD_MEM_GET_MOD(p) (((*( (p) + 2)) >> 6) & 0x03) |
#define | M_ALD_MEM_GET_REG(p) ((((*( (p) + 2)) >> 3) & 0x07) + (((*(p) >> 2) & 0x01) << 3)) |
#define | M_ALD_MEM_GET_RM(p) (((*( (p) + 2)) ) & 0x07) |
#define | M_ALD_MEM_GET_DISP(p) ( *((u4 *) ((p) + 4))) |
#define | M_AST(a, b, c) M_LST(a,b,c) |
#define | M_AST_IMM32(a, b, c) M_LST_IMM32(a,b,c) |
#define | M_AADD(a, b) M_LADD(a,b) |
#define | M_AADD_IMM(a, b) M_LADD_IMM(a,b) |
#define | M_ASUB_IMM(a, b) M_LSUB_IMM(a,b) |
#define | M_ISUB_IMM32(a, b) emit_alul_imm32_reg(cd, ALU_SUB, (a), (b)) |
#define | M_LADD_IMM32(a, b) emit_alu_imm32_reg(cd, ALU_ADD, (a), (b)) |
#define | M_LSUB_IMM32(a, b) emit_alu_imm32_reg(cd, ALU_SUB, (a), (b)) |
#define | M_AADD_IMM32(a, b) M_LADD_IMM32(a,b) |
#define | M_ILEA(a, b, c) emit_leal_membase_reg(cd, (a), (b), (c)) |
#define | M_LLEA(a, b, c) emit_lea_membase_reg(cd, (a), (b), (c)) |
#define | M_ALEA(a, b, c) M_LLEA(a,b,c) |
#define | M_INEG(a) emit_negl_reg(cd, (a)) |
#define | M_LNEG(a) emit_neg_reg(cd, (a)) |
#define | M_IAND(a, b) emit_alul_reg_reg(cd, ALU_AND, (a), (b)) |
#define | M_IOR(a, b) emit_alul_reg_reg(cd, ALU_OR, (a), (b)) |
#define | M_IXOR(a, b) emit_alul_reg_reg(cd, ALU_XOR, (a), (b)) |
#define | M_IAND_IMM(a, b) emit_alul_imm_reg(cd, ALU_AND, (a), (b)) |
#define | M_IOR_IMM(a, b) emit_alul_imm_reg(cd, ALU_OR, (a), (b)) |
#define | M_IXOR_IMM(a, b) emit_alul_imm_reg(cd, ALU_XOR, (a), (b)) |
#define | M_LAND(a, b) emit_alu_reg_reg(cd, ALU_AND, (a), (b)) |
#define | M_LOR(a, b) emit_alu_reg_reg(cd, ALU_OR, (a), (b)) |
#define | M_LXOR(a, b) emit_alu_reg_reg(cd, ALU_XOR, (a), (b)) |
#define | M_LAND_IMM(a, b) emit_alu_imm_reg(cd, ALU_AND, (a), (b)) |
#define | M_LOR_IMM(a, b) emit_alu_imm_reg(cd, ALU_OR, (a), (b)) |
#define | M_LXOR_IMM(a, b) emit_alu_imm_reg(cd, ALU_XOR, (a), (b)) |
#define | M_BSEXT(a, b) emit_movsbq_reg_reg(cd, (a), (b)) |
#define | M_SSEXT(a, b) emit_movswq_reg_reg(cd, (a), (b)) |
#define | M_ISEXT(a, b) emit_movslq_reg_reg(cd, (a), (b)) |
#define | M_BZEXT(a, b) emit_movzbq_reg_reg(cd, (a), (b)) |
#define | M_CZEXT(a, b) emit_movzwq_reg_reg(cd, (a), (b)) |
#define | M_ISLL_IMM(a, b) emit_shiftl_imm_reg(cd, SHIFT_SHL, (a), (b)) |
#define | M_ISRA_IMM(a, b) emit_shiftl_imm_reg(cd, SHIFT_SAR, (a), (b)) |
#define | M_ISRL_IMM(a, b) emit_shiftl_imm_reg(cd, SHIFT_SHR, (a), (b)) |
#define | M_LSLL_IMM(a, b) emit_shift_imm_reg(cd, SHIFT_SHL, (a), (b)) |
#define | M_LSRA_IMM(a, b) emit_shift_imm_reg(cd, SHIFT_SAR, (a), (b)) |
#define | M_LSRL_IMM(a, b) emit_shift_imm_reg(cd, SHIFT_SHR, (a), (b)) |
#define | M_TEST(a) emit_test_reg_reg(cd, (a), (a)) |
#define | M_ITEST(a) emit_testl_reg_reg(cd, (a), (a)) |
#define | M_LCMP(a, b) emit_alu_reg_reg(cd, ALU_CMP, (a), (b)) |
#define | M_LCMP_IMM(a, b) emit_alu_imm_reg(cd, ALU_CMP, (a), (b)) |
#define | M_LCMP_IMM_MEMBASE(a, b, c) emit_alu_imm_membase(cd, ALU_CMP, (a), (b), (c)) |
#define | M_LCMP_MEMBASE(a, b, c) emit_alu_membase_reg(cd, ALU_CMP, (a), (b), (c)) |
#define | M_LCMP_MEMINDEX(a, b, c, d, e) emit_alul_memindex_reg(cd, ALU_CMP, (b), (a), (c), (d), (e)) |
#define | M_ICMP(a, b) emit_alul_reg_reg(cd, ALU_CMP, (a), (b)) |
#define | M_ICMP_IMM(a, b) emit_alul_imm_reg(cd, ALU_CMP, (a), (b)) |
#define | M_ICMP_IMM32(a, b) emit_alul_imm32_reg(cd, ALU_CMP, (a), (b)) |
#define | M_ICMP_IMM_MEMBASE(a, b, c) emit_alul_imm_membase(cd, ALU_CMP, (a), (b), (c)) |
#define | M_ICMP_MEMBASE(a, b, c) emit_alul_membase_reg(cd, ALU_CMP, (a), (b), (c)) |
#define | M_ICMP_MEMINDEX(a, b, c, d, e) emit_alu_memindex_reg(cd, ALU_CMP, (b), (a), (c), (d), (e)) |
#define | M_ACMP(a, b) M_LCMP(a,b) |
#define | M_BEQ(disp) emit_jcc(cd, CC_E, (disp)) |
#define | M_BNE(disp) emit_jcc(cd, CC_NE, (disp)) |
#define | M_BLT(disp) emit_jcc(cd, CC_L, (disp)) |
#define | M_BLE(disp) emit_jcc(cd, CC_LE, (disp)) |
#define | M_BGE(disp) emit_jcc(cd, CC_GE, (disp)) |
#define | M_BGT(disp) emit_jcc(cd, CC_G, (disp)) |
#define | M_BNS(a) emit_jcc(cd, CC_NS, (a)) |
#define | M_BULT(disp) emit_jcc(cd, CC_B, (disp)) |
#define | M_BULE(disp) emit_jcc(cd, CC_BE, (disp)) |
#define | M_BUGE(disp) emit_jcc(cd, CC_AE, (disp)) |
#define | M_BUGT(disp) emit_jcc(cd, CC_A, (disp)) |
#define | M_SETE(a) emit_setcc_reg(cd, CC_E, (a)) |
#define | M_SETNE(a) emit_setcc_reg(cd, CC_NE, (a)) |
#define | M_SETULE(a) emit_setcc_reg(cd, CC_BE, (a)) |
#define | M_CMOVEQ(a, b) emit_cmovcc_reg_reg(cd, CC_E, (a), (b)) |
#define | M_CMOVNE(a, b) emit_cmovcc_reg_reg(cd, CC_NE, (a), (b)) |
#define | M_CMOVLT(a, b) emit_cmovcc_reg_reg(cd, CC_L, (a), (b)) |
#define | M_CMOVLE(a, b) emit_cmovcc_reg_reg(cd, CC_LE, (a), (b)) |
#define | M_CMOVGE(a, b) emit_cmovcc_reg_reg(cd, CC_GE, (a), (b)) |
#define | M_CMOVGT(a, b) emit_cmovcc_reg_reg(cd, CC_G, (a), (b)) |
#define | M_CMOVULT(a, b) emit_cmovcc_reg_reg(cd, CC_B, (a), (b)) |
#define | M_CMOVUGT(a, b) emit_cmovcc_reg_reg(cd, CC_A, (a), (b)) |
#define | M_CMOVP(a, b) emit_cmovcc_reg_reg(cd, CC_P, (a), (b)) |
#define | M_PUSH(a) emit_push_reg(cd, (a)) |
#define | M_PUSH_IMM(a) emit_push_imm(cd, (a)) |
#define | M_POP(a) emit_pop_reg(cd, (a)) |
#define | M_JMP(a) emit_jmp_reg(cd, (a)) |
#define | M_JMP_IMM(a) emit_jmp_imm(cd, (a)) |
#define | M_JMP_IMM2(a) emit_jmp_imm2(cd, (a)) |
#define | M_CALL(a) emit_call_reg(cd, (a)) |
#define | M_CALL_IMM(a) emit_call_imm(cd, (a)) |
#define | M_RET M_BYTE1(0xc3) |
#define | M_NOP M_BYTE1(0x90) |
#define | M_UD2 M_BYTE2(0x0f, 0x0b) |
#define | M_CLR(a) M_LXOR(a,a) |
#define | M_FLD(a, b, disp) emit_movss_membase_reg(cd, (b), (disp), (a)) |
#define | M_DLD(a, b, disp) emit_movsd_membase_reg(cd, (b), (disp), (a)) |
#define | M_FLD32(a, b, disp) emit_movss_membase32_reg(cd, (b), (disp), (a)) |
#define | M_DLD32(a, b, disp) emit_movsd_membase32_reg(cd, (b), (disp), (a)) |
#define | M_FST(a, b, disp) emit_movss_reg_membase(cd, (a), (b), (disp)) |
#define | M_DST(a, b, disp) emit_movsd_reg_membase(cd, (a), (b), (disp)) |
#define | M_FST32(a, b, disp) emit_movss_reg_membase32(cd, (a), (b), (disp)) |
#define | M_DST32(a, b, disp) emit_movsd_reg_membase32(cd, (a), (b), (disp)) |
#define | M_FADD(a, b) emit_addss_reg_reg(cd, (a), (b)) |
#define | M_DADD(a, b) emit_addsd_reg_reg(cd, (a), (b)) |
#define | M_FSUB(a, b) emit_subss_reg_reg(cd, (a), (b)) |
#define | M_DSUB(a, b) emit_subsd_reg_reg(cd, (a), (b)) |
#define | M_FMUL(a, b) emit_mulss_reg_reg(cd, (a), (b)) |
#define | M_DMUL(a, b) emit_mulsd_reg_reg(cd, (a), (b)) |
#define | M_FDIV(a, b) emit_divss_reg_reg(cd, (a), (b)) |
#define | M_DDIV(a, b) emit_divsd_reg_reg(cd, (a), (b)) |
#define | M_CVTIF(a, b) emit_cvtsi2ss_reg_reg(cd, (a), (b)) |
#define | M_CVTID(a, b) emit_cvtsi2sd_reg_reg(cd, (a), (b)) |
#define | M_CVTLF(a, b) emit_cvtsi2ssq_reg_reg(cd, (a), (b)) |
#define | M_CVTLD(a, b) emit_cvtsi2sdq_reg_reg(cd, (a), (b)) |
#define | M_CVTFI(a, b) emit_cvttss2si_reg_reg(cd, (a), (b)) |
#define | M_CVTDI(a, b) emit_cvttsd2si_reg_reg(cd, (a), (b)) |
#define | M_CVTFL(a, b) emit_cvttss2siq_reg_reg(cd, (a), (b)) |
#define | M_CVTDL(a, b) emit_cvttsd2siq_reg_reg(cd, (a), (b)) |
#define | M_CVTFD(a, b) emit_cvtss2sd_reg_reg(cd, (a), (b)) |
#define | M_CVTDF(a, b) emit_cvtsd2ss_reg_reg(cd, (a), (b)) |
#define | M_MFENCE emit_mfence(cd) |
#define | M_RDTSC emit_rdtsc(cd) |
#define | M_IINC_MEMBASE(a, b) emit_incl_membase(cd, (a), (b)) |
#define | M_LINC_MEMBASE(a, b) emit_incq_membase(cd, (a), (b)) |
#define | M_IDEC_MEMBASE(a, b) emit_decl_membase(cd, (a), (b)) |
#define | M_IADD_MEMBASE(a, b, c) emit_alul_reg_membase(cd, ALU_ADD, (a), (b), (c)) |
#define | M_IADC_MEMBASE(a, b, c) emit_alul_reg_membase(cd, ALU_ADC, (a), (b), (c)) |
#define | M_ISUB_MEMBASE(a, b, c) emit_alul_reg_membase(cd, ALU_SUB, (a), (b), (c)) |
#define | M_ISBB_MEMBASE(a, b, c) emit_alul_reg_membase(cd, ALU_SBB, (a), (b), (c)) |
#define ALIGNCODENOP |
Definition at line 48 of file codegen.hpp.
#define BRANCH_CONDITIONAL_SIZE 6 /* size in bytes of a branch */ |
Definition at line 84 of file codegen.hpp.
#define BRANCH_NOPS |
#define BRANCH_UNCONDITIONAL_SIZE 5 /* size in bytes of a branch */ |
Definition at line 83 of file codegen.hpp.
#define ICONST | ( | r, | |
c | |||
) |
Definition at line 60 of file codegen.hpp.
#define LCONST | ( | r, | |
c | |||
) |
Definition at line 72 of file codegen.hpp.
#define M_AADD | ( | a, | |
b | |||
) | M_LADD(a,b) |
Definition at line 195 of file codegen.hpp.
#define M_AADD_IMM | ( | a, | |
b | |||
) | M_LADD_IMM(a,b) |
Definition at line 196 of file codegen.hpp.
#define M_AADD_IMM32 | ( | a, | |
b | |||
) | M_LADD_IMM32(a,b) |
Definition at line 204 of file codegen.hpp.
#define M_ACMP | ( | a, | |
b | |||
) | M_LCMP(a,b) |
Definition at line 260 of file codegen.hpp.
#define M_ALD | ( | a, | |
b, | |||
disp | |||
) |
Definition at line 173 of file codegen.hpp.
#define M_ALD32 | ( | a, | |
b, | |||
disp | |||
) | M_LLD32(a,b,disp) |
Definition at line 181 of file codegen.hpp.
Definition at line 182 of file codegen.hpp.
#define M_ALD_MEM | ( | a, | |
disp | |||
) | emit_mov_mem_reg(cd, (disp), (a)) |
Definition at line 184 of file codegen.hpp.
#define M_ALD_MEM_GET_DISP | ( | p | ) | ( *((u4 *) ((p) + 4))) |
Definition at line 190 of file codegen.hpp.
#define M_ALD_MEM_GET_MOD | ( | p | ) | (((*( (p) + 2)) >> 6) & 0x03) |
Definition at line 187 of file codegen.hpp.
#define M_ALD_MEM_GET_OPC | ( | p | ) | ( *( (p) + 1)) |
Definition at line 186 of file codegen.hpp.
#define M_ALD_MEM_GET_REG | ( | p | ) | ((((*( (p) + 2)) >> 3) & 0x07) + (((*(p) >> 2) & 0x01) << 3)) |
Definition at line 188 of file codegen.hpp.
#define M_ALD_MEM_GET_RM | ( | p | ) | (((*( (p) + 2)) ) & 0x07) |
Definition at line 189 of file codegen.hpp.
#define M_ALEA | ( | a, | |
b, | |||
c | |||
) | M_LLEA(a,b,c) |
Definition at line 208 of file codegen.hpp.
#define M_AST | ( | a, | |
b, | |||
c | |||
) | M_LST(a,b,c) |
Definition at line 192 of file codegen.hpp.
#define M_AST_IMM32 | ( | a, | |
b, | |||
c | |||
) | M_LST_IMM32(a,b,c) |
Definition at line 193 of file codegen.hpp.
#define M_ASUB_IMM | ( | a, | |
b | |||
) | M_LSUB_IMM(a,b) |
Definition at line 197 of file codegen.hpp.
Definition at line 262 of file codegen.hpp.
Definition at line 266 of file codegen.hpp.
Definition at line 267 of file codegen.hpp.
Definition at line 265 of file codegen.hpp.
Definition at line 264 of file codegen.hpp.
Definition at line 263 of file codegen.hpp.
Definition at line 269 of file codegen.hpp.
#define M_BSEXT | ( | a, | |
b | |||
) | emit_movsbq_reg_reg(cd, (a), (b)) |
Definition at line 229 of file codegen.hpp.
Definition at line 273 of file codegen.hpp.
Definition at line 274 of file codegen.hpp.
Definition at line 272 of file codegen.hpp.
Definition at line 271 of file codegen.hpp.
#define M_BYTE1 | ( | a | ) |
Definition at line 112 of file codegen.hpp.
#define M_BYTE2 | ( | a, | |
b | |||
) |
Definition at line 119 of file codegen.hpp.
#define M_BZEXT | ( | a, | |
b | |||
) | emit_movzbq_reg_reg(cd, (a), (b)) |
Definition at line 233 of file codegen.hpp.
#define M_CALL | ( | a | ) | emit_call_reg(cd, (a)) |
Definition at line 298 of file codegen.hpp.
#define M_CALL_IMM | ( | a | ) | emit_call_imm(cd, (a)) |
Definition at line 299 of file codegen.hpp.
#define M_CLR | ( | a | ) | M_LXOR(a,a) |
Definition at line 305 of file codegen.hpp.
#define M_CMOVEQ | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_E, (a), (b)) |
Definition at line 280 of file codegen.hpp.
#define M_CMOVGE | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_GE, (a), (b)) |
Definition at line 284 of file codegen.hpp.
#define M_CMOVGT | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_G, (a), (b)) |
Definition at line 285 of file codegen.hpp.
#define M_CMOVLE | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_LE, (a), (b)) |
Definition at line 283 of file codegen.hpp.
#define M_CMOVLT | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_L, (a), (b)) |
Definition at line 282 of file codegen.hpp.
#define M_CMOVNE | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_NE, (a), (b)) |
Definition at line 281 of file codegen.hpp.
#define M_CMOVP | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_P, (a), (b)) |
Definition at line 289 of file codegen.hpp.
#define M_CMOVUGT | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_A, (a), (b)) |
Definition at line 288 of file codegen.hpp.
#define M_CMOVULT | ( | a, | |
b | |||
) | emit_cmovcc_reg_reg(cd, CC_B, (a), (b)) |
Definition at line 287 of file codegen.hpp.
#define M_CVTDF | ( | a, | |
b | |||
) | emit_cvtsd2ss_reg_reg(cd, (a), (b)) |
Definition at line 339 of file codegen.hpp.
#define M_CVTDI | ( | a, | |
b | |||
) | emit_cvttsd2si_reg_reg(cd, (a), (b)) |
Definition at line 334 of file codegen.hpp.
#define M_CVTDL | ( | a, | |
b | |||
) | emit_cvttsd2siq_reg_reg(cd, (a), (b)) |
Definition at line 336 of file codegen.hpp.
#define M_CVTFD | ( | a, | |
b | |||
) | emit_cvtss2sd_reg_reg(cd, (a), (b)) |
Definition at line 338 of file codegen.hpp.
#define M_CVTFI | ( | a, | |
b | |||
) | emit_cvttss2si_reg_reg(cd, (a), (b)) |
Definition at line 333 of file codegen.hpp.
#define M_CVTFL | ( | a, | |
b | |||
) | emit_cvttss2siq_reg_reg(cd, (a), (b)) |
Definition at line 335 of file codegen.hpp.
#define M_CVTID | ( | a, | |
b | |||
) | emit_cvtsi2sd_reg_reg(cd, (a), (b)) |
Definition at line 330 of file codegen.hpp.
#define M_CVTIF | ( | a, | |
b | |||
) | emit_cvtsi2ss_reg_reg(cd, (a), (b)) |
Definition at line 329 of file codegen.hpp.
#define M_CVTLD | ( | a, | |
b | |||
) | emit_cvtsi2sdq_reg_reg(cd, (a), (b)) |
Definition at line 332 of file codegen.hpp.
#define M_CVTLF | ( | a, | |
b | |||
) | emit_cvtsi2ssq_reg_reg(cd, (a), (b)) |
Definition at line 331 of file codegen.hpp.
#define M_CZEXT | ( | a, | |
b | |||
) | emit_movzwq_reg_reg(cd, (a), (b)) |
Definition at line 234 of file codegen.hpp.
#define M_DADD | ( | a, | |
b | |||
) | emit_addsd_reg_reg(cd, (a), (b)) |
Definition at line 321 of file codegen.hpp.
#define M_DDIV | ( | a, | |
b | |||
) | emit_divsd_reg_reg(cd, (a), (b)) |
Definition at line 327 of file codegen.hpp.
#define M_DLD | ( | a, | |
b, | |||
disp | |||
) | emit_movsd_membase_reg(cd, (b), (disp), (a)) |
Definition at line 309 of file codegen.hpp.
#define M_DLD32 | ( | a, | |
b, | |||
disp | |||
) | emit_movsd_membase32_reg(cd, (b), (disp), (a)) |
Definition at line 312 of file codegen.hpp.
#define M_DMOV | ( | a, | |
b | |||
) | M_FMOV(a,b) |
Definition at line 133 of file codegen.hpp.
#define M_DMUL | ( | a, | |
b | |||
) | emit_mulsd_reg_reg(cd, (a), (b)) |
Definition at line 325 of file codegen.hpp.
#define M_DST | ( | a, | |
b, | |||
disp | |||
) | emit_movsd_reg_membase(cd, (a), (b), (disp)) |
Definition at line 315 of file codegen.hpp.
#define M_DST32 | ( | a, | |
b, | |||
disp | |||
) | emit_movsd_reg_membase32(cd, (a), (b), (disp)) |
Definition at line 318 of file codegen.hpp.
#define M_DSUB | ( | a, | |
b | |||
) | emit_subsd_reg_reg(cd, (a), (b)) |
Definition at line 323 of file codegen.hpp.
#define M_FADD | ( | a, | |
b | |||
) | emit_addss_reg_reg(cd, (a), (b)) |
Definition at line 320 of file codegen.hpp.
#define M_FDIV | ( | a, | |
b | |||
) | emit_divss_reg_reg(cd, (a), (b)) |
Definition at line 326 of file codegen.hpp.
#define M_FLD | ( | a, | |
b, | |||
disp | |||
) | emit_movss_membase_reg(cd, (b), (disp), (a)) |
Definition at line 308 of file codegen.hpp.
#define M_FLD32 | ( | a, | |
b, | |||
disp | |||
) | emit_movss_membase32_reg(cd, (b), (disp), (a)) |
Definition at line 311 of file codegen.hpp.
#define M_FMOV | ( | a, | |
b | |||
) | emit_movq_reg_reg(cd, (a), (b)) |
Definition at line 132 of file codegen.hpp.
#define M_FMUL | ( | a, | |
b | |||
) | emit_mulss_reg_reg(cd, (a), (b)) |
Definition at line 324 of file codegen.hpp.
#define M_FST | ( | a, | |
b, | |||
disp | |||
) | emit_movss_reg_membase(cd, (a), (b), (disp)) |
Definition at line 314 of file codegen.hpp.
#define M_FST32 | ( | a, | |
b, | |||
disp | |||
) | emit_movss_reg_membase32(cd, (a), (b), (disp)) |
Definition at line 317 of file codegen.hpp.
#define M_FSUB | ( | a, | |
b | |||
) | emit_subss_reg_reg(cd, (a), (b)) |
Definition at line 322 of file codegen.hpp.
#define M_IADC_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alul_reg_membase(cd, ALU_ADC, (a), (b), (c)) |
Definition at line 353 of file codegen.hpp.
#define M_IADD | ( | a, | |
b | |||
) | emit_alul_reg_reg(cd, ALU_ADD, (a), (b)) |
Definition at line 153 of file codegen.hpp.
#define M_IADD_IMM | ( | a, | |
b | |||
) | emit_alul_imm_reg(cd, ALU_ADD, (a), (b)) |
Definition at line 157 of file codegen.hpp.
#define M_IADD_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alul_reg_membase(cd, ALU_ADD, (a), (b), (c)) |
Definition at line 352 of file codegen.hpp.
#define M_IAND | ( | a, | |
b | |||
) | emit_alul_reg_reg(cd, ALU_AND, (a), (b)) |
Definition at line 213 of file codegen.hpp.
#define M_IAND_IMM | ( | a, | |
b | |||
) | emit_alul_imm_reg(cd, ALU_AND, (a), (b)) |
Definition at line 217 of file codegen.hpp.
#define M_ICMP | ( | a, | |
b | |||
) | emit_alul_reg_reg(cd, ALU_CMP, (a), (b)) |
Definition at line 253 of file codegen.hpp.
#define M_ICMP_IMM | ( | a, | |
b | |||
) | emit_alul_imm_reg(cd, ALU_CMP, (a), (b)) |
Definition at line 254 of file codegen.hpp.
#define M_ICMP_IMM32 | ( | a, | |
b | |||
) | emit_alul_imm32_reg(cd, ALU_CMP, (a), (b)) |
Definition at line 255 of file codegen.hpp.
#define M_ICMP_IMM_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alul_imm_membase(cd, ALU_CMP, (a), (b), (c)) |
Definition at line 256 of file codegen.hpp.
#define M_ICMP_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alul_membase_reg(cd, ALU_CMP, (a), (b), (c)) |
Definition at line 257 of file codegen.hpp.
#define M_ICMP_MEMINDEX | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) | emit_alu_memindex_reg(cd, ALU_CMP, (b), (a), (c), (d), (e)) |
Definition at line 258 of file codegen.hpp.
#define M_IDEC | ( | a | ) | emit_decl_reg(cd, (a)) |
Definition at line 171 of file codegen.hpp.
#define M_IDEC_MEMBASE | ( | a, | |
b | |||
) | emit_decl_membase(cd, (a), (b)) |
Definition at line 350 of file codegen.hpp.
#define M_IINC | ( | a | ) | emit_incl_reg(cd, (a)) |
Definition at line 169 of file codegen.hpp.
#define M_IINC_MEMBASE | ( | a, | |
b | |||
) | emit_incl_membase(cd, (a), (b)) |
Definition at line 347 of file codegen.hpp.
#define M_ILD | ( | a, | |
b, | |||
disp | |||
) | emit_movl_membase_reg(cd, (b), (disp), (a)) |
Definition at line 135 of file codegen.hpp.
#define M_ILD32 | ( | a, | |
b, | |||
disp | |||
) | emit_movl_membase32_reg(cd, (b), (disp), (a)) |
Definition at line 138 of file codegen.hpp.
#define M_ILEA | ( | a, | |
b, | |||
c | |||
) | emit_leal_membase_reg(cd, (a), (b), (c)) |
Definition at line 206 of file codegen.hpp.
#define M_IMOV | ( | a, | |
b | |||
) | emit_movl_reg_reg(cd, (a), (b)) |
Definition at line 129 of file codegen.hpp.
#define M_IMOV_IMM | ( | a, | |
b | |||
) | emit_movl_imm_reg(cd, (u4) (a), (b)) |
Definition at line 130 of file codegen.hpp.
#define M_IMUL | ( | a, | |
b | |||
) | emit_imull_reg_reg(cd, (a), (b)) |
Definition at line 155 of file codegen.hpp.
#define M_IMUL_IMM | ( | a, | |
b, | |||
c | |||
) | emit_imull_imm_reg_reg(cd, (b), (a), (c)) |
Definition at line 159 of file codegen.hpp.
#define M_INEG | ( | a | ) | emit_negl_reg(cd, (a)) |
Definition at line 210 of file codegen.hpp.
#define M_IOR | ( | a, | |
b | |||
) | emit_alul_reg_reg(cd, ALU_OR, (a), (b)) |
Definition at line 214 of file codegen.hpp.
#define M_IOR_IMM | ( | a, | |
b | |||
) | emit_alul_imm_reg(cd, ALU_OR, (a), (b)) |
Definition at line 218 of file codegen.hpp.
#define M_ISBB_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alul_reg_membase(cd, ALU_SBB, (a), (b), (c)) |
Definition at line 355 of file codegen.hpp.
#define M_ISEXT | ( | a, | |
b | |||
) | emit_movslq_reg_reg(cd, (a), (b)) |
Definition at line 231 of file codegen.hpp.
#define M_ISLL_IMM | ( | a, | |
b | |||
) | emit_shiftl_imm_reg(cd, SHIFT_SHL, (a), (b)) |
Definition at line 236 of file codegen.hpp.
#define M_ISRA_IMM | ( | a, | |
b | |||
) | emit_shiftl_imm_reg(cd, SHIFT_SAR, (a), (b)) |
Definition at line 237 of file codegen.hpp.
#define M_ISRL_IMM | ( | a, | |
b | |||
) | emit_shiftl_imm_reg(cd, SHIFT_SHR, (a), (b)) |
Definition at line 238 of file codegen.hpp.
#define M_IST | ( | a, | |
b, | |||
disp | |||
) | emit_movl_reg_membase(cd, (a), (b), (disp)) |
Definition at line 141 of file codegen.hpp.
#define M_IST32 | ( | a, | |
b, | |||
disp | |||
) | emit_movl_reg_membase32(cd, (a), (b), (disp)) |
Definition at line 147 of file codegen.hpp.
#define M_IST32_IMM | ( | a, | |
b, | |||
disp | |||
) | emit_movl_imm_membase32(cd, (a), (b), (disp)) |
Definition at line 150 of file codegen.hpp.
#define M_IST_IMM | ( | a, | |
b, | |||
disp | |||
) | emit_movl_imm_membase(cd, (a), (b), (disp)) |
Definition at line 144 of file codegen.hpp.
#define M_ISUB | ( | a, | |
b | |||
) | emit_alul_reg_reg(cd, ALU_SUB, (a), (b)) |
Definition at line 154 of file codegen.hpp.
#define M_ISUB_IMM | ( | a, | |
b | |||
) | emit_alul_imm_reg(cd, ALU_SUB, (a), (b)) |
Definition at line 158 of file codegen.hpp.
#define M_ISUB_IMM32 | ( | a, | |
b | |||
) | emit_alul_imm32_reg(cd, ALU_SUB, (a), (b)) |
Definition at line 199 of file codegen.hpp.
#define M_ISUB_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alul_reg_membase(cd, ALU_SUB, (a), (b), (c)) |
Definition at line 354 of file codegen.hpp.
#define M_ITEST | ( | a | ) | emit_testl_reg_reg(cd, (a), (a)) |
Definition at line 245 of file codegen.hpp.
#define M_IXOR | ( | a, | |
b | |||
) | emit_alul_reg_reg(cd, ALU_XOR, (a), (b)) |
Definition at line 215 of file codegen.hpp.
#define M_IXOR_IMM | ( | a, | |
b | |||
) | emit_alul_imm_reg(cd, ALU_XOR, (a), (b)) |
Definition at line 219 of file codegen.hpp.
#define M_JMP | ( | a | ) | emit_jmp_reg(cd, (a)) |
Definition at line 295 of file codegen.hpp.
#define M_JMP_IMM | ( | a | ) | emit_jmp_imm(cd, (a)) |
Definition at line 296 of file codegen.hpp.
#define M_JMP_IMM2 | ( | a | ) | emit_jmp_imm2(cd, (a)) |
Definition at line 297 of file codegen.hpp.
#define M_LADD | ( | a, | |
b | |||
) | emit_alu_reg_reg(cd, ALU_ADD, (a), (b)) |
Definition at line 161 of file codegen.hpp.
#define M_LADD_IMM | ( | a, | |
b | |||
) | emit_alu_imm_reg(cd, ALU_ADD, (a), (b)) |
Definition at line 165 of file codegen.hpp.
#define M_LADD_IMM32 | ( | a, | |
b | |||
) | emit_alu_imm32_reg(cd, ALU_ADD, (a), (b)) |
Definition at line 201 of file codegen.hpp.
#define M_LAND | ( | a, | |
b | |||
) | emit_alu_reg_reg(cd, ALU_AND, (a), (b)) |
Definition at line 221 of file codegen.hpp.
#define M_LAND_IMM | ( | a, | |
b | |||
) | emit_alu_imm_reg(cd, ALU_AND, (a), (b)) |
Definition at line 225 of file codegen.hpp.
#define M_LCMP | ( | a, | |
b | |||
) | emit_alu_reg_reg(cd, ALU_CMP, (a), (b)) |
Definition at line 247 of file codegen.hpp.
#define M_LCMP_IMM | ( | a, | |
b | |||
) | emit_alu_imm_reg(cd, ALU_CMP, (a), (b)) |
Definition at line 248 of file codegen.hpp.
#define M_LCMP_IMM_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alu_imm_membase(cd, ALU_CMP, (a), (b), (c)) |
Definition at line 249 of file codegen.hpp.
#define M_LCMP_MEMBASE | ( | a, | |
b, | |||
c | |||
) | emit_alu_membase_reg(cd, ALU_CMP, (a), (b), (c)) |
Definition at line 250 of file codegen.hpp.
#define M_LCMP_MEMINDEX | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) | emit_alul_memindex_reg(cd, ALU_CMP, (b), (a), (c), (d), (e)) |
Definition at line 251 of file codegen.hpp.
#define M_LINC | ( | a | ) | emit_incq_reg(cd, (a)) |
Definition at line 170 of file codegen.hpp.
#define M_LINC_MEMBASE | ( | a, | |
b | |||
) | emit_incq_membase(cd, (a), (b)) |
Definition at line 348 of file codegen.hpp.
#define M_LLD | ( | a, | |
b, | |||
disp | |||
) | emit_mov_membase_reg(cd, (b), (disp), (a)) |
Definition at line 136 of file codegen.hpp.
#define M_LLD32 | ( | a, | |
b, | |||
disp | |||
) | emit_mov_membase32_reg(cd, (b), (disp), (a)) |
Definition at line 139 of file codegen.hpp.
#define M_LLEA | ( | a, | |
b, | |||
c | |||
) | emit_lea_membase_reg(cd, (a), (b), (c)) |
Definition at line 207 of file codegen.hpp.
#define M_LMUL | ( | a, | |
b | |||
) | emit_imul_reg_reg(cd, (a), (b)) |
Definition at line 163 of file codegen.hpp.
#define M_LMUL_IMM | ( | a, | |
b, | |||
c | |||
) | emit_imul_imm_reg_reg(cd, (b), (a), (c)) |
Definition at line 167 of file codegen.hpp.
#define M_LNEG | ( | a | ) | emit_neg_reg(cd, (a)) |
Definition at line 211 of file codegen.hpp.
#define M_LOR | ( | a, | |
b | |||
) | emit_alu_reg_reg(cd, ALU_OR, (a), (b)) |
Definition at line 222 of file codegen.hpp.
#define M_LOR_IMM | ( | a, | |
b | |||
) | emit_alu_imm_reg(cd, ALU_OR, (a), (b)) |
Definition at line 226 of file codegen.hpp.
#define M_LSLL_IMM | ( | a, | |
b | |||
) | emit_shift_imm_reg(cd, SHIFT_SHL, (a), (b)) |
Definition at line 240 of file codegen.hpp.
#define M_LSRA_IMM | ( | a, | |
b | |||
) | emit_shift_imm_reg(cd, SHIFT_SAR, (a), (b)) |
Definition at line 241 of file codegen.hpp.
#define M_LSRL_IMM | ( | a, | |
b | |||
) | emit_shift_imm_reg(cd, SHIFT_SHR, (a), (b)) |
Definition at line 242 of file codegen.hpp.
#define M_LST | ( | a, | |
b, | |||
disp | |||
) | emit_mov_reg_membase(cd, (a), (b), (disp)) |
Definition at line 142 of file codegen.hpp.
#define M_LST32 | ( | a, | |
b, | |||
disp | |||
) | emit_mov_reg_membase32(cd, (a), (b), (disp)) |
Definition at line 148 of file codegen.hpp.
#define M_LST32_IMM32 | ( | a, | |
b, | |||
disp | |||
) | emit_mov_imm_membase32(cd, (a), (b), (disp)) |
Definition at line 151 of file codegen.hpp.
#define M_LST_IMM32 | ( | a, | |
b, | |||
disp | |||
) | emit_mov_imm_membase(cd, (a), (b), (disp)) |
Definition at line 145 of file codegen.hpp.
#define M_LSUB | ( | a, | |
b | |||
) | emit_alu_reg_reg(cd, ALU_SUB, (a), (b)) |
Definition at line 162 of file codegen.hpp.
#define M_LSUB_IMM | ( | a, | |
b | |||
) | emit_alu_imm_reg(cd, ALU_SUB, (a), (b)) |
Definition at line 166 of file codegen.hpp.
#define M_LSUB_IMM32 | ( | a, | |
b | |||
) | emit_alu_imm32_reg(cd, ALU_SUB, (a), (b)) |
Definition at line 202 of file codegen.hpp.
#define M_LXOR | ( | a, | |
b | |||
) | emit_alu_reg_reg(cd, ALU_XOR, (a), (b)) |
Definition at line 223 of file codegen.hpp.
#define M_LXOR_IMM | ( | a, | |
b | |||
) | emit_alu_imm_reg(cd, ALU_XOR, (a), (b)) |
Definition at line 227 of file codegen.hpp.
#define M_MFENCE emit_mfence(cd) |
Definition at line 344 of file codegen.hpp.
#define M_MOV | ( | a, | |
b | |||
) | emit_mov_reg_reg(cd, (a), (b)) |
Definition at line 126 of file codegen.hpp.
#define M_MOV_IMM | ( | a, | |
b | |||
) | emit_mov_imm_reg(cd, (u8) (a), (b)) |
Definition at line 127 of file codegen.hpp.
#define M_NOP M_BYTE1(0x90) |
Definition at line 302 of file codegen.hpp.
#define M_POP | ( | a | ) | emit_pop_reg(cd, (a)) |
Definition at line 293 of file codegen.hpp.
#define M_PUSH | ( | a | ) | emit_push_reg(cd, (a)) |
Definition at line 291 of file codegen.hpp.
#define M_PUSH_IMM | ( | a | ) | emit_push_imm(cd, (a)) |
Definition at line 292 of file codegen.hpp.
#define M_RDTSC emit_rdtsc(cd) |
Definition at line 345 of file codegen.hpp.
#define M_RET M_BYTE1(0xc3) |
Definition at line 300 of file codegen.hpp.
#define M_SETE | ( | a | ) | emit_setcc_reg(cd, CC_E, (a)) |
Definition at line 276 of file codegen.hpp.
#define M_SETNE | ( | a | ) | emit_setcc_reg(cd, CC_NE, (a)) |
Definition at line 277 of file codegen.hpp.
#define M_SETULE | ( | a | ) | emit_setcc_reg(cd, CC_BE, (a)) |
Definition at line 278 of file codegen.hpp.
#define M_SSEXT | ( | a, | |
b | |||
) | emit_movswq_reg_reg(cd, (a), (b)) |
Definition at line 230 of file codegen.hpp.
#define M_TEST | ( | a | ) | emit_test_reg_reg(cd, (a), (a)) |
Definition at line 244 of file codegen.hpp.
#define M_UD2 M_BYTE2(0x0f, 0x0b) |
Definition at line 303 of file codegen.hpp.
#define MCODECHECK | ( | icnt | ) |
Definition at line 41 of file codegen.hpp.
#define PATCH_ALIGNMENT | ( | addr, | |
offset, | |||
size | |||
) | ((((addr)+(offset)+(size)-1) & ~((size)-1)) - ((addr)+(offset))) |
Definition at line 56 of file codegen.hpp.
#define PATCHER_CALL_SIZE 2 /* size in bytes of a patcher call */ |
Definition at line 102 of file codegen.hpp.
#define PATCHER_NOPS |
Definition at line 104 of file codegen.hpp.