CACAO
|
Go to the source code of this file.
Macros | |
#define | SPLIT_OPEN(type, reg, tmpreg) |
#define | SPLIT_STORE_AND_CLOSE(type, reg, offset) |
#define | MCODECHECK(icnt) |
#define | ALIGNCODENOP /* empty */ |
#define | IS_IMM(val) ( ((val) >= 0) && ((val) <= 255) ) |
#define | IS_OFFSET(off, max) ((s4)(off) <= (max) && (s4)(off) >= -(max)) |
#define | CHECK_INT_REG(r) assert((r)>=0 && (r)<=15) |
#define | CHECK_FLT_REG(r) assert((r)>=0 && (r)<=15) |
#define | CHECK_OFFSET(off, max) assert(IS_OFFSET(off,max)) |
#define | BRANCH_NOPS |
#define | PATCHER_CALL_SIZE 1 * 4 /* an instruction is 4-bytes long */ |
#define | PATCHER_NOPS |
#define | ASM_DEBUG_PREPARE M_STMFD(0x7fff, REG_SP) |
#define | ASM_DEBUG_EXECUTE |
#define | COND_EQ 0x0 /* Equal Z set */ |
#define | COND_NE 0x1 /* Not equal Z clear */ |
#define | COND_CS 0x2 /* Carry set C set */ |
#define | COND_CC 0x3 /* Carry clear C clear */ |
#define | COND_MI 0x4 /* Negative N set */ |
#define | COND_PL 0x5 /* Positive N clear */ |
#define | COND_VS 0x6 /* Overflow V set */ |
#define | COND_VC 0x7 /* No overflow V clear */ |
#define | COND_HI 0x8 /* Unsigned higher */ |
#define | COND_LS 0x9 /* Unsigned lower, same */ |
#define | COND_GE 0xA /* Sig. greater, equal */ |
#define | COND_LT 0xB /* Sig. less than */ |
#define | COND_GT 0xC /* Sig. greater than */ |
#define | COND_LE 0xD /* Sig. less, equal */ |
#define | COND_AL 0xE /* Always */ |
#define | CONDNV 0xF /* Special (see A3-5) */ |
#define | UNCOND COND_AL |
#define | M_DAT(cond, op, d, n, S, I, shift) |
#define | M_MEM(cond, L, B, d, n, adr, I, P, U, W) |
#define | M_MEM_GET_Rd(mcode) (((mcode) >> 12) & 0x0f) |
#define | M_MEM_GET_Rbase(mcode) (((mcode) >> 16) & 0x0f) |
#define | M_MEM2(cond, L, H, S, d, n, adr, I, P, U, W) |
#define | M_MEM_MULTI(cond, L, S, regs, n, P, U, W) |
#define | M_BRAX(cond, L, reg) |
#define | M_BRA(cond, L, offset) |
#define | M_MULT(cond, d, n, m, S, A, s) |
#define | M_NOP |
#define | M_BREAKPOINT(imm) |
#define | M_UNDEFINED(cond, imm, n) |
#define | M_CPDOS(cond, op, D, Fd, Fn, Fm) |
#define | M_CPDOD(cond, op, D, Fd, Fn, Fm) |
#define | M_CPDP(cond, p, q, r, s, cp_num, D, N, M, Fd, Fn, Fm) |
#define | M_CPDPF(cond, p, q, r, s, cp_num, Fd, Fn, Fm) M_CPDP(cond,p,q,r,s,cp_num,(Fd)>>4,(Fn)>>4,(Fm)>>4,(Fd)&0xf,(Fn)&0xf,Fm) |
#define | M_CPDT(cond, L, T1, T0, Fd, n, off, P, U, W) |
#define | M_CPLS(cond, L, P, U, W, cp_num, D, Fd, n, off) |
#define | M_CPRT(cond, op, L, cp_num, N, Fn, n) |
#define | M_CPRTS(cond, L, d, Fn, Fm) |
#define | M_CPRTD(cond, L, d, Fn, Fm) |
#define | M_CPRTI(cond, L, d, Fn, Fm) |
#define | M_CPRTX(cond, L, d, Fn, Fm) |
#define | DCD(val) |
#define | REG_LSL(reg, shift) ( (((shift) & 0x1f) << 7) | ((reg) & 0x0f) ) |
#define | REG_LSR(reg, shift) ( (((shift) & 0x1f) << 7) | ((reg) & 0x0f) | (1 << 5) ) |
#define | REG_ASR(reg, shift) ( (((shift) & 0x1f) << 7) | ((reg) & 0x0f) | (1 << 6) ) |
#define | REG_LSL_REG(reg, s) ( (((s) & 0x0f) << 8) | ((reg) & 0x0f) | (1 << 4) ) |
#define | REG_LSR_REG(reg, s) ( (((s) & 0x0f) << 8) | ((reg) & 0x0f) | (1 << 4) | (1 << 5) ) |
#define | REG_ASR_REG(reg, s) ( (((s) & 0x0f) << 8) | ((reg) & 0x0f) | (1 << 4) | (1 << 6) ) |
#define | IMM_ROTR(imm, rot) ( ((imm) & 0xff) | (((rot) & 0x0f) << 8) ) |
#define | IMM_ROTL(imm, rot) IMM_ROTR(imm, 16-(rot)) |
#define | M_ADD(d, a, b) M_DAT(UNCOND,0x04,d,a,0,0,b) /* d = a + b */ |
#define | M_ADC(d, a, b) M_DAT(UNCOND,0x05,d,a,0,0,b) /* d = a + b (with Carry) */ |
#define | M_SUB(d, a, b) M_DAT(UNCOND,0x02,d,a,0,0,b) /* d = a - b */ |
#define | M_SBC(d, a, b) M_DAT(UNCOND,0x06,d,a,0,0,b) /* d = a - b (with Carry) */ |
#define | M_AND(a, b, d) M_DAT(UNCOND,0x00,d,a,0,0,b) /* d = a & b */ |
#define | M_ORR(a, b, d) M_DAT(UNCOND,0x0c,d,a,0,0,b) /* d = a | b */ |
#define | M_EOR(a, b, d) M_DAT(UNCOND,0x01,d,a,0,0,b) /* d = a ^ b */ |
#define | M_TST(a, b) M_DAT(UNCOND,0x08,0,a,1,0,b) /* TST a & b */ |
#define | M_TEQ(a, b) M_DAT(UNCOND,0x09,0,a,1,0,b) /* TST a ^ b */ |
#define | M_CMP(a, b) M_DAT(UNCOND,0x0a,0,a,1,0,b) /* TST a - b */ |
#define | M_MOV(d, b) M_DAT(UNCOND,0x0d,d,0,0,0,b) /* d = b */ |
#define | M_ADD_S(d, a, b) M_DAT(UNCOND,0x04,d,a,1,0,b) /* d = a + b (update Flags) */ |
#define | M_SUB_S(d, a, b) M_DAT(UNCOND,0x02,d,a,1,0,b) /* d = a - b (update Flags) */ |
#define | M_ORR_S(a, b, d) M_DAT(UNCOND,0x0c,d,a,1,0,b) /* d = a | b (update flags) */ |
#define | M_MOV_S(d, b) M_DAT(UNCOND,0x0d,d,0,1,0,b) /* d = b (update Flags) */ |
#define | M_ADD_IMM(d, a, i) M_DAT(UNCOND,0x04,d,a,0,1,i) /* d = a + i */ |
#define | M_ADC_IMM(d, a, i) M_DAT(UNCOND,0x05,d,a,0,1,i) /* d = a + i (with Carry) */ |
#define | M_SUB_IMM(d, a, i) M_DAT(UNCOND,0x02,d,a,0,1,i) /* d = a - i */ |
#define | M_SBC_IMM(d, a, i) M_DAT(UNCOND,0x06,d,a,0,1,i) /* d = a - i (with Carry) */ |
#define | M_RSB_IMM(d, a, i) M_DAT(UNCOND,0x03,d,a,0,1,i) /* d = -a + i */ |
#define | M_RSC_IMM(d, a, i) M_DAT(UNCOND,0x07,d,a,0,1,i) /* d = -a + i (with Carry) */ |
#define | M_AND_IMM(a, i, d) M_DAT(UNCOND,0x00,d,a,0,1,i) /* d = a & i */ |
#define | M_TST_IMM(a, i) M_DAT(UNCOND,0x08,0,a,1,1,i) /* TST a & i */ |
#define | M_TEQ_IMM(a, i) M_DAT(UNCOND,0x09,0,a,1,1,i) /* TST a ^ i */ |
#define | M_CMP_IMM(a, i) M_DAT(UNCOND,0x0a,0,a,1,1,i) /* TST a - i */ |
#define | M_CMN_IMM(a, i) M_DAT(UNCOND,0x0b,0,a,1,1,i) /* TST a + i */ |
#define | M_MOV_IMM(d, i) M_DAT(UNCOND,0x0d,d,0,0,1,i) /* d = i */ |
#define | M_ADD_IMMS(d, a, i) M_DAT(UNCOND,0x04,d,a,1,1,i) /* d = a + i (update Flags) */ |
#define | M_SUB_IMMS(d, a, i) M_DAT(UNCOND,0x02,d,a,1,1,i) /* d = a - i (update Flags) */ |
#define | M_RSB_IMMS(d, a, i) M_DAT(UNCOND,0x03,d,a,1,1,i) /* d = -a + i (update Flags) */ |
#define | M_ADDSUB_IMM(d, a, i) if((i)>=0) M_ADD_IMM(d,a,i); else M_SUB_IMM(d,a,-(i)) |
#define | M_MOVEQ(a, d) M_DAT(COND_EQ,0x0d,d,0,0,0,a) |
#define | M_EORLE(d, a, b) M_DAT(COND_LE,0x01,d,a,0,0,b) |
#define | M_MOVVS_IMM(i, d) M_DAT(COND_VS,0x0d,d,0,0,1,i) |
#define | M_MOVEQ_IMM(i, d) M_DAT(COND_EQ,0x0d,d,0,0,1,i) |
#define | M_MOVNE_IMM(i, d) M_DAT(COND_NE,0x0d,d,0,0,1,i) |
#define | M_MOVLT_IMM(i, d) M_DAT(COND_LT,0x0d,d,0,0,1,i) |
#define | M_MOVGT_IMM(i, d) M_DAT(COND_GT,0x0d,d,0,0,1,i) |
#define | M_MOVLS_IMM(i, d) M_DAT(COND_LS,0x0d,d,0,0,1,i) |
#define | M_ADDHI_IMM(d, a, i) M_DAT(COND_HI,0x04,d,a,0,1,i) |
#define | M_ADDLT_IMM(d, a, i) M_DAT(COND_LT,0x04,d,a,0,1,i) |
#define | M_ADDGT_IMM(d, a, i) M_DAT(COND_GT,0x04,d,a,0,1,i) |
#define | M_SUBLO_IMM(d, a, i) M_DAT(COND_CC,0x02,d,a,0,1,i) |
#define | M_SUBLT_IMM(d, a, i) M_DAT(COND_LT,0x02,d,a,0,1,i) |
#define | M_SUBGT_IMM(d, a, i) M_DAT(COND_GT,0x02,d,a,0,1,i) |
#define | M_RSBMI_IMM(d, a, i) M_DAT(COND_MI,0x03,d,a,0,1,i) |
#define | M_ADCMI_IMM(d, a, i) M_DAT(COND_MI,0x05,d,a,0,1,i) |
#define | M_CMPEQ(a, b) M_DAT(COND_EQ,0x0a,0,a,1,0,b) /* TST a - b */ |
#define | M_CMPLE(a, b) M_DAT(COND_LE,0x0a,0,a,1,0,b) /* TST a - b */ |
#define | M_CMPEQ_IMM(a, i) M_DAT(COND_EQ,0x0a,0,a,1,1,i) |
#define | M_MUL(d, a, b) M_MULT(UNCOND,d,a,b,0,0,0x0) /* d = a * b */ |
#define | M_B(off) M_BRA(UNCOND,0,off) /* unconditional branch */ |
#define | M_BL(off) M_BRA(UNCOND,1,off) /* branch and link */ |
#define | M_BEQ(off) M_BRA(COND_EQ,0,off) /* conditional branches */ |
#define | M_BNE(off) M_BRA(COND_NE,0,off) |
#define | M_BGE(off) M_BRA(COND_GE,0,off) |
#define | M_BGT(off) M_BRA(COND_GT,0,off) |
#define | M_BLT(off) M_BRA(COND_LT,0,off) |
#define | M_BLE(off) M_BRA(COND_LE,0,off) |
#define | M_BHI(off) M_BRA(COND_HI,0,off) /* unsigned conditional */ |
#define | M_BHS(off) M_BRA(COND_CS,0,off) |
#define | M_BLO(off) M_BRA(COND_CC,0,off) |
#define | M_BLS(off) M_BRA(COND_LS,0,off) |
#define | M_BX(a) M_BRAX(COND_AL,0,a) |
#define | M_BLX(a) M_BRAX(COND_AL,1,a) |
#define | M_LDMFD(regs, base) M_MEM_MULTI(UNCOND,1,0,regs,base,0,1,1) |
#define | M_STMFD(regs, base) M_MEM_MULTI(UNCOND,0,0,regs,base,1,0,1) |
#define | M_LDR_REG(d, base, offreg) M_MEM(UNCOND,1,0,d,base,offreg,1,1,1,0) |
#define | M_STR_REG(d, base, offreg) M_MEM(UNCOND,0,0,d,base,offreg,1,1,1,0) |
#define | M_LDR_INTERN(d, base, off) |
#define | M_STR_INTERN(d, base, off) |
#define | M_LDR_UPDATE(d, base, off) |
#define | M_STR_UPDATE(d, base, off) |
#define | M_LDRH(d, base, off) |
#define | M_LDRSH(d, base, off) |
#define | M_LDRSB(d, base, off) |
#define | M_STRH(d, base, off) |
#define | M_STRB(d, base, off) |
#define | M_TRAP(a, i) M_UNDEFINED(UNCOND,i,a); |
#define | M_TRAPEQ(a, i) M_UNDEFINED(COND_EQ,i,a); |
#define | M_TRAPNE(a, i) M_UNDEFINED(COND_NE,i,a); |
#define | M_TRAPLT(a, i) M_UNDEFINED(COND_LT,i,a); |
#define | M_TRAPLE(a, i) M_UNDEFINED(COND_LE,i,a); |
#define | M_TRAPHI(a, i) M_UNDEFINED(COND_HI,i,a); |
#define | M_TRAPHS(a, i) M_UNDEFINED(COND_CS,i,a); |
#define | M_LDRD_INTERN(d, base, off) |
#define | M_STRD_INTERN(d, base, off) |
#define | M_LDRD_ALTERN(d, base, off) |
#define | M_LDRD_UPDATE(d, base, off) |
#define | M_STRD_UPDATE(d, base, off) |
#define | GET_FIRST_REG(d) GET_HIGH_REG(d) |
#define | GET_SECOND_REG(d) GET_LOW_REG(d) |
#define | M_FADD(a, b, d) M_CPDOS(UNCOND,0x00,0,d,a,b) /* d = a + b */ |
#define | M_FSUB(a, b, d) M_CPDOS(UNCOND,0x02,0,d,a,b) /* d = a - b */ |
#define | M_FMUL(a, b, d) M_CPDOS(UNCOND,0x01,0,d,a,b) /* d = a * b */ |
#define | M_FDIV(a, b, d) M_CPDOS(UNCOND,0x04,0,d,a,b) /* d = a / b */ |
#define | M_RMFS(d, a, b) M_CPDOS(UNCOND,0x08,0,d,a,b) /* d = a % b */ |
#define | M_DADD(a, b, d) M_CPDOD(UNCOND,0x00,0,d,a,b) /* d = a + b */ |
#define | M_DSUB(a, b, d) M_CPDOD(UNCOND,0x02,0,d,a,b) /* d = a - b */ |
#define | M_DMUL(a, b, d) M_CPDOD(UNCOND,0x01,0,d,a,b) /* d = a * b */ |
#define | M_DDIV(a, b, d) M_CPDOD(UNCOND,0x04,0,d,a,b) /* d = a / b */ |
#define | M_RMFD(d, a, b) M_CPDOD(UNCOND,0x08,0,d,a,b) /* d = a % b */ |
#define | M_FMOV(a, d) M_CPDOS(UNCOND,0x00,1,d,0,a) /* d = a */ |
#define | M_DMOV(a, d) M_CPDOD(UNCOND,0x00,1,d,0,a) /* d = a */ |
#define | M_FNEG(a, d) M_CPDOS(UNCOND,0x01,1,d,0,a) /* d = - a */ |
#define | M_DNEG(a, d) M_CPDOD(UNCOND,0x01,1,d,0,a) /* d = - a */ |
#define | M_FCMP(a, b) M_CPRTX(UNCOND,1,0x0f,a,b) /* COMPARE a; b */ |
#define | M_DCMP(a, b) M_CPRTX(UNCOND,1,0x0f,a,b) /* COMPARE a; b */ |
#define | M_CVTDF(a, b) M_FMOV(a,b) |
#define | M_CVTFD(a, b) M_DMOV(a,b) |
#define | M_CVTIF(a, d) M_CPRTS(UNCOND,0,a,d,0) /* d = (float) a */ |
#define | M_CVTID(a, d) M_CPRTD(UNCOND,0,a,d,0) /* d = (float) a */ |
#define | M_CVTFI(a, d) M_CPRTI(UNCOND,1,d,0,a) /* d = (int) a */ |
#define | M_CVTDI(a, d) M_CPRTI(UNCOND,1,d,0,a) /* d = (int) a */ |
#define | M_CAST_I2F(a, Fb) |
#define | M_CAST_L2D(a, Fb) |
#define | M_CAST_F2I(Fa, b) |
#define | M_CAST_D2L(Fa, b) |
#define | M_FLD_INTERN(d, base, off) |
#define | M_DLD_INTERN(d, base, off) |
#define | M_FST_INTERN(d, base, off) |
#define | M_DST_INTERN(d, base, off) |
#define | M_FLD_UPDATE(d, base, off) |
#define | M_DLD_UPDATE(d, base, off) |
#define | M_FST_UPDATE(d, base, off) |
#define | M_DST_UPDATE(d, base, off) |
#define | M_LDR(d, base, offset) |
#define | M_LDR_NEGATIVE(d, base, offset) |
#define | M_LDRD(d, base, offset) |
#define | M_LDFS(d, base, offset) |
#define | M_LDFD(d, base, offset) |
#define | M_STR(d, base, offset) |
#define | M_STRD(d, base, offset) |
#define | M_STFS(d, base, offset) |
#define | M_STFD(d, base, offset) |
#define | M_ADD_IMM_EXT_MUL4(d, n, imm) |
#define | M_SUB_IMM_EXT_MUL4(d, n, imm) |
#define | ICONST(d, c) emit_iconst(cd, (d), (c)) |
#define | LCONST(d, c) |
#define | FCONST(d, c) |
#define | DCONST(d, c) |
#define | M_LONGBRANCH(adr) |
#define | M_DSEG_LOAD(reg, offset) M_LDR_NEGATIVE(reg, REG_PV, offset) |
#define | M_DSEG_BRANCH(offset) |
#define | M_ILD(a, b, c) M_LDR(a,b,c) |
#define | M_LLD(a, b, c) M_LDRD(a,b,c) |
#define | M_ILD_INTERN(a, b, c) M_LDR_INTERN(a,b,c) |
#define | M_LLD_INTERN(a, b, c) M_LDRD_INTERN(a,b,c) |
#define | M_ALD(a, b, c) M_ILD(a,b,c) |
#define | M_ALD_INTERN(a, b, c) M_ILD_INTERN(a,b,c) |
#define | M_ALD_DSEG(a, c) M_DSEG_LOAD(a,c) |
#define | M_IST(a, b, c) M_STR(a,b,c) |
#define | M_LST(a, b, c) M_STRD(a,b,c) |
#define | M_IST_INTERN(a, b, c) M_STR_INTERN(a,b,c) |
#define | M_LST_INTERN(a, b, c) M_STRD_INTERN(a,b,c) |
#define | M_AST(a, b, c) M_IST(a,b,c) |
#define | M_AST_INTERN(a, b, c) M_IST_INTERN(a,b,c) |
#define | M_ACMP(a, b) M_CMP(a,b) |
#define | M_ICMP(a, b) M_CMP(a,b) |
#define | M_TEST(a) M_TEQ_IMM(a, 0); |
#define | M_FLD(a, b, c) M_LDFS(a,b,c) |
#define | M_DLD(a, b, c) M_LDFD(a,b,c) |
#define | M_FST(a, b, c) M_STFS(a,b,c) |
#define | M_DST(a, b, c) M_STFD(a,b,c) |
Functions | |
void | asm_debug (int a1, int a2, int a3, int a4) |
void | asm_debug_intern (int a1, int a2, int a3, int a4) |
#define ALIGNCODENOP /* empty */ |
Definition at line 81 of file codegen.hpp.
#define ASM_DEBUG_EXECUTE |
Definition at line 121 of file codegen.hpp.
#define ASM_DEBUG_PREPARE M_STMFD(0x7fff, REG_SP) |
Definition at line 119 of file codegen.hpp.
#define BRANCH_NOPS |
Definition at line 94 of file codegen.hpp.
#define CHECK_FLT_REG | ( | r | ) | assert((r)>=0 && (r)<=15) |
Definition at line 88 of file codegen.hpp.
#define CHECK_INT_REG | ( | r | ) | assert((r)>=0 && (r)<=15) |
Definition at line 87 of file codegen.hpp.
Definition at line 89 of file codegen.hpp.
#define COND_AL 0xE /* Always */ |
Definition at line 146 of file codegen.hpp.
#define COND_CC 0x3 /* Carry clear C clear */ |
Definition at line 135 of file codegen.hpp.
#define COND_CS 0x2 /* Carry set C set */ |
Definition at line 134 of file codegen.hpp.
#define COND_EQ 0x0 /* Equal Z set */ |
Definition at line 132 of file codegen.hpp.
#define COND_GE 0xA /* Sig. greater, equal */ |
Definition at line 142 of file codegen.hpp.
#define COND_GT 0xC /* Sig. greater than */ |
Definition at line 144 of file codegen.hpp.
#define COND_HI 0x8 /* Unsigned higher */ |
Definition at line 140 of file codegen.hpp.
#define COND_LE 0xD /* Sig. less, equal */ |
Definition at line 145 of file codegen.hpp.
#define COND_LS 0x9 /* Unsigned lower, same */ |
Definition at line 141 of file codegen.hpp.
#define COND_LT 0xB /* Sig. less than */ |
Definition at line 143 of file codegen.hpp.
#define COND_MI 0x4 /* Negative N set */ |
Definition at line 136 of file codegen.hpp.
#define COND_NE 0x1 /* Not equal Z clear */ |
Definition at line 133 of file codegen.hpp.
#define COND_PL 0x5 /* Positive N clear */ |
Definition at line 137 of file codegen.hpp.
#define COND_VC 0x7 /* No overflow V clear */ |
Definition at line 139 of file codegen.hpp.
#define COND_VS 0x6 /* Overflow V set */ |
Definition at line 138 of file codegen.hpp.
#define CONDNV 0xF /* Special (see A3-5) */ |
Definition at line 147 of file codegen.hpp.
#define DCD | ( | val | ) |
Definition at line 396 of file codegen.hpp.
#define DCONST | ( | d, | |
c | |||
) |
Definition at line 1110 of file codegen.hpp.
#define FCONST | ( | d, | |
c | |||
) |
Definition at line 1104 of file codegen.hpp.
#define GET_FIRST_REG | ( | d | ) | GET_HIGH_REG(d) |
Definition at line 652 of file codegen.hpp.
#define GET_SECOND_REG | ( | d | ) | GET_LOW_REG(d) |
Definition at line 653 of file codegen.hpp.
#define ICONST | ( | d, | |
c | |||
) | emit_iconst(cd, (d), (c)) |
Definition at line 1087 of file codegen.hpp.
#define IMM_ROTL | ( | imm, | |
rot | |||
) | IMM_ROTR(imm, 16-(rot)) |
Definition at line 414 of file codegen.hpp.
#define IMM_ROTR | ( | imm, | |
rot | |||
) | ( ((imm) & 0xff) | (((rot) & 0x0f) << 8) ) |
Definition at line 413 of file codegen.hpp.
#define IS_IMM | ( | val | ) | ( ((val) >= 0) && ((val) <= 255) ) |
Definition at line 84 of file codegen.hpp.
Definition at line 85 of file codegen.hpp.
#define LCONST | ( | d, | |
c | |||
) |
Definition at line 1089 of file codegen.hpp.
#define M_ACMP | ( | a, | |
b | |||
) | M_CMP(a,b) |
Definition at line 1170 of file codegen.hpp.
Definition at line 422 of file codegen.hpp.
Definition at line 438 of file codegen.hpp.
Definition at line 471 of file codegen.hpp.
Definition at line 421 of file codegen.hpp.
Definition at line 437 of file codegen.hpp.
#define M_ADD_IMM_EXT_MUL4 | ( | d, | |
n, | |||
imm | |||
) |
Definition at line 1064 of file codegen.hpp.
Definition at line 449 of file codegen.hpp.
Definition at line 432 of file codegen.hpp.
Definition at line 466 of file codegen.hpp.
Definition at line 464 of file codegen.hpp.
Definition at line 465 of file codegen.hpp.
Definition at line 453 of file codegen.hpp.
#define M_ALD | ( | a, | |
b, | |||
c | |||
) | M_ILD(a,b,c) |
Definition at line 1155 of file codegen.hpp.
#define M_ALD_DSEG | ( | a, | |
c | |||
) | M_DSEG_LOAD(a,c) |
Definition at line 1157 of file codegen.hpp.
#define M_ALD_INTERN | ( | a, | |
b, | |||
c | |||
) | M_ILD_INTERN(a,b,c) |
Definition at line 1156 of file codegen.hpp.
Definition at line 425 of file codegen.hpp.
Definition at line 443 of file codegen.hpp.
#define M_AST | ( | a, | |
b, | |||
c | |||
) | M_IST(a,b,c) |
Definition at line 1166 of file codegen.hpp.
#define M_AST_INTERN | ( | a, | |
b, | |||
c | |||
) | M_IST_INTERN(a,b,c) |
Definition at line 1167 of file codegen.hpp.
Definition at line 480 of file codegen.hpp.
Definition at line 482 of file codegen.hpp.
Definition at line 484 of file codegen.hpp.
Definition at line 485 of file codegen.hpp.
Definition at line 488 of file codegen.hpp.
Definition at line 489 of file codegen.hpp.
Definition at line 481 of file codegen.hpp.
Definition at line 487 of file codegen.hpp.
Definition at line 490 of file codegen.hpp.
Definition at line 491 of file codegen.hpp.
Definition at line 486 of file codegen.hpp.
Definition at line 494 of file codegen.hpp.
Definition at line 483 of file codegen.hpp.
#define M_BRA | ( | cond, | |
L, | |||
offset | |||
) |
Definition at line 237 of file codegen.hpp.
#define M_BRAX | ( | cond, | |
L, | |||
reg | |||
) |
Definition at line 224 of file codegen.hpp.
#define M_BREAKPOINT | ( | imm | ) |
Definition at line 271 of file codegen.hpp.
Definition at line 493 of file codegen.hpp.
#define M_CAST_D2L | ( | Fa, | |
b | |||
) |
Definition at line 780 of file codegen.hpp.
#define M_CAST_F2I | ( | Fa, | |
b | |||
) |
Definition at line 772 of file codegen.hpp.
#define M_CAST_I2F | ( | a, | |
Fb | |||
) |
Definition at line 755 of file codegen.hpp.
#define M_CAST_L2D | ( | a, | |
Fb | |||
) |
Definition at line 763 of file codegen.hpp.
Definition at line 447 of file codegen.hpp.
Definition at line 430 of file codegen.hpp.
Definition at line 446 of file codegen.hpp.
Definition at line 473 of file codegen.hpp.
Definition at line 476 of file codegen.hpp.
Definition at line 474 of file codegen.hpp.
#define M_CPDOD | ( | cond, | |
op, | |||
D, | |||
Fd, | |||
Fn, | |||
Fm | |||
) |
Definition at line 309 of file codegen.hpp.
#define M_CPDOS | ( | cond, | |
op, | |||
D, | |||
Fd, | |||
Fn, | |||
Fm | |||
) |
Definition at line 302 of file codegen.hpp.
Definition at line 316 of file codegen.hpp.
#define M_CPDPF | ( | cond, | |
p, | |||
q, | |||
r, | |||
s, | |||
cp_num, | |||
Fd, | |||
Fn, | |||
Fm | |||
) | M_CPDP(cond,p,q,r,s,cp_num,(Fd)>>4,(Fn)>>4,(Fm)>>4,(Fd)&0xf,(Fn)&0xf,Fm) |
Definition at line 322 of file codegen.hpp.
#define M_CPDT | ( | cond, | |
L, | |||
T1, | |||
T0, | |||
Fd, | |||
n, | |||
off, | |||
P, | |||
U, | |||
W | |||
) |
Definition at line 336 of file codegen.hpp.
#define M_CPLS | ( | cond, | |
L, | |||
P, | |||
U, | |||
W, | |||
cp_num, | |||
D, | |||
Fd, | |||
n, | |||
off | |||
) |
Definition at line 342 of file codegen.hpp.
Definition at line 357 of file codegen.hpp.
#define M_CPRTD | ( | cond, | |
L, | |||
d, | |||
Fn, | |||
Fm | |||
) |
Definition at line 370 of file codegen.hpp.
#define M_CPRTI | ( | cond, | |
L, | |||
d, | |||
Fn, | |||
Fm | |||
) |
Definition at line 377 of file codegen.hpp.
#define M_CPRTS | ( | cond, | |
L, | |||
d, | |||
Fn, | |||
Fm | |||
) |
Definition at line 363 of file codegen.hpp.
#define M_CPRTX | ( | cond, | |
L, | |||
d, | |||
Fn, | |||
Fm | |||
) |
Definition at line 386 of file codegen.hpp.
#define M_CVTDF | ( | a, | |
b | |||
) | M_FMOV(a,b) |
Definition at line 720 of file codegen.hpp.
Definition at line 725 of file codegen.hpp.
#define M_CVTFD | ( | a, | |
b | |||
) | M_DMOV(a,b) |
Definition at line 721 of file codegen.hpp.
Definition at line 724 of file codegen.hpp.
Definition at line 723 of file codegen.hpp.
Definition at line 722 of file codegen.hpp.
Definition at line 706 of file codegen.hpp.
Definition at line 160 of file codegen.hpp.
Definition at line 718 of file codegen.hpp.
Definition at line 709 of file codegen.hpp.
#define M_DLD | ( | a, | |
b, | |||
c | |||
) | M_LDFD(a,b,c) |
Definition at line 1180 of file codegen.hpp.
#define M_DLD_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 828 of file codegen.hpp.
#define M_DLD_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 852 of file codegen.hpp.
Definition at line 713 of file codegen.hpp.
Definition at line 708 of file codegen.hpp.
Definition at line 715 of file codegen.hpp.
#define M_DSEG_BRANCH | ( | offset | ) |
Definition at line 1136 of file codegen.hpp.
#define M_DSEG_LOAD | ( | reg, | |
offset | |||
) | M_LDR_NEGATIVE(reg, REG_PV, offset) |
Definition at line 1133 of file codegen.hpp.
#define M_DST | ( | a, | |
b, | |||
c | |||
) | M_STFD(a,b,c) |
Definition at line 1183 of file codegen.hpp.
#define M_DST_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 840 of file codegen.hpp.
#define M_DST_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 864 of file codegen.hpp.
Definition at line 707 of file codegen.hpp.
Definition at line 427 of file codegen.hpp.
Definition at line 455 of file codegen.hpp.
Definition at line 701 of file codegen.hpp.
Definition at line 717 of file codegen.hpp.
Definition at line 704 of file codegen.hpp.
#define M_FLD | ( | a, | |
b, | |||
c | |||
) | M_LDFS(a,b,c) |
Definition at line 1179 of file codegen.hpp.
#define M_FLD_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 822 of file codegen.hpp.
#define M_FLD_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 846 of file codegen.hpp.
Definition at line 712 of file codegen.hpp.
Definition at line 703 of file codegen.hpp.
Definition at line 714 of file codegen.hpp.
#define M_FST | ( | a, | |
b, | |||
c | |||
) | M_STFS(a,b,c) |
Definition at line 1182 of file codegen.hpp.
#define M_FST_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 834 of file codegen.hpp.
#define M_FST_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 858 of file codegen.hpp.
Definition at line 702 of file codegen.hpp.
#define M_ICMP | ( | a, | |
b | |||
) | M_CMP(a,b) |
Definition at line 1171 of file codegen.hpp.
#define M_ILD | ( | a, | |
b, | |||
c | |||
) | M_LDR(a,b,c) |
Definition at line 1149 of file codegen.hpp.
#define M_ILD_INTERN | ( | a, | |
b, | |||
c | |||
) | M_LDR_INTERN(a,b,c) |
Definition at line 1152 of file codegen.hpp.
#define M_IST | ( | a, | |
b, | |||
c | |||
) | M_STR(a,b,c) |
Definition at line 1160 of file codegen.hpp.
#define M_IST_INTERN | ( | a, | |
b, | |||
c | |||
) | M_STR_INTERN(a,b,c) |
Definition at line 1163 of file codegen.hpp.
#define M_LDFD | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 962 of file codegen.hpp.
#define M_LDFS | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 946 of file codegen.hpp.
#define M_LDMFD | ( | regs, | |
base | |||
) | M_MEM_MULTI(UNCOND,1,0,regs,base,0,1,1) |
Definition at line 501 of file codegen.hpp.
#define M_LDR | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 891 of file codegen.hpp.
#define M_LDR_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 507 of file codegen.hpp.
#define M_LDR_NEGATIVE | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 909 of file codegen.hpp.
Definition at line 504 of file codegen.hpp.
#define M_LDR_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 519 of file codegen.hpp.
#define M_LDRD | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 921 of file codegen.hpp.
#define M_LDRD_ALTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 632 of file codegen.hpp.
#define M_LDRD_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 620 of file codegen.hpp.
#define M_LDRD_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 638 of file codegen.hpp.
#define M_LDRH | ( | d, | |
base, | |||
off | |||
) |
Definition at line 532 of file codegen.hpp.
#define M_LDRSB | ( | d, | |
base, | |||
off | |||
) |
Definition at line 546 of file codegen.hpp.
#define M_LDRSH | ( | d, | |
base, | |||
off | |||
) |
Definition at line 539 of file codegen.hpp.
#define M_LLD | ( | a, | |
b, | |||
c | |||
) | M_LDRD(a,b,c) |
Definition at line 1150 of file codegen.hpp.
#define M_LLD_INTERN | ( | a, | |
b, | |||
c | |||
) | M_LDRD_INTERN(a,b,c) |
Definition at line 1153 of file codegen.hpp.
#define M_LONGBRANCH | ( | adr | ) |
Definition at line 1123 of file codegen.hpp.
#define M_LST | ( | a, | |
b, | |||
c | |||
) | M_STRD(a,b,c) |
Definition at line 1161 of file codegen.hpp.
#define M_LST_INTERN | ( | a, | |
b, | |||
c | |||
) | M_STRD_INTERN(a,b,c) |
Definition at line 1164 of file codegen.hpp.
#define M_MEM | ( | cond, | |
L, | |||
B, | |||
d, | |||
n, | |||
adr, | |||
I, | |||
P, | |||
U, | |||
W | |||
) |
Definition at line 176 of file codegen.hpp.
#define M_MEM2 | ( | cond, | |
L, | |||
H, | |||
S, | |||
d, | |||
n, | |||
adr, | |||
I, | |||
P, | |||
U, | |||
W | |||
) |
Definition at line 196 of file codegen.hpp.
#define M_MEM_GET_Rbase | ( | mcode | ) | (((mcode) >> 16) & 0x0f) |
Definition at line 183 of file codegen.hpp.
#define M_MEM_GET_Rd | ( | mcode | ) | (((mcode) >> 12) & 0x0f) |
Definition at line 182 of file codegen.hpp.
#define M_MEM_MULTI | ( | cond, | |
L, | |||
S, | |||
regs, | |||
n, | |||
P, | |||
U, | |||
W | |||
) |
Definition at line 211 of file codegen.hpp.
Definition at line 431 of file codegen.hpp.
Definition at line 448 of file codegen.hpp.
Definition at line 435 of file codegen.hpp.
Definition at line 454 of file codegen.hpp.
Definition at line 458 of file codegen.hpp.
Definition at line 461 of file codegen.hpp.
Definition at line 462 of file codegen.hpp.
Definition at line 460 of file codegen.hpp.
Definition at line 459 of file codegen.hpp.
Definition at line 457 of file codegen.hpp.
Definition at line 478 of file codegen.hpp.
#define M_MULT | ( | cond, | |
d, | |||
n, | |||
m, | |||
S, | |||
A, | |||
s | |||
) |
Definition at line 253 of file codegen.hpp.
#define M_NOP |
Definition at line 262 of file codegen.hpp.
Definition at line 426 of file codegen.hpp.
Definition at line 434 of file codegen.hpp.
Definition at line 710 of file codegen.hpp.
Definition at line 705 of file codegen.hpp.
Definition at line 441 of file codegen.hpp.
Definition at line 451 of file codegen.hpp.
Definition at line 470 of file codegen.hpp.
Definition at line 442 of file codegen.hpp.
Definition at line 424 of file codegen.hpp.
Definition at line 440 of file codegen.hpp.
#define M_STFD | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 1036 of file codegen.hpp.
#define M_STFS | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 1020 of file codegen.hpp.
#define M_STMFD | ( | regs, | |
base | |||
) | M_MEM_MULTI(UNCOND,0,0,regs,base,1,0,1) |
Definition at line 502 of file codegen.hpp.
#define M_STR | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 980 of file codegen.hpp.
#define M_STR_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 513 of file codegen.hpp.
Definition at line 505 of file codegen.hpp.
#define M_STR_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 525 of file codegen.hpp.
#define M_STRB | ( | d, | |
base, | |||
off | |||
) |
Definition at line 560 of file codegen.hpp.
#define M_STRD | ( | d, | |
base, | |||
offset | |||
) |
Definition at line 997 of file codegen.hpp.
#define M_STRD_INTERN | ( | d, | |
base, | |||
off | |||
) |
Definition at line 626 of file codegen.hpp.
#define M_STRD_UPDATE | ( | d, | |
base, | |||
off | |||
) |
Definition at line 645 of file codegen.hpp.
#define M_STRH | ( | d, | |
base, | |||
off | |||
) |
Definition at line 553 of file codegen.hpp.
Definition at line 423 of file codegen.hpp.
Definition at line 439 of file codegen.hpp.
#define M_SUB_IMM_EXT_MUL4 | ( | d, | |
n, | |||
imm | |||
) |
Definition at line 1073 of file codegen.hpp.
Definition at line 450 of file codegen.hpp.
Definition at line 433 of file codegen.hpp.
Definition at line 469 of file codegen.hpp.
Definition at line 467 of file codegen.hpp.
Definition at line 468 of file codegen.hpp.
Definition at line 429 of file codegen.hpp.
Definition at line 445 of file codegen.hpp.
#define M_TEST | ( | a | ) | M_TEQ_IMM(a, 0); |
Definition at line 1174 of file codegen.hpp.
#define M_TRAP | ( | a, | |
i | |||
) | M_UNDEFINED(UNCOND,i,a); |
Definition at line 568 of file codegen.hpp.
#define M_TRAPEQ | ( | a, | |
i | |||
) | M_UNDEFINED(COND_EQ,i,a); |
Definition at line 569 of file codegen.hpp.
#define M_TRAPHI | ( | a, | |
i | |||
) | M_UNDEFINED(COND_HI,i,a); |
Definition at line 573 of file codegen.hpp.
#define M_TRAPHS | ( | a, | |
i | |||
) | M_UNDEFINED(COND_CS,i,a); |
Definition at line 574 of file codegen.hpp.
#define M_TRAPLE | ( | a, | |
i | |||
) | M_UNDEFINED(COND_LE,i,a); |
Definition at line 572 of file codegen.hpp.
#define M_TRAPLT | ( | a, | |
i | |||
) | M_UNDEFINED(COND_LT,i,a); |
Definition at line 571 of file codegen.hpp.
#define M_TRAPNE | ( | a, | |
i | |||
) | M_UNDEFINED(COND_NE,i,a); |
Definition at line 570 of file codegen.hpp.
Definition at line 428 of file codegen.hpp.
Definition at line 444 of file codegen.hpp.
#define M_UNDEFINED | ( | cond, | |
imm, | |||
n | |||
) |
Definition at line 280 of file codegen.hpp.
#define MCODECHECK | ( | icnt | ) |
Definition at line 75 of file codegen.hpp.
#define PATCHER_CALL_SIZE 1 * 4 /* an instruction is 4-bytes long */ |
Definition at line 102 of file codegen.hpp.
#define PATCHER_NOPS |
Definition at line 104 of file codegen.hpp.
#define REG_ASR | ( | reg, | |
shift | |||
) | ( (((shift) & 0x1f) << 7) | ((reg) & 0x0f) | (1 << 6) ) |
Definition at line 406 of file codegen.hpp.
#define REG_ASR_REG | ( | reg, | |
s | |||
) | ( (((s) & 0x0f) << 8) | ((reg) & 0x0f) | (1 << 4) | (1 << 6) ) |
Definition at line 409 of file codegen.hpp.
#define REG_LSL | ( | reg, | |
shift | |||
) | ( (((shift) & 0x1f) << 7) | ((reg) & 0x0f) ) |
Definition at line 404 of file codegen.hpp.
#define REG_LSL_REG | ( | reg, | |
s | |||
) | ( (((s) & 0x0f) << 8) | ((reg) & 0x0f) | (1 << 4) ) |
Definition at line 407 of file codegen.hpp.
#define REG_LSR | ( | reg, | |
shift | |||
) | ( (((shift) & 0x1f) << 7) | ((reg) & 0x0f) | (1 << 5) ) |
Definition at line 405 of file codegen.hpp.
#define REG_LSR_REG | ( | reg, | |
s | |||
) | ( (((s) & 0x0f) << 8) | ((reg) & 0x0f) | (1 << 4) | (1 << 5) ) |
Definition at line 408 of file codegen.hpp.
#define SPLIT_OPEN | ( | type, | |
reg, | |||
tmpreg | |||
) |
Definition at line 54 of file codegen.hpp.
#define SPLIT_STORE_AND_CLOSE | ( | type, | |
reg, | |||
offset | |||
) |
Definition at line 61 of file codegen.hpp.
#define UNCOND COND_AL |
Definition at line 148 of file codegen.hpp.
void asm_debug | ( | int | a1, |
int | a2, | ||
int | a3, | ||
int | a4 | ||
) |
Definition at line 2698 of file codegen.cpp.
void asm_debug_intern | ( | int | a1, |
int | a2, | ||
int | a3, | ||
int | a4 | ||
) |