CACAO
Data Structures | Macros
codegen.hpp File Reference

Go to the source code of this file.

Data Structures

class  AsmEmitter
 

Macros

#define MCODECHECK(icnt)
 
#define ALIGNCODENOP
 
#define ICONST(d, c)   emit_iconst(cd, (d), (c))
 
#define LCONST(d, c)   emit_lconst(cd, (d), (c))
 
#define SHIFT(x, s)   ((x) << s)
 
#define BRANCH_NOPS
 
#define PATCHER_CALL_SIZE   1 * 4 /* an instruction is 4-bytes long */
 
#define PATCHER_NOPS
 
#define M_NOP   emit_nop(cd)
 
#define M_MOV(a, b)   emit_mov(cd, b, a)
 
#define M_FMOV(b, c)   emit_fmovs(cd, c, b)
 
#define M_DMOV(b, c)   emit_fmovd(cd, c, b)
 
#define M_LLD(a, b, disp)   emit_ldr_imm(cd, a, b, disp)
 
#define M_ALD(a, b, disp)   emit_ldr_imm(cd, a, b, disp)
 
#define M_ALD_DSEG(a, disp)   M_LLD(a, REG_PV, disp)
 
#define M_ILD(a, b, disp)   emit_ldr_imm32(cd, a, b, disp)
 
#define M_LST(a, b, disp)   emit_str_imm(cd, a, b, disp)
 
#define M_AST(a, b, disp)   emit_str_imm(cd, a, b, disp)
 
#define M_IST(a, b, disp)   emit_str_imm32(cd, a, b, disp)
 
#define M_DLD(a, b, disp)   emit_fp_ldr_imm(cd, a, b, disp)
 
#define M_FLD(a, b, disp)   emit_fp_ldr_imm32(cd, a, b, disp)
 
#define M_DST(a, b, disp)   emit_fp_str_imm(cd, a, b, disp)
 
#define M_FST(a, b, disp)   emit_fp_str_imm32(cd, a, b, disp)
 
#define M_TEST(a)   emit_tst_sreg(cd, a, a)
 
#define M_ACMP(a, b)   emit_cmp_reg(cd, a, b)
 
#define M_ICMP(a, b)   emit_cmp_reg32(cd, a, b)
 

Macro Definition Documentation

#define ALIGNCODENOP
Value:
if ((s4) ((ptrint) cd->mcodeptr & 7)) { \
}
int32_t s4
Definition: types.hpp:45
uintptr_t ptrint
Definition: types.hpp:54
#define M_NOP
Definition: codegen.hpp:338

Definition at line 47 of file codegen.hpp.

#define BRANCH_NOPS
Value:
do { \
} while (0)
#define M_NOP
Definition: codegen.hpp:338

Definition at line 60 of file codegen.hpp.

#define ICONST (   d,
 
)    emit_iconst(cd, (d), (c))

Definition at line 53 of file codegen.hpp.

#define LCONST (   d,
 
)    emit_lconst(cd, (d), (c))

Definition at line 54 of file codegen.hpp.

#define M_ACMP (   a,
 
)    emit_cmp_reg(cd, a, b)

Definition at line 360 of file codegen.hpp.

#define M_ALD (   a,
  b,
  disp 
)    emit_ldr_imm(cd, a, b, disp)

Definition at line 345 of file codegen.hpp.

#define M_ALD_DSEG (   a,
  disp 
)    M_LLD(a, REG_PV, disp)

Definition at line 346 of file codegen.hpp.

#define M_AST (   a,
  b,
  disp 
)    emit_str_imm(cd, a, b, disp)

Definition at line 350 of file codegen.hpp.

#define M_DLD (   a,
  b,
  disp 
)    emit_fp_ldr_imm(cd, a, b, disp)

Definition at line 353 of file codegen.hpp.

#define M_DMOV (   b,
 
)    emit_fmovd(cd, c, b)

Definition at line 342 of file codegen.hpp.

#define M_DST (   a,
  b,
  disp 
)    emit_fp_str_imm(cd, a, b, disp)

Definition at line 356 of file codegen.hpp.

#define M_FLD (   a,
  b,
  disp 
)    emit_fp_ldr_imm32(cd, a, b, disp)

Definition at line 354 of file codegen.hpp.

#define M_FMOV (   b,
 
)    emit_fmovs(cd, c, b)

Definition at line 341 of file codegen.hpp.

#define M_FST (   a,
  b,
  disp 
)    emit_fp_str_imm32(cd, a, b, disp)

Definition at line 357 of file codegen.hpp.

#define M_ICMP (   a,
 
)    emit_cmp_reg32(cd, a, b)

Definition at line 361 of file codegen.hpp.

#define M_ILD (   a,
  b,
  disp 
)    emit_ldr_imm32(cd, a, b, disp)

Definition at line 347 of file codegen.hpp.

#define M_IST (   a,
  b,
  disp 
)    emit_str_imm32(cd, a, b, disp)

Definition at line 351 of file codegen.hpp.

#define M_LLD (   a,
  b,
  disp 
)    emit_ldr_imm(cd, a, b, disp)

Definition at line 344 of file codegen.hpp.

#define M_LST (   a,
  b,
  disp 
)    emit_str_imm(cd, a, b, disp)

Definition at line 349 of file codegen.hpp.

#define M_MOV (   a,
 
)    emit_mov(cd, b, a)

Definition at line 340 of file codegen.hpp.

#define M_NOP   emit_nop(cd)

Definition at line 338 of file codegen.hpp.

#define M_TEST (   a)    emit_tst_sreg(cd, a, a)

Definition at line 359 of file codegen.hpp.

#define MCODECHECK (   icnt)
Value:
do { \
if ((cd->mcodeptr + (icnt) * 4) > cd->mcodeend) \
} while (0)
void codegen_increase(codegendata *cd)

Definition at line 40 of file codegen.hpp.

#define PATCHER_CALL_SIZE   1 * 4 /* an instruction is 4-bytes long */

Definition at line 68 of file codegen.hpp.

#define PATCHER_NOPS
Value:
do { \
} while (0)
#define M_NOP
Definition: codegen.hpp:338

Definition at line 70 of file codegen.hpp.

#define SHIFT (   x,
 
)    ((x) << s)

Definition at line 56 of file codegen.hpp.