CACAO
|
Go to the source code of this file.
Macros | |
#define | MCODECHECK(icnt) |
#define | ALIGNCODENOP |
#define | PATCHER_CALL_SIZE 2 /* size in bytes of a patcher call */ |
#define | PATCHER_NOPS M_NOP3 |
#define | BRANCH_NOPS |
#define | RN 16 |
#define | _OR(r) _OR_IMPL(__FILE__, __LINE__, r) |
#define | _SMIN(b) (-(1 << (bits - 1))) |
#define | _SMAX(b) ((1 << (b - 1)) - 1) |
#define | _UMIN(b) 0 |
#define | _UMAX(b) ((1 << b) - 1) |
#define | _UBITS(i, bits) _UBITS_IMPL(__FILE__, __LINE__, i, bits) |
#define | _SBITS(i, bits) _SBITS_IMPL(__FILE__, __LINE__, i, bits) |
#define | _BITS(i, bits) _BITS_IMPL(__FILE__, __LINE__, i, bits) |
#define | _R(x) _UBITS((x), 4) |
#define | _D(x) _UBITS((x), 12) |
#define | _I4(x) _BITS((x), 4) |
#define | _UI4(x) _UBITS((x), 4) |
#define | _SI4(x) _SBITS((x), 4) |
#define | _I8(x) _BITS((x), 8) |
#define | _UI8(x) _UBITS((x), 8) |
#define | _SI8(x) _SBITS((x), 8) |
#define | _I12(x) _BITS((x), 12) |
#define | _UI12(x) _UBITS((x), 12) |
#define | _SI12(x) _SBITS((x), 12) |
#define | _I16(x) _BITS((x), 16) |
#define | _UI16(x) _UBITS((x), 16) |
#define | _SI16(x) _SBITS((x), 16) |
#define | _OP(x) _UBITS((x), 8) |
#define | _OP4(x) _UBITS((x), 4) |
#define | _OP16(x) _UBITS((x), 16) |
#define | _CODE(t, code) |
#define | _CODE2(code) _CODE(u2, code) |
#define | _CODE4(code) _CODE(u4, code) |
#define | _IF(cond, t, f) do { if (cond) { t ; } else { f ; } } while (0) |
#define | _IFNEG(val, neg, pos) _IF((val) < 0, neg, pos) |
#define | N_RR(op, r1, r2) _CODE2( (_OP(op) << 8) | (_R(r1) << 4) | _R(r2) ) |
#define | SZ_RR 2 |
#define | N_RR2(op, i) _CODE2( (_OP(op) << 8) | _I8(i) ) |
#define | N_RX(op, r1, d2, x2, b2) _CODE4( (_OP(op) << 24) | (_R(r1) << 20) | (_OR(x2) << 16) | (_OR(b2) << 12) | (_D(d2) << 0) ) |
#define | SZ_RX 4 |
#define | N_RI(op1, op2, r1, i2) _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_SI16(i2) ) |
#define | N_RI2(op1, op2, r1, i2) _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_UI16(i2) ) |
#define | SZ_RI 4 |
#define | N_SI(op, d1, b1, i2) _CODE4( (_OP(op) << 24) | (_OR(i2) << 16) | (_OR(b1) << 12) | _D(d1) ) |
#define | SZ_SI 4 |
#define | N_SS(op, d1, l, b1, d2, b2) |
#define | SZ_SS 6 |
#define | N_SS2(op, d1, l1, b1, d2, l2, b2) N_SS(op, d1, (_I4(l1) << 4) | _I4(l2), b1, d2, l2) |
#define | N_RS(op, r1, r3, d2, b2) _CODE4( (_OP(op) << 24) | (_R(r1) << 20) | (_R(r3) << 16) | (_OR(b2) << 12) | _D(d2) ) |
#define | SZ_RS 4 |
#define | N_RSI(op, r1, r2, i2) _CODE4( ((op) << 24) | (_R(r1) << 20) | (_R(r3) << 16) | (u2)_16(i2) ) |
#define | SZ_RSI 4 |
#define | N_RRE(op, r1, r2) _CODE4( (_OP16(op) << 16) | (_R(r1) << 4) | _R(r2) ) |
#define | SZ_RRE 4 |
#define | N_S2(d2, b2) _CODE4( (_OP16(op) << 16) | (_OR(b2) << 12) | _D(d2) ) |
#define | SZ_S2 4 |
#define | N_E(op) _CODE2( _OP16(op) ) |
#define | SZ_E 2 |
#define | N_RXE(op, r1, d2, x2, b2) |
#define | S_RXE 6 |
#define | N_RRF(op, r1, m3, r2) _CODE4( (_OP16(op) << 16) | (_R(m3) << 12) | (_R(r1) << 4) | _R(r2) ) |
#define | S_RRF 4 |
#define | N_IMM_MIN -32768 |
#define | N_IMM_MAX 32767 |
#define | N_VALID_IMM(x) ((N_IMM_MIN <= (x)) && ((x) <= N_IMM_MAX)) |
#define | ASSERT_VALID_IMM(x) assert(N_VALID_IMM(x)) |
#define | N_DISP_MIN 0 |
#define | N_DISP_MAX 0xFFF |
#define | N_VALID_DISP(x) ((N_DISP_MIN <= (x)) && ((x) <= N_DISP_MAX)) |
#define | ASSERT_VALID_DISP(x) assert(N_VALID_DISP(x)) |
#define | N_PV_OFFSET (-0xFFC) |
#define | N_DSEG_DISP(x) ((x) - N_PV_OFFSET) |
#define | N_VALID_DSEG_DISP(x) N_VALID_DISP(N_DSEG_DISP(x)) |
#define | N_BRANCH_MIN (-32768 * 2) |
#define | N_BRANCH_MAX (32767 * 2) |
#define | N_VALID_BRANCH(x) ((N_BRANCH_MIN <= (x)) && ((x) <= N_BRANCH_MAX)) |
#define | ASSERT_VALID_BRANCH(x) assert(N_VALID_BRANCH(x)) |
#define | N_IS_EVEN_ODD(x) (((GET_HIGH_REG(x) % 2) == 0) && (GET_LOW_REG(x) == (GET_HIGH_REG(x) + 1))) |
#define | DD_O 1 |
#define | DD_H 2 |
#define | DD_NLE 3 |
#define | DD_L 4 |
#define | DD_NHE 5 |
#define | DD_LH 6 |
#define | DD_NE 7 |
#define | DD_E 8 |
#define | DD_NLH 9 |
#define | DD_HE 10 |
#define | DD_NL 11 |
#define | DD_LE 12 |
#define | DD_NH 13 |
#define | DD_NO 14 |
#define | DD_ANY 15 |
#define | DD_0 8 |
#define | DD_1 4 |
#define | DD_2 2 |
#define | DD_3 1 |
#define | N_ILL(data) _CODE2(0x0200 | _UBITS(data, 8)) |
#define | OPC_ILL 0x02 |
#define | SZ_ILL 2 |
#define | N_LONG(l) _CODE4(l) |
#define | SZ_LONG 4 |
#define | N_AR(r1, r2) N_RR(0x1A, r1, r2) |
#define | N_A(r1, d2, x2, b2) N_RX(0x5A, r1, d2, x2, b2) |
#define | N_AH(r1, d2, x2, b2) N_RX(0x4A, r1, d2, x2, b2) |
#define | N_AHI(r1, i2) N_RI(0xA7, 0xA, r1, i2) |
#define | SZ_AHI SZ_RI |
#define | N_ALR(r1, r2) N_RR(0x1E, r1, r2) |
#define | N_AL(r1, d2, x2, b2) N_RX(0x5E, r1, d2, x2, b2) |
#define | N_NR(r1, r2) N_RR(0x14, r1, r2) |
#define | SZ_NR SZ_RR |
#define | N_N(r1, d2, x2, b2) N_RX(0x54, r1, d2, x2, b2) |
#define | N_NI(d1, b1, i2) N_SI(0x94, d1, b1, i2) |
#define | N_NC(d1, l, b1, d2, b2) N_SS(0xD4, (l - 1), b1, d1, b2, d2) |
#define | N_BALR(r1, r2) N_RR(0x05, r1, _OR(r2)) |
#define | N_BAL(r1, d2, x2, b2) N_RX(0x45, r1, d2, x2, b2) |
#define | N_BASR(r1, r2) N_RR(0x0D, r1, _OR(r2)) |
#define | SZ_BASR SZ_RR |
#define | N_BAS(r1, d2, x2, b2) N_RX(0x4D, r1, d2, x2, b2) |
#define | N_BASSM(r1, r2) N_RR(0x0C, r1, _OR(r2)) |
#define | N_BSM(r1, r2) N_RR(0x0B, r1, _OR(r2)) |
#define | N_BCR(m1, r2) N_RR(0x07, m1, _OR(r2)) |
#define | SZ_BCR SZ_RR |
#define | N_BR(r2) N_BCR(DD_ANY, r2) |
#define | N_BC(m1, d2, x2, b2) N_RX(0x47, m1, d2, x2, b2) |
#define | SZ_BC SZ_RS |
#define | N_BCTR(r1, r2) N_RR(0x06, r1, _OR(r2)) |
#define | N_BCT(r1, d2, x2, b2) N_RX(0x46, r1, d2, x2, b2) |
#define | N_BHX(r1, r2, d2, b2) N_RS(0xB6, r1, r3, d2, b2) |
#define | N_BXLE(r1, r3, d2, b2) N_RS(0xB7, r1, r3, d2, b2) |
#define | N_BRAS(r1, i2) N_RI(0xA7, 0x5, r1, (i2) / 2) |
#define | SZ_BRAS SZ_RI |
#define | N_BRC(m1, i2) N_RI(0xA7, 0x4, m1, (i2) / 2) |
#define | N_J(i2) N_BRC(DD_ANY, i2) |
#define | SZ_BRC SZ_RI |
#define | SZ_J SZ_RI |
#define | N_BRC_BACK_PATCH(brc_pos) |
#define | N_BRCT(r1, i2) N_RI(0xA7, 0x6, r1, (i2) / 2) |
#define | N_BRXH(r1, r3, i2) N_RSI(0x84, r1, r3, (i2) / 2) |
#define | N_BRXLE(r1, r3, i2) N_RSI(0x85, r1, r2, (i2) / 2) |
#define | N_CKSM(r1, r2) N_RRE(0xB241, r1, r2) |
#define | N_CR(r1, r2) N_RR(0x19, r1, r2) |
#define | SZ_CR SZ_RR |
#define | N_C(r1, d2, x2, b2) N_RX(0x59, r1, d2, x2, b2) |
#define | N_CFC(d2, b2) N_S2(0xB21A, d2, b2) |
#define | N_CS(r1, r3, d2, b2) N_RS(0xBA, r1, r3, d2, b2) |
#define | N_CDS(r1, r3, d2, b2) N_RS(0xBB, r1, r3, d2, b2) |
#define | N_CH(r1, d2, x2, b2) N_CH(0x49, r1, d2, x2, b2) |
#define | N_CHI(r1, i2) N_RI(0xA7, 0xE, r1, i2) |
#define | N_CLR(r1, r2) N_RR(0x15, r1, r2) |
#define | N_CL(r1, d2, x2, b2) N_RX(0x55, r1, d2, x2, b2) |
#define | OPC_CL 0x55 |
#define | N_CLI(d1, b1, i2) N_SI(0x95, d1, b1, i2) |
#define | N_CLC(d1, l, b1, d2, b2) N_SS(0xD5, d1, (l - 1), b1, d2, b2) |
#define | N_CLM(r1, m3, d2, b2) N_RS(0xBD, r1, m3, d2, b2) |
#define | N_CLCL(r1, r2) N_RR(0x0F, r1, r2) |
#define | N_CLCLE(r1, r3, d2, b2) N_RS(0xA9, r1, r3, d2, b2) |
#define | N_CLST(r1, r2) N_RRE(0xB25D, r1, r2) |
#define | N_CUSE(r1, r2) N_RRE(0xB257, r1, r2) |
#define | N_CVB(r1, d2, x2, b2) N_RX(0x4F, r1, r2, x2, b2) |
#define | N_CVD(r1, d2, x2, b2) N_RX(0x4E, r1, d2, x2, b2) |
#define | N_CUUTF(r1, r2) N_RRE(0xB2A6, r1, r2) |
#define | N_CUTFU(r1, r2) N_RRE(0xB2A7, r1, r2) |
#define | N_CPYA(r1, r2) N_RRE(0xB240, r1, r2) |
#define | N_DR(r1, r2) N_RR(0x1D, r1, r2) |
#define | OPC_DR 0x1D |
#define | N_D(r1, d2, x2, b2) N_RX(0x5D, r1, d2, x2, b2) |
#define | N_XR(r1, r2) N_RR(0x17, r1, r2) |
#define | N_X(r1, d2, x2, b2) N_RX(0x57, r1, d2, x2, b2) |
#define | N_XI(d1, b1, i2) N_SI(0x97, d1, b1, i2) |
#define | N_XC(d1, l, b1, d2, b2) N_SS(0xD7, d1, (l - 1), b1, d2, b2) |
#define | N_EX(r1, d2, x2, b2) N_RX(0x44, r1, d2, x2, b2) |
#define | N_EAR(r1, r2) N_RRE(0xB24F, r1, r2) |
#define | N_IC(r1, d2, x2, b2) N_RX(0x43, r1, d2, x2, b2) |
#define | N_ICM(r1, m3, d2, b2) N_RS(0xBF, r1, m3, d2, b2) |
#define | N_IPM(r1) N_RRE(0xB222, r1, 0) |
#define | N_LR(r1, r2) N_RR(0x18, r1, r2) |
#define | N_L(r1, d2, x2, b2) N_RX(0x58, r1, d2, x2, b2) |
#define | SZ_L SZ_RX |
#define | OPC_L 0x58 |
#define | N_LAM(r1, r3, d2, b2) N_RS(0x9A, r1, r3, d2, b2) |
#define | N_LA(r1, d2, x2, b2) N_RX(0x41, r1, d2, x2, b2) |
#define | N_LAE(r1, d2, x2, b2) N_RX(0x51, r1, d2, x2, b2) |
#define | N_LTR(r1, r2) N_RR(0x12, r1, r2) |
#define | N_LCR(r1, r2) N_RR(0x13, r1, r2) |
#define | SZ_LCR SZ_RR |
#define | N_LH(r1, d2, x2, b2) N_RX(0x48, r1, d2, x2, b2) |
#define | N_LHI(r1, i2) N_RI(0xA7, 0x8, r1, i2) |
#define | SZ_LHI SZ_RI |
#define | N_LM(r1, r3, d2, b2) N_RS(0x98, r1, r3, d2, b2) |
#define | N_LNR(r1, r2) N_RR(0x11, r1, r2) |
#define | N_LPR(r1, r2) N_RR(0x10, r1, r2) |
#define | N_MC(d1, b1, i2) N_SI(0xAF, d1, b1, i2) |
#define | N_MVI(d1, b1, i2) N_SI(0x92, d1, b1, i2) |
#define | N_MVC(d1, l, b1, d2, b2) N_SS(0xD2, d1, (l - 1), b1, d2, b2) |
#define | N_MVCIN(d1, l, b1, d2, b2) N_SS(0xEB, d1, (l - 1), b1, d2, b2) |
#define | N_MVCL(r1, r2) N_RR(0x0E, r1, r2) |
#define | N_MVCLE(r1, r3, d2, b2) N_RS(0xAB, r1, r3, d2, b2) |
#define | N_MVN(d1, l, b1, d2, b2) N_SS(0xD1, d1, (l - 1), b1, d2, b2) |
#define | N_MVPG(r1, r2) N_RRE(0xB254, r1, r2) |
#define | N_MVST(r1, r2) N_RRE(0xB255, r1, r2) |
#define | N_MVO(d1, l1, b1, d2, l2, b2) N_SS2(0xF1, d1, (l1 - 1), b1, d2, (l2 - 1), b2) |
#define | N_MVZ(d1, l, b1, d2, b2) N_SS(0xD3, d1, (l - 1), b1, d2, b2) |
#define | N_MR(r1, r2) N_RR(0x1C, r1, r2) |
#define | N_M(r1, d2, x2, b2) N_RX(0x5C, r1, d2, x2, b2) |
#define | N_MH(r1, d2, x2, b2) N_RX(0x4C, r1, d2, x2, b2) |
#define | N_MHI(r1, i2) N_RI(0xA7, 0xC, r1, i2) |
#define | N_MSR(r1, r2) N_RRE(0xB252, r1, r2) |
#define | N_MS(r1, d2, x2, b2) N_RX(0x71, r1, d2, x2, b2) |
#define | N_OR(r1, r2) N_RR(0x16, r1, r2) |
#define | N_O(r1, d2, x2, b2) N_RX(0x56, r1, d2, x2, b2) |
#define | N_OI(d1, b1, i2) N_SI(0x96, d1, b1, i2) |
#define | N_OC(d1, l, b1, d2, b2) N_SS(0xD6, d1, (l - 1), b1, d2, b2) |
#define | N_PACK(d1, l1, b1, d2, l2, b2) N_SS2(0xF2, d1, (l1 - 1), b1, d2, (l2 - 1), b2) |
#define | N_PLO(r1, d2, b2, r3, d4, b4) N_SS2(0xEE, d2, r1, b2, d4, r3, b4) |
#define | N_SRST(r1, r2) N_RRE(0xB25E, r1, r2) |
#define | N_SAR(r1, r2) N_RRE(0xB24E, r1, r2) |
#define | N_SPM(r1) N_RR(0x04, r1, 0x00) |
#define | N_SLDA(r1, d2, b2) N_RS(0x8F, r1, 0x00, d2, b2) |
#define | N_SLDL(r1, d2, b2) N_RS(0x8D, r1, 0x00, d2, b2) |
#define | N_SLA(r1, d2, b2) N_RS(0x8B, r1, 0x00, d2, b2) |
#define | N_SLL(r1, d2, b2) N_RS(0x89, r1, 0x00, d2, b2) |
#define | N_SRDA(r1, d2, b2) N_RS(0x8E, r1, 0x00, d2, b2) |
#define | N_SRDL(r1, d2, b2) N_RS(0x8C, r1, 0x00, d2, b2) |
#define | N_SRA(r1, d2, b2) N_RS(0x8A, r1, 0x00, d2, b2) |
#define | N_SRL(r1, d2, b2) N_RS(0x88, r1, 0x00, d2, b2) |
#define | N_ST(r1, d2, x2, b2) N_RX(0x50, r1, d2, x2, b2) |
#define | OPC_ST 0x50 |
#define | N_STAM(r1, r3, d2, b2) N_RS(0x9B, r1, r3, d2, b2) |
#define | N_STC(r1, d2, x2, b2) N_RX(0x42, r1, d2, x2, b2) |
#define | N_STCM(r1, m3, d2, b2) N_RS(0xBE, r1, m3, d2, b2) |
#define | N_STCK(d2, b2) N_S2(0xB205, d2, b2) |
#define | N_STCKE(d2, b2) N_S2(0xB278, d2, b2) |
#define | N_STH(r1, d2, x2, b2) N_RX(0x40, r1, d2, x2, b2) |
#define | N_STM(r1, r3, d2, b2) N_RS(0x90, r1, r3, d2, b2) |
#define | N_SR(r1, r2) N_RR(0x1B, r1, r2) |
#define | N_S(r1, d2, x2, b2) N_RX(0x5B, r1, d2, x2, b2) |
#define | N_SH(r1, d2, x2, b2) N_RX(0x4B, r1, d2, x2, b2) |
#define | N_SLR(r1, r2) N_RR(0x1F, r1, r2) |
#define | N_SL(r1, d2, x2, b2) N_RX(0x5F, r1, d2, x2, b2) |
#define | N_SVC(i) N_RR2(0x0A, i) |
#define | N_TS(d2, b2) N_S2(0x93, d2, b2) |
#define | N_TM(d1, b1, i2) N_SI(0x91, d1, b1, i2) |
#define | N_TMH(r1, i2) N_RI2(0xA7, 0x00, r1, i2) |
#define | N_TML(r1, i2) N_RI2(0xA7, 0x01, r1, i2) |
#define | N_TR(d1, l, b1, d2, b2) N_SS(0xDC, d1, (l - 1), b1, d2, b2) |
#define | N_TRT(d1, l, b1, d2, b2) N_SS(0xDD, d1, (l - 1), b1, d2, b2) |
#define | N_TRE(r1, r2) N_RRE(0xB2A5, r1, r2) |
#define | N_UNPK(d1, l1, b1, d2, l2, b2) N_SS2(0xF3, d1, (l1 - 1), b1, d2, (l2 - 2), b2) |
#define | N_UPT() N_E(0x0102) |
#define | N_LER(r1, r2) N_RR(0x38, r1, r2) |
#define | N_LDR(r1, r2) N_RR(0x28, r1, r2) |
#define | N_LXR(r1, r2) N_RRE(0xB365, r1, r2) |
#define | N_LE(r1, d2, x2, b2) N_RX(0x78, r1, d2, x2, b2) |
#define | N_LD(r1, d2, x2, b2) N_RX(0x68, r1, d2, x2, b2) |
#define | N_LZER(r1) N_RRE(0xB374, r1, 0x0) |
#define | N_LZDR(r1) N_RRE(0xB375, r1, 0x0) |
#define | N_LZXR(r1) N_RRE(0xB376, r1, 0x0) |
#define | N_STE(r1, d2, x2, b2) N_RX(0x70, r1, d2, x2, b2) |
#define | N_STD(r1, d2, x2, b2) N_RX(0x60, r1, d2, x2, b2) |
#define | N_AEBR(r1, r2) N_RRE(0xB30A, r1, r2) |
#define | N_ADBR(r1, r2) N_RRE(0xB31A, r1, r2) |
#define | N_AXBR(r1, r2) N_RRE(0xB34A, r1, r2) |
#define | N_AEB(r1, d2, x2, b2) N_RXE(0xED0A, r1, d2, x2, b2) |
#define | N_ADB(r1, d2, x2, b2) N_RXE(0xED1A, r1, d2, x2, b2) |
#define | N_CEBR(r1, r2) N_RRE(0xB309, r1, r2) |
#define | N_CDBR(r1, r2) N_RRE(0xB319, r1, r2) |
#define | N_CXBR(r1, r2) N_RRE(0xB349, r1, r2) |
#define | N_CEB(r1, d2, x2, b2) N_RXE(0xED09, r1, d2, x2, b2) |
#define | N_CDB(r1, d2, x2, b2) N_RXE(0xED19, r1, d2, x2, b2) |
#define | N_CEFBR(r1, r2) N_RRE(0xB394, r1, r2) |
#define | N_CDFBR(r1, r2) N_RRE(0xB395, r1, r2) |
#define | N_CXFBR(r1, r2) N_RRE(0xB396, r1, r2) |
#define | N_CFEBR(r1, m3, r2) N_RRF(0xB398, r1, m3, r2) |
#define | N_CFDBR(r1, m3, r2) N_RRF(0xB399, r1, m3, r2) |
#define | N_CFXBR(r1, m3, r2) N_RRF(0xB39A, r1, m3, r2) |
#define | N_DEBR(r1, r2) N_RRE(0xB30D, r1, r2) |
#define | N_DDBR(r1, r2) N_RRE(0xB31D, r1, r2) |
#define | N_DXBR(r1, r2) N_RRE(0xB34D, r1, r2) |
#define | N_DEB(r1, d2, x2, b2) N_RXE(0xED0D, r1, d2, x2, b2) |
#define | N_DDB(r1, d2, x2, b2) N_RXE(0xED1D, r1, d2, x2, b2) |
#define | N_LCEBR(r1, r2) N_RRE(0xB303, r1, r2) |
#define | N_LCDBR(r1, r2) N_RRE(0xB313, r1, r2) |
#define | N_LCXBR(r1, r2) N_RRE(0xB343, r1, r2) |
#define | N_LDEBR(r1, r2) N_RRE(0xB304, r1, r2) |
#define | SZ_LDEBR SZ_RRE |
#define | N_LXDBR(r1, r2) N_RRE(0xB305, r1, r2) |
#define | N_LXEBR(r1, r2) N_RRE(0xB306, r1, r2) |
#define | N_LEDBR(r1, r2) N_RRE(0xB344, r1, r2) |
#define | N_LDXBR(r1, r2) N_RRE(0xB345, r1, r2) |
#define | N_LEXBR(r1, r2) N_RRE(0xB346, r1, r2) |
#define | N_LTEBR(r1, r2) N_RRE(0xB302, r1, r2) |
#define | N_LTDBR(r1, r2) N_RRE(0xB312, r1, r2) |
#define | N_LTXBR(r1, r2) N_RRE(0xB342, r1, r2) |
#define | N_MEEBR(r1, r2) N_RRE(0xB317, r1, r2) |
#define | N_MDBR(r1, r2) N_RRE(0xB31C, r1, r2) |
#define | N_MXBR(r1, r2) N_RRE(0xB34C, r1, r2) |
#define | N_MDEBR(r1, r2) N_RRE(0xB30C, r1, r2) |
#define | N_MXDBR(r1, r2) N_RRE(0xB307, r1, r2) |
#define | N_SEBR(r1, r2) N_RRE(0xB30B, r1, r2) |
#define | N_SDBR(r1, r2) N_RRE(0xB31B, r1, r2) |
#define | N_SXBR(r1, r2) N_RRE(0xB34B, r1, r2) |
#define | N_SEB(r1, d2, x2, b2) N_RXE(0xED0B, r1, d2, x2, b2) |
#define | N_SDB(r1, d2, x2, b2) N_RXE(0xED1B, r1, d2, x2, b2) |
#define | M_CALL(r2) N_BASR(R14, r2) |
#define | M_ILL(data) N_ILL(data) |
#define | M_ILL2(data1, data2) N_ILL((_UBITS(data1, 4) << 4) | _UBITS(data2, 4)) |
#define | M_LONG(l) N_LONG(l) |
#define | M_ILD(r, b, d) |
#define | M_ILD_DSEG(r, d) M_ILD(r, REG_PV, N_DSEG_DISP(d)) |
#define | M_ALD(r, b, d) M_ILD(r, b, d) |
#define | M_ALD_DSEG(r, d) M_ALD(r, REG_PV, N_DSEG_DISP(d)) |
#define | M_LDA(r, b, d) |
#define | M_LDA_DSEG(r, d) M_LDA(r, REG_PV, N_DSEG_DISP(d)) |
#define | M_FLD(r, b, d) N_LE(r, d, RN, b) |
#define | M_FLDN(r, b, d, t) |
#define | M_FLD_DSEG(r, d, t) M_FLDN(r, REG_PV, N_DSEG_DISP(d), t) |
#define | M_DLD(r, b, d) N_LD(r, d, RN, b) |
#define | M_DLDN(r, b, d, t) |
#define | M_DLD_DSEG(r, d, t) M_DLDN(r, REG_PV, N_DSEG_DISP(d), t) |
#define | M_LLD(r, b, d) |
#define | M_LLD_DSEG(r, d) M_LLD(r, REG_PV, N_DSEG_DISP(d) |
#define | M_MOV(a, b) N_LR(b, a) |
#define | M_FMOV(a, b) N_LDR(b, a) |
#define | M_DMOV(a, b) M_FMOV((a), (b)) |
#define | M_DST(r, b, d) _IFNEG(d, assert(0), N_STD(r, d, RN, b)) |
#define | M_FST(r, b, d) _IFNEG(d, assert(0), N_STE(r, d, RN, b)) |
#define | M_IST(r, b, d) |
#define | M_AST(r, b, d) M_IST(r, b, d) |
#define | M_LST(r, b, d) |
#define | M_TEST(r) N_LTR(r, r) |
#define | M_BEQ(off) N_BRC(DD_E, off) |
#define | M_BNE(off) N_BRC(DD_NE, off) |
#define | M_BLE(off) N_BRC(DD_LE, off) |
#define | M_BGT(off) N_BRC(DD_H, off) |
#define | M_BLT(off) N_BRC(DD_L, off) |
#define | M_BGE(off) N_BRC(DD_HE, off) |
#define | M_BO(off) N_BRC(DD_O, off) |
#define | M_CMP(r1, r2) N_CR(r1, r2) |
#define | M_CMPU(r1, r2) N_CLR(r1, r2) |
#define | M_CLR(r) N_LHI(r, 0) |
#define | M_AADD_IMM(val, reg) N_AHI(reg, val) |
#define | M_IADD_IMM(val, reg) N_AHI(reg, val) |
#define | M_ISUB_IMM(val, reg) N_AHI(reg, -(val)) |
#define | M_ASUB_IMM(val, reg) N_AHI(reg, -(val)) |
#define | M_RET N_BCR(DD_ANY, R14) |
#define | M_BSR(ret_reg, disp) N_BRAS(ret_reg, disp) |
#define | M_BR(disp) N_BRC(DD_ANY, disp) |
#define | M_JMP(rs, rd) _IF(rs == RN, N_BCR(DD_ANY, rd), N_BASR(rs, rd)) |
#define | M_NOP N_BC(0, 0, RN, RN) |
#define | M_NOP2 N_BCR(0, RN) |
#define | M_NOP3 N_BCR(0, 1) |
#define | M_JSR(reg_ret, reg_addr) N_BASR(reg_ret, reg_addr) |
#define | M_ICMP(a, b) N_CR(a, b) |
#define | M_ICMPU(a, b) N_CLR(a, b) |
#define | M_ICMP_IMM(a, b) N_CHI(a, b) |
#define | M_ACMP(a, b) N_CR(a, b) |
#define | M_CVTIF(src, dst) N_CEFBR(dst, src) |
#define | M_CVTID(src, dst) N_CDFBR(dst, src) |
#define | M_FMUL(a, dest) N_MEEBR(dest, a) |
#define | M_FSUB(a, dest) N_SEBR(dest, a) |
#define | M_FADD(a, dest) N_AEBR(dest, a) |
#define | M_FDIV(a, dest) N_DEBR(dest, a) |
#define | M_DMUL(a, dest) N_MDBR(dest, a) |
#define | M_DSUB(a, dest) N_SDBR(dest, a) |
#define | M_DADD(a, dest) N_ADBR(dest, a) |
#define | M_DDIV(a, dest) N_DDBR(dest, a) |
#define | M_CVTFI(src, dst) N_CFEBR(dst, 5, src) |
#define | M_CVTDI(src, dst) N_CFDBR(dst, 5, src) |
#define | M_IADD(a, dest) N_AR(dest, a) |
#define | M_AADD(a, dest) N_AR(dest, a) |
#define | M_ISUB(a, dest) N_SR(dest, a) |
#define | M_ASUB(a, dest) N_SR(dest, a) |
#define | M_IAND(a, dest) N_NR(dest, a) |
#define | M_IOR(a, dest) N_OR(dest, a) |
#define | M_IXOR(a, dest) N_XR(dest, a) |
#define | M_CVTFD(src, dst) N_LDEBR(dst, src) |
#define | M_CVTDF(src, dst) N_LEDBR(dst, src) |
#define | M_SLL_IMM(imm, reg) N_SLL(reg, imm, RN) |
#define | M_SLA_IMM(imm, reg) N_SLA(reg, imm, RN) |
#define | M_SLDL_IMM(imm, reg) N_SLDL(reg, imm, RN) |
#define | M_SLDA_IMM(imm, reg) N_SLDA(reg, imm, RN) |
#define | M_SRL_IMM(imm, reg) N_SRL(reg, imm, RN) |
#define | M_SRA_IMM(imm, reg) N_SRA(reg, imm, RN) |
#define | M_SRDL_IMM(imm, reg) N_SRDL(reg, imm, RN) |
#define | M_SRDA_IMM(imm, reg) N_SRDA(reg, imm, RN) |
#define | M_SLL(op, dst) N_SLL(dst, 0, op) |
#define | M_SLA(op, dst) N_SLA(dst, 0, op) |
#define | M_SLDL(op, dst) N_SLDL(dst, 0, op) |
#define | M_SLDA(op, dst) N_SLDA(dst, 0, op) |
#define | M_SRL(op, dst) N_SRL(dst, 0, op) |
#define | M_SRA(op, dst) N_SRA(dst, 0, op) |
#define | M_SRDL(op, dst) N_SRDL(dst, 0, op) |
#define | M_SRDA(op, dst) N_SRDA(dst, 0, op) |
#define | M_IMUL_IMM(val, reg) N_MHI(reg, val) |
#define | M_IMUL(a, dest) N_MSR(dest, a) |
#define | M_INEG(a, dest) N_LCR(dest, a) |
#define | M_FCMP(a, b) N_CEBR(a, b) |
#define | M_DCMP(a, b) N_CDBR(a, b) |
#define | M_FMOVN(r, dst) N_LCEBR(dst, r) |
#define | M_DMOVN(r, dst) N_LCDBR(dst, r) |
#define | ICONST(reg, i) |
#define | LCONST(reg, c) |
#define | M_ISUB_IMM32(imm, tmpreg, reg) |
#define | M_ASUB_IMM32(imm, tmpreg, reg) M_ISUB_IMM32(imm, tmpreg, reg) |
Functions | |
static int | _OR_IMPL (const char *file, int line, int r) |
static int | _UBITS_IMPL (const char *file, int line, int i, int bits) |
static int | _SBITS_IMPL (const char *file, int line, int i, int bits) |
static int | _BITS_IMPL (const char *file, int line, int i, int bits) |
static uint8_t | N_RR_GET_OPC (uint8_t *instrp) |
static uint8_t | N_RR_GET_REG1 (uint8_t *instrp) |
static uint8_t | N_RR_GET_REG2 (uint8_t *instrp) |
static uint8_t | N_RX_GET_OPC (uint8_t *instrp) |
static uint8_t | N_RX_GET_REG (uint8_t *instrp) |
static uint8_t | N_RX_GET_INDEX (uint8_t *instrp) |
static uint8_t | N_RX_GET_BASE (uint8_t *instrp) |
static uint16_t | N_RX_GET_DISP (uint8_t *instrp) |
static void | N_RX_SET_DISP (uint8_t *instrp, uint16_t disp) |
static int16_t | N_RI_GET_IMM (uint8_t *instrp) |
static void | N_RI_SET_IMM (uint8_t *instrp, int16_t imm) |
static uint8_t | N_ILL_GET_REG (uint8_t *instrp) |
static uint8_t | N_ILL_GET_TYPE (uint8_t *instrp) |
#define _BITS | ( | i, | |
bits | |||
) | _BITS_IMPL(__FILE__, __LINE__, i, bits) |
Definition at line 156 of file codegen.hpp.
#define _CODE | ( | t, | |
code | |||
) |
Definition at line 195 of file codegen.hpp.
Definition at line 201 of file codegen.hpp.
Definition at line 202 of file codegen.hpp.
#define _D | ( | x | ) | _UBITS((x), 12) |
Definition at line 169 of file codegen.hpp.
#define _I12 | ( | x | ) | _BITS((x), 12) |
Definition at line 179 of file codegen.hpp.
#define _I16 | ( | x | ) | _BITS((x), 16) |
Definition at line 183 of file codegen.hpp.
#define _I4 | ( | x | ) | _BITS((x), 4) |
Definition at line 171 of file codegen.hpp.
#define _I8 | ( | x | ) | _BITS((x), 8) |
Definition at line 175 of file codegen.hpp.
#define _IF | ( | cond, | |
t, | |||
f | |||
) | do { if (cond) { t ; } else { f ; } } while (0) |
Definition at line 204 of file codegen.hpp.
Definition at line 207 of file codegen.hpp.
#define _OP | ( | x | ) | _UBITS((x), 8) |
Definition at line 187 of file codegen.hpp.
#define _OP16 | ( | x | ) | _UBITS((x), 16) |
Definition at line 191 of file codegen.hpp.
#define _OP4 | ( | x | ) | _UBITS((x), 4) |
Definition at line 189 of file codegen.hpp.
#define _OR | ( | r | ) | _OR_IMPL(__FILE__, __LINE__, r) |
Definition at line 118 of file codegen.hpp.
#define _R | ( | x | ) | _UBITS((x), 4) |
Definition at line 167 of file codegen.hpp.
#define _SBITS | ( | i, | |
bits | |||
) | _SBITS_IMPL(__FILE__, __LINE__, i, bits) |
Definition at line 143 of file codegen.hpp.
#define _SI12 | ( | x | ) | _SBITS((x), 12) |
Definition at line 181 of file codegen.hpp.
#define _SI16 | ( | x | ) | _SBITS((x), 16) |
Definition at line 185 of file codegen.hpp.
#define _SI4 | ( | x | ) | _SBITS((x), 4) |
Definition at line 173 of file codegen.hpp.
#define _SI8 | ( | x | ) | _SBITS((x), 8) |
Definition at line 177 of file codegen.hpp.
#define _SMAX | ( | b | ) | ((1 << (b - 1)) - 1) |
Definition at line 121 of file codegen.hpp.
#define _SMIN | ( | b | ) | (-(1 << (bits - 1))) |
Definition at line 120 of file codegen.hpp.
#define _UBITS | ( | i, | |
bits | |||
) | _UBITS_IMPL(__FILE__, __LINE__, i, bits) |
Definition at line 133 of file codegen.hpp.
#define _UI12 | ( | x | ) | _UBITS((x), 12) |
Definition at line 180 of file codegen.hpp.
#define _UI16 | ( | x | ) | _UBITS((x), 16) |
Definition at line 184 of file codegen.hpp.
#define _UI4 | ( | x | ) | _UBITS((x), 4) |
Definition at line 172 of file codegen.hpp.
#define _UI8 | ( | x | ) | _UBITS((x), 8) |
Definition at line 176 of file codegen.hpp.
#define _UMAX | ( | b | ) | ((1 << b) - 1) |
Definition at line 123 of file codegen.hpp.
#define _UMIN | ( | b | ) | 0 |
Definition at line 122 of file codegen.hpp.
#define ALIGNCODENOP |
Definition at line 46 of file codegen.hpp.
#define ASSERT_VALID_BRANCH | ( | x | ) | assert(N_VALID_BRANCH(x)) |
Definition at line 346 of file codegen.hpp.
#define ASSERT_VALID_DISP | ( | x | ) | assert(N_VALID_DISP(x)) |
Definition at line 337 of file codegen.hpp.
#define ASSERT_VALID_IMM | ( | x | ) | assert(N_VALID_IMM(x)) |
Definition at line 332 of file codegen.hpp.
#define BRANCH_NOPS |
Definition at line 63 of file codegen.hpp.
#define DD_0 8 |
Definition at line 369 of file codegen.hpp.
#define DD_1 4 |
Definition at line 370 of file codegen.hpp.
#define DD_2 2 |
Definition at line 371 of file codegen.hpp.
#define DD_3 1 |
Definition at line 372 of file codegen.hpp.
#define DD_ANY 15 |
Definition at line 367 of file codegen.hpp.
#define DD_E 8 |
Definition at line 360 of file codegen.hpp.
#define DD_H 2 |
Definition at line 354 of file codegen.hpp.
#define DD_HE 10 |
Definition at line 362 of file codegen.hpp.
#define DD_L 4 |
Definition at line 356 of file codegen.hpp.
#define DD_LE 12 |
Definition at line 364 of file codegen.hpp.
#define DD_LH 6 |
Definition at line 358 of file codegen.hpp.
#define DD_NE 7 |
Definition at line 359 of file codegen.hpp.
#define DD_NH 13 |
Definition at line 365 of file codegen.hpp.
#define DD_NHE 5 |
Definition at line 357 of file codegen.hpp.
#define DD_NL 11 |
Definition at line 363 of file codegen.hpp.
#define DD_NLE 3 |
Definition at line 355 of file codegen.hpp.
#define DD_NLH 9 |
Definition at line 361 of file codegen.hpp.
#define DD_NO 14 |
Definition at line 366 of file codegen.hpp.
#define DD_O 1 |
Definition at line 353 of file codegen.hpp.
#define ICONST | ( | reg, | |
i | |||
) |
Definition at line 802 of file codegen.hpp.
#define LCONST | ( | reg, | |
c | |||
) |
Definition at line 812 of file codegen.hpp.
#define M_AADD | ( | a, | |
dest | |||
) | N_AR(dest, a) |
Definition at line 758 of file codegen.hpp.
#define M_AADD_IMM | ( | val, | |
reg | |||
) | N_AHI(reg, val) |
Definition at line 729 of file codegen.hpp.
#define M_ACMP | ( | a, | |
b | |||
) | N_CR(a, b) |
Definition at line 744 of file codegen.hpp.
#define M_ALD | ( | r, | |
b, | |||
d | |||
) | M_ILD(r, b, d) |
Definition at line 655 of file codegen.hpp.
#define M_ALD_DSEG | ( | r, | |
d | |||
) | M_ALD(r, REG_PV, N_DSEG_DISP(d)) |
Definition at line 656 of file codegen.hpp.
#define M_AST | ( | r, | |
b, | |||
d | |||
) | M_IST(r, b, d) |
Definition at line 711 of file codegen.hpp.
#define M_ASUB | ( | a, | |
dest | |||
) | N_SR(dest, a) |
Definition at line 760 of file codegen.hpp.
#define M_ASUB_IMM | ( | val, | |
reg | |||
) | N_AHI(reg, -(val)) |
Definition at line 732 of file codegen.hpp.
#define M_ASUB_IMM32 | ( | imm, | |
tmpreg, | |||
reg | |||
) | M_ISUB_IMM32(imm, tmpreg, reg) |
Definition at line 828 of file codegen.hpp.
Definition at line 718 of file codegen.hpp.
Definition at line 723 of file codegen.hpp.
Definition at line 721 of file codegen.hpp.
Definition at line 720 of file codegen.hpp.
Definition at line 722 of file codegen.hpp.
Definition at line 719 of file codegen.hpp.
Definition at line 724 of file codegen.hpp.
Definition at line 735 of file codegen.hpp.
#define M_BSR | ( | ret_reg, | |
disp | |||
) | N_BRAS(ret_reg, disp) |
Definition at line 734 of file codegen.hpp.
#define M_CLR | ( | r | ) | N_LHI(r, 0) |
Definition at line 728 of file codegen.hpp.
#define M_CVTDF | ( | src, | |
dst | |||
) | N_LEDBR(dst, src) |
Definition at line 765 of file codegen.hpp.
#define M_CVTDI | ( | src, | |
dst | |||
) | N_CFDBR(dst, 5, src) |
Definition at line 756 of file codegen.hpp.
#define M_CVTFD | ( | src, | |
dst | |||
) | N_LDEBR(dst, src) |
Definition at line 764 of file codegen.hpp.
#define M_CVTFI | ( | src, | |
dst | |||
) | N_CFEBR(dst, 5, src) |
Definition at line 755 of file codegen.hpp.
#define M_CVTID | ( | src, | |
dst | |||
) | N_CDFBR(dst, src) |
Definition at line 746 of file codegen.hpp.
#define M_CVTIF | ( | src, | |
dst | |||
) | N_CEFBR(dst, src) |
Definition at line 745 of file codegen.hpp.
#define M_DADD | ( | a, | |
dest | |||
) | N_ADBR(dest, a) |
Definition at line 753 of file codegen.hpp.
#define M_DCMP | ( | a, | |
b | |||
) | N_CDBR(a, b) |
Definition at line 797 of file codegen.hpp.
#define M_DDIV | ( | a, | |
dest | |||
) | N_DDBR(dest, a) |
Definition at line 754 of file codegen.hpp.
Definition at line 682 of file codegen.hpp.
#define M_DLD_DSEG | ( | r, | |
d, | |||
t | |||
) | M_DLDN(r, REG_PV, N_DSEG_DISP(d), t) |
Definition at line 688 of file codegen.hpp.
#define M_DLDN | ( | r, | |
b, | |||
d, | |||
t | |||
) |
Definition at line 683 of file codegen.hpp.
#define M_DMOV | ( | a, | |
b | |||
) | M_FMOV((a), (b)) |
Definition at line 703 of file codegen.hpp.
#define M_DMOVN | ( | r, | |
dst | |||
) | N_LCDBR(dst, r) |
Definition at line 800 of file codegen.hpp.
#define M_DMUL | ( | a, | |
dest | |||
) | N_MDBR(dest, a) |
Definition at line 751 of file codegen.hpp.
Definition at line 704 of file codegen.hpp.
#define M_DSUB | ( | a, | |
dest | |||
) | N_SDBR(dest, a) |
Definition at line 752 of file codegen.hpp.
#define M_FADD | ( | a, | |
dest | |||
) | N_AEBR(dest, a) |
Definition at line 749 of file codegen.hpp.
#define M_FCMP | ( | a, | |
b | |||
) | N_CEBR(a, b) |
Definition at line 796 of file codegen.hpp.
#define M_FDIV | ( | a, | |
dest | |||
) | N_DEBR(dest, a) |
Definition at line 750 of file codegen.hpp.
Definition at line 674 of file codegen.hpp.
#define M_FLD_DSEG | ( | r, | |
d, | |||
t | |||
) | M_FLDN(r, REG_PV, N_DSEG_DISP(d), t) |
Definition at line 680 of file codegen.hpp.
#define M_FLDN | ( | r, | |
b, | |||
d, | |||
t | |||
) |
Definition at line 675 of file codegen.hpp.
#define M_FMOV | ( | a, | |
b | |||
) | N_LDR(b, a) |
Definition at line 702 of file codegen.hpp.
#define M_FMOVN | ( | r, | |
dst | |||
) | N_LCEBR(dst, r) |
Definition at line 799 of file codegen.hpp.
#define M_FMUL | ( | a, | |
dest | |||
) | N_MEEBR(dest, a) |
Definition at line 747 of file codegen.hpp.
Definition at line 705 of file codegen.hpp.
#define M_FSUB | ( | a, | |
dest | |||
) | N_SEBR(dest, a) |
Definition at line 748 of file codegen.hpp.
#define M_IADD | ( | a, | |
dest | |||
) | N_AR(dest, a) |
Definition at line 757 of file codegen.hpp.
#define M_IADD_IMM | ( | val, | |
reg | |||
) | N_AHI(reg, val) |
Definition at line 730 of file codegen.hpp.
#define M_IAND | ( | a, | |
dest | |||
) | N_NR(dest, a) |
Definition at line 761 of file codegen.hpp.
#define M_ICMP | ( | a, | |
b | |||
) | N_CR(a, b) |
Definition at line 741 of file codegen.hpp.
#define M_ICMP_IMM | ( | a, | |
b | |||
) | N_CHI(a, b) |
Definition at line 743 of file codegen.hpp.
#define M_ICMPU | ( | a, | |
b | |||
) | N_CLR(a, b) |
Definition at line 742 of file codegen.hpp.
#define M_ILD | ( | r, | |
b, | |||
d | |||
) |
Definition at line 632 of file codegen.hpp.
#define M_ILD_DSEG | ( | r, | |
d | |||
) | M_ILD(r, REG_PV, N_DSEG_DISP(d)) |
Definition at line 653 of file codegen.hpp.
#define M_ILL | ( | data | ) | N_ILL(data) |
Definition at line 628 of file codegen.hpp.
Definition at line 629 of file codegen.hpp.
#define M_IMUL | ( | a, | |
dest | |||
) | N_MSR(dest, a) |
Definition at line 792 of file codegen.hpp.
#define M_IMUL_IMM | ( | val, | |
reg | |||
) | N_MHI(reg, val) |
Definition at line 791 of file codegen.hpp.
#define M_INEG | ( | a, | |
dest | |||
) | N_LCR(dest, a) |
Definition at line 794 of file codegen.hpp.
#define M_IOR | ( | a, | |
dest | |||
) | N_OR(dest, a) |
Definition at line 762 of file codegen.hpp.
#define M_IST | ( | r, | |
b, | |||
d | |||
) |
Definition at line 706 of file codegen.hpp.
#define M_ISUB | ( | a, | |
dest | |||
) | N_SR(dest, a) |
Definition at line 759 of file codegen.hpp.
#define M_ISUB_IMM | ( | val, | |
reg | |||
) | N_AHI(reg, -(val)) |
Definition at line 731 of file codegen.hpp.
#define M_ISUB_IMM32 | ( | imm, | |
tmpreg, | |||
reg | |||
) |
Definition at line 818 of file codegen.hpp.
#define M_IXOR | ( | a, | |
dest | |||
) | N_XR(dest, a) |
Definition at line 763 of file codegen.hpp.
Definition at line 736 of file codegen.hpp.
#define M_JSR | ( | reg_ret, | |
reg_addr | |||
) | N_BASR(reg_ret, reg_addr) |
Definition at line 740 of file codegen.hpp.
#define M_LDA | ( | r, | |
b, | |||
d | |||
) |
Definition at line 658 of file codegen.hpp.
#define M_LDA_DSEG | ( | r, | |
d | |||
) | M_LDA(r, REG_PV, N_DSEG_DISP(d)) |
Definition at line 672 of file codegen.hpp.
#define M_LLD | ( | r, | |
b, | |||
d | |||
) |
Definition at line 690 of file codegen.hpp.
#define M_LLD_DSEG | ( | r, | |
d | |||
) | M_LLD(r, REG_PV, N_DSEG_DISP(d) |
Definition at line 697 of file codegen.hpp.
#define M_LONG | ( | l | ) | N_LONG(l) |
Definition at line 630 of file codegen.hpp.
#define M_LST | ( | r, | |
b, | |||
d | |||
) |
Definition at line 712 of file codegen.hpp.
#define M_MOV | ( | a, | |
b | |||
) | N_LR(b, a) |
Definition at line 701 of file codegen.hpp.
Definition at line 737 of file codegen.hpp.
Definition at line 738 of file codegen.hpp.
#define M_NOP3 N_BCR(0, 1) |
Definition at line 739 of file codegen.hpp.
Definition at line 733 of file codegen.hpp.
Definition at line 780 of file codegen.hpp.
Definition at line 768 of file codegen.hpp.
Definition at line 783 of file codegen.hpp.
Definition at line 771 of file codegen.hpp.
Definition at line 782 of file codegen.hpp.
Definition at line 770 of file codegen.hpp.
Definition at line 779 of file codegen.hpp.
Definition at line 767 of file codegen.hpp.
Definition at line 786 of file codegen.hpp.
Definition at line 774 of file codegen.hpp.
Definition at line 789 of file codegen.hpp.
Definition at line 777 of file codegen.hpp.
Definition at line 788 of file codegen.hpp.
Definition at line 776 of file codegen.hpp.
Definition at line 785 of file codegen.hpp.
Definition at line 773 of file codegen.hpp.
#define M_TEST | ( | r | ) | N_LTR(r, r) |
Definition at line 717 of file codegen.hpp.
#define MCODECHECK | ( | icnt | ) |
Definition at line 40 of file codegen.hpp.
Definition at line 404 of file codegen.hpp.
Definition at line 574 of file codegen.hpp.
Definition at line 571 of file codegen.hpp.
Definition at line 573 of file codegen.hpp.
Definition at line 570 of file codegen.hpp.
Definition at line 405 of file codegen.hpp.
Definition at line 406 of file codegen.hpp.
Definition at line 409 of file codegen.hpp.
Definition at line 408 of file codegen.hpp.
Definition at line 403 of file codegen.hpp.
Definition at line 572 of file codegen.hpp.
Definition at line 416 of file codegen.hpp.
Definition at line 415 of file codegen.hpp.
Definition at line 419 of file codegen.hpp.
Definition at line 417 of file codegen.hpp.
Definition at line 420 of file codegen.hpp.
#define N_BC | ( | m1, | |
d2, | |||
x2, | |||
b2 | |||
) | N_RX(0x47, m1, d2, x2, b2) |
Definition at line 425 of file codegen.hpp.
Definition at line 422 of file codegen.hpp.
Definition at line 428 of file codegen.hpp.
Definition at line 427 of file codegen.hpp.
Definition at line 429 of file codegen.hpp.
#define N_BRANCH_MAX (32767 * 2) |
Definition at line 344 of file codegen.hpp.
#define N_BRANCH_MIN (-32768 * 2) |
Definition at line 343 of file codegen.hpp.
Definition at line 431 of file codegen.hpp.
#define N_BRC | ( | m1, | |
i2 | |||
) | N_RI(0xA7, 0x4, m1, (i2) / 2) |
Definition at line 433 of file codegen.hpp.
#define N_BRC_BACK_PATCH | ( | brc_pos | ) |
Definition at line 437 of file codegen.hpp.
Definition at line 441 of file codegen.hpp.
Definition at line 442 of file codegen.hpp.
Definition at line 443 of file codegen.hpp.
Definition at line 421 of file codegen.hpp.
Definition at line 430 of file codegen.hpp.
Definition at line 447 of file codegen.hpp.
Definition at line 580 of file codegen.hpp.
Definition at line 577 of file codegen.hpp.
Definition at line 583 of file codegen.hpp.
Definition at line 450 of file codegen.hpp.
Definition at line 579 of file codegen.hpp.
Definition at line 576 of file codegen.hpp.
Definition at line 582 of file codegen.hpp.
#define N_CFC | ( | d2, | |
b2 | |||
) | N_S2(0xB21A, d2, b2) |
Definition at line 448 of file codegen.hpp.
Definition at line 587 of file codegen.hpp.
Definition at line 586 of file codegen.hpp.
Definition at line 588 of file codegen.hpp.
#define N_CH | ( | r1, | |
d2, | |||
x2, | |||
b2 | |||
) | N_CH(0x49, r1, d2, x2, b2) |
Definition at line 451 of file codegen.hpp.
Definition at line 452 of file codegen.hpp.
Definition at line 444 of file codegen.hpp.
Definition at line 454 of file codegen.hpp.
#define N_CLC | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD5, d1, (l - 1), b1, d2, b2) |
Definition at line 457 of file codegen.hpp.
Definition at line 459 of file codegen.hpp.
Definition at line 460 of file codegen.hpp.
#define N_CLI | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0x95, d1, b1, i2) |
Definition at line 456 of file codegen.hpp.
Definition at line 458 of file codegen.hpp.
Definition at line 453 of file codegen.hpp.
Definition at line 461 of file codegen.hpp.
Definition at line 467 of file codegen.hpp.
Definition at line 445 of file codegen.hpp.
Definition at line 449 of file codegen.hpp.
Definition at line 462 of file codegen.hpp.
Definition at line 466 of file codegen.hpp.
Definition at line 465 of file codegen.hpp.
Definition at line 463 of file codegen.hpp.
Definition at line 464 of file codegen.hpp.
Definition at line 578 of file codegen.hpp.
Definition at line 584 of file codegen.hpp.
Definition at line 470 of file codegen.hpp.
Definition at line 594 of file codegen.hpp.
Definition at line 591 of file codegen.hpp.
Definition at line 593 of file codegen.hpp.
Definition at line 590 of file codegen.hpp.
#define N_DISP_MAX 0xFFF |
Definition at line 335 of file codegen.hpp.
#define N_DISP_MIN 0 |
Definition at line 334 of file codegen.hpp.
Definition at line 468 of file codegen.hpp.
#define N_DSEG_DISP | ( | x | ) | ((x) - N_PV_OFFSET) |
Definition at line 340 of file codegen.hpp.
Definition at line 592 of file codegen.hpp.
Definition at line 476 of file codegen.hpp.
Definition at line 475 of file codegen.hpp.
Definition at line 477 of file codegen.hpp.
Definition at line 478 of file codegen.hpp.
#define N_ILL | ( | data | ) | _CODE2(0x0200 | _UBITS(data, 8)) |
Definition at line 386 of file codegen.hpp.
#define N_IMM_MAX 32767 |
Definition at line 330 of file codegen.hpp.
#define N_IMM_MIN -32768 |
Definition at line 329 of file codegen.hpp.
Definition at line 479 of file codegen.hpp.
#define N_IS_EVEN_ODD | ( | x | ) | (((GET_HIGH_REG(x) % 2) == 0) && (GET_LOW_REG(x) == (GET_HIGH_REG(x) + 1))) |
Definition at line 348 of file codegen.hpp.
Definition at line 434 of file codegen.hpp.
Definition at line 481 of file codegen.hpp.
Definition at line 485 of file codegen.hpp.
Definition at line 486 of file codegen.hpp.
Definition at line 484 of file codegen.hpp.
Definition at line 597 of file codegen.hpp.
Definition at line 596 of file codegen.hpp.
Definition at line 488 of file codegen.hpp.
Definition at line 598 of file codegen.hpp.
Definition at line 561 of file codegen.hpp.
Definition at line 600 of file codegen.hpp.
Definition at line 558 of file codegen.hpp.
Definition at line 606 of file codegen.hpp.
Definition at line 560 of file codegen.hpp.
Definition at line 605 of file codegen.hpp.
Definition at line 557 of file codegen.hpp.
Definition at line 607 of file codegen.hpp.
Definition at line 490 of file codegen.hpp.
Definition at line 491 of file codegen.hpp.
Definition at line 493 of file codegen.hpp.
Definition at line 494 of file codegen.hpp.
#define N_LONG | ( | l | ) | _CODE4(l) |
Definition at line 398 of file codegen.hpp.
Definition at line 495 of file codegen.hpp.
Definition at line 480 of file codegen.hpp.
Definition at line 610 of file codegen.hpp.
Definition at line 609 of file codegen.hpp.
Definition at line 487 of file codegen.hpp.
Definition at line 611 of file codegen.hpp.
Definition at line 602 of file codegen.hpp.
Definition at line 603 of file codegen.hpp.
Definition at line 559 of file codegen.hpp.
Definition at line 563 of file codegen.hpp.
Definition at line 562 of file codegen.hpp.
Definition at line 564 of file codegen.hpp.
Definition at line 508 of file codegen.hpp.
#define N_MC | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0xAF, d1, b1, i2) |
Definition at line 496 of file codegen.hpp.
Definition at line 614 of file codegen.hpp.
Definition at line 616 of file codegen.hpp.
Definition at line 613 of file codegen.hpp.
Definition at line 509 of file codegen.hpp.
Definition at line 510 of file codegen.hpp.
Definition at line 507 of file codegen.hpp.
Definition at line 512 of file codegen.hpp.
Definition at line 511 of file codegen.hpp.
#define N_MVC | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD2, d1, (l - 1), b1, d2, b2) |
Definition at line 498 of file codegen.hpp.
#define N_MVCIN | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xEB, d1, (l - 1), b1, d2, b2) |
Definition at line 499 of file codegen.hpp.
Definition at line 500 of file codegen.hpp.
Definition at line 501 of file codegen.hpp.
#define N_MVI | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0x92, d1, b1, i2) |
Definition at line 497 of file codegen.hpp.
#define N_MVN | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD1, d1, (l - 1), b1, d2, b2) |
Definition at line 502 of file codegen.hpp.
#define N_MVO | ( | d1, | |
l1, | |||
b1, | |||
d2, | |||
l2, | |||
b2 | |||
) | N_SS2(0xF1, d1, (l1 - 1), b1, d2, (l2 - 1), b2) |
Definition at line 505 of file codegen.hpp.
Definition at line 503 of file codegen.hpp.
Definition at line 504 of file codegen.hpp.
#define N_MVZ | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD3, d1, (l - 1), b1, d2, b2) |
Definition at line 506 of file codegen.hpp.
Definition at line 615 of file codegen.hpp.
Definition at line 617 of file codegen.hpp.
Definition at line 412 of file codegen.hpp.
#define N_NC | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD4, (l - 1), b1, d1, b2, d2) |
Definition at line 414 of file codegen.hpp.
#define N_NI | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0x94, d1, b1, i2) |
Definition at line 413 of file codegen.hpp.
Definition at line 410 of file codegen.hpp.
Definition at line 514 of file codegen.hpp.
#define N_OC | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD6, d1, (l - 1), b1, d2, b2) |
Definition at line 516 of file codegen.hpp.
#define N_OI | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0x96, d1, b1, i2) |
Definition at line 515 of file codegen.hpp.
Definition at line 513 of file codegen.hpp.
#define N_PACK | ( | d1, | |
l1, | |||
b1, | |||
d2, | |||
l2, | |||
b2 | |||
) | N_SS2(0xF2, d1, (l1 - 1), b1, d2, (l2 - 1), b2) |
Definition at line 517 of file codegen.hpp.
Definition at line 518 of file codegen.hpp.
#define N_PV_OFFSET (-0xFFC) |
Definition at line 339 of file codegen.hpp.
#define N_RI | ( | op1, | |
op2, | |||
r1, | |||
i2 | |||
) | _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_SI16(i2) ) |
Definition at line 258 of file codegen.hpp.
#define N_RI2 | ( | op1, | |
op2, | |||
r1, | |||
i2 | |||
) | _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_UI16(i2) ) |
Definition at line 269 of file codegen.hpp.
Definition at line 209 of file codegen.hpp.
Definition at line 226 of file codegen.hpp.
Definition at line 300 of file codegen.hpp.
#define N_RRF | ( | op, | |
r1, | |||
m3, | |||
r2 | |||
) | _CODE4( (_OP16(op) << 16) | (_R(m3) << 12) | (_R(r1) << 4) | _R(r2) ) |
Definition at line 324 of file codegen.hpp.
#define N_RS | ( | op, | |
r1, | |||
r3, | |||
d2, | |||
b2 | |||
) | _CODE4( (_OP(op) << 24) | (_R(r1) << 20) | (_R(r3) << 16) | (_OR(b2) << 12) | _D(d2) ) |
Definition at line 290 of file codegen.hpp.
#define N_RSI | ( | op, | |
r1, | |||
r2, | |||
i2 | |||
) | _CODE4( ((op) << 24) | (_R(r1) << 20) | (_R(r3) << 16) | (u2)_16(i2) ) |
Definition at line 295 of file codegen.hpp.
#define N_RX | ( | op, | |
r1, | |||
d2, | |||
x2, | |||
b2 | |||
) | _CODE4( (_OP(op) << 24) | (_R(r1) << 20) | (_OR(x2) << 16) | (_OR(b2) << 12) | (_D(d2) << 0) ) |
Definition at line 229 of file codegen.hpp.
Definition at line 315 of file codegen.hpp.
Definition at line 540 of file codegen.hpp.
Definition at line 305 of file codegen.hpp.
Definition at line 520 of file codegen.hpp.
Definition at line 623 of file codegen.hpp.
Definition at line 620 of file codegen.hpp.
Definition at line 622 of file codegen.hpp.
Definition at line 619 of file codegen.hpp.
Definition at line 541 of file codegen.hpp.
#define N_SI | ( | op, | |
d1, | |||
b1, | |||
i2 | |||
) | _CODE4( (_OP(op) << 24) | (_OR(i2) << 16) | (_OR(b1) << 12) | _D(d1) ) |
Definition at line 274 of file codegen.hpp.
Definition at line 543 of file codegen.hpp.
Definition at line 524 of file codegen.hpp.
Definition at line 522 of file codegen.hpp.
Definition at line 523 of file codegen.hpp.
Definition at line 525 of file codegen.hpp.
Definition at line 542 of file codegen.hpp.
Definition at line 521 of file codegen.hpp.
Definition at line 539 of file codegen.hpp.
Definition at line 528 of file codegen.hpp.
Definition at line 526 of file codegen.hpp.
Definition at line 527 of file codegen.hpp.
Definition at line 529 of file codegen.hpp.
Definition at line 519 of file codegen.hpp.
#define N_SS | ( | op, | |
d1, | |||
l, | |||
b1, | |||
d2, | |||
b2 | |||
) |
Definition at line 279 of file codegen.hpp.
Definition at line 287 of file codegen.hpp.
Definition at line 530 of file codegen.hpp.
Definition at line 532 of file codegen.hpp.
Definition at line 533 of file codegen.hpp.
#define N_STCK | ( | d2, | |
b2 | |||
) | N_S2(0xB205, d2, b2) |
Definition at line 535 of file codegen.hpp.
#define N_STCKE | ( | d2, | |
b2 | |||
) | N_S2(0xB278, d2, b2) |
Definition at line 536 of file codegen.hpp.
Definition at line 534 of file codegen.hpp.
Definition at line 566 of file codegen.hpp.
Definition at line 565 of file codegen.hpp.
Definition at line 537 of file codegen.hpp.
Definition at line 538 of file codegen.hpp.
Definition at line 544 of file codegen.hpp.
Definition at line 621 of file codegen.hpp.
#define N_TM | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0x91, d1, b1, i2) |
Definition at line 546 of file codegen.hpp.
Definition at line 547 of file codegen.hpp.
Definition at line 548 of file codegen.hpp.
#define N_TR | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xDC, d1, (l - 1), b1, d2, b2) |
Definition at line 549 of file codegen.hpp.
Definition at line 551 of file codegen.hpp.
#define N_TRT | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xDD, d1, (l - 1), b1, d2, b2) |
Definition at line 550 of file codegen.hpp.
#define N_TS | ( | d2, | |
b2 | |||
) | N_S2(0x93, d2, b2) |
Definition at line 545 of file codegen.hpp.
#define N_UNPK | ( | d1, | |
l1, | |||
b1, | |||
d2, | |||
l2, | |||
b2 | |||
) | N_SS2(0xF3, d1, (l1 - 1), b1, d2, (l2 - 2), b2) |
Definition at line 552 of file codegen.hpp.
#define N_UPT | ( | ) | N_E(0x0102) |
Definition at line 553 of file codegen.hpp.
#define N_VALID_BRANCH | ( | x | ) | ((N_BRANCH_MIN <= (x)) && ((x) <= N_BRANCH_MAX)) |
Definition at line 345 of file codegen.hpp.
#define N_VALID_DISP | ( | x | ) | ((N_DISP_MIN <= (x)) && ((x) <= N_DISP_MAX)) |
Definition at line 336 of file codegen.hpp.
#define N_VALID_DSEG_DISP | ( | x | ) | N_VALID_DISP(N_DSEG_DISP(x)) |
Definition at line 341 of file codegen.hpp.
Definition at line 331 of file codegen.hpp.
Definition at line 472 of file codegen.hpp.
#define N_XC | ( | d1, | |
l, | |||
b1, | |||
d2, | |||
b2 | |||
) | N_SS(0xD7, d1, (l - 1), b1, d2, b2) |
Definition at line 474 of file codegen.hpp.
#define N_XI | ( | d1, | |
b1, | |||
i2 | |||
) | N_SI(0x97, d1, b1, i2) |
Definition at line 473 of file codegen.hpp.
Definition at line 471 of file codegen.hpp.
#define OPC_CL 0x55 |
Definition at line 455 of file codegen.hpp.
#define OPC_DR 0x1D |
Definition at line 469 of file codegen.hpp.
#define OPC_ILL 0x02 |
Definition at line 387 of file codegen.hpp.
#define OPC_L 0x58 |
Definition at line 483 of file codegen.hpp.
#define OPC_ST 0x50 |
Definition at line 531 of file codegen.hpp.
#define PATCHER_CALL_SIZE 2 /* size in bytes of a patcher call */ |
Definition at line 58 of file codegen.hpp.
#define PATCHER_NOPS M_NOP3 |
Definition at line 59 of file codegen.hpp.
#define RN 16 |
Definition at line 106 of file codegen.hpp.
#define S_RRF 4 |
Definition at line 327 of file codegen.hpp.
#define S_RXE 6 |
Definition at line 322 of file codegen.hpp.
#define SZ_AHI SZ_RI |
Definition at line 407 of file codegen.hpp.
#define SZ_BASR SZ_RR |
Definition at line 418 of file codegen.hpp.
#define SZ_BC SZ_RS |
Definition at line 426 of file codegen.hpp.
#define SZ_BCR SZ_RR |
Definition at line 423 of file codegen.hpp.
#define SZ_BRAS SZ_RI |
Definition at line 432 of file codegen.hpp.
#define SZ_BRC SZ_RI |
Definition at line 435 of file codegen.hpp.
#define SZ_CR SZ_RR |
Definition at line 446 of file codegen.hpp.
#define SZ_E 2 |
Definition at line 313 of file codegen.hpp.
#define SZ_ILL 2 |
Definition at line 388 of file codegen.hpp.
#define SZ_J SZ_RI |
Definition at line 436 of file codegen.hpp.
#define SZ_L SZ_RX |
Definition at line 482 of file codegen.hpp.
#define SZ_LCR SZ_RR |
Definition at line 489 of file codegen.hpp.
#define SZ_LDEBR SZ_RRE |
Definition at line 601 of file codegen.hpp.
#define SZ_LHI SZ_RI |
Definition at line 492 of file codegen.hpp.
#define SZ_LONG 4 |
Definition at line 399 of file codegen.hpp.
#define SZ_NR SZ_RR |
Definition at line 411 of file codegen.hpp.
#define SZ_RI 4 |
Definition at line 272 of file codegen.hpp.
#define SZ_RR 2 |
Definition at line 212 of file codegen.hpp.
#define SZ_RRE 4 |
Definition at line 303 of file codegen.hpp.
#define SZ_RS 4 |
Definition at line 293 of file codegen.hpp.
#define SZ_RSI 4 |
Definition at line 298 of file codegen.hpp.
#define SZ_RX 4 |
Definition at line 232 of file codegen.hpp.
#define SZ_S2 4 |
Definition at line 308 of file codegen.hpp.
#define SZ_SI 4 |
Definition at line 277 of file codegen.hpp.
#define SZ_SS 6 |
Definition at line 285 of file codegen.hpp.
|
inlinestatic |
Definition at line 145 of file codegen.hpp.
|
inlinestatic |
Definition at line 108 of file codegen.hpp.
|
inlinestatic |
Definition at line 135 of file codegen.hpp.
|
inlinestatic |
Definition at line 125 of file codegen.hpp.
|
inlinestatic |
Definition at line 390 of file codegen.hpp.
|
inlinestatic |
Definition at line 394 of file codegen.hpp.
|
inlinestatic |
Definition at line 261 of file codegen.hpp.
|
inlinestatic |
Definition at line 265 of file codegen.hpp.
|
inlinestatic |
Definition at line 214 of file codegen.hpp.
|
inlinestatic |
Definition at line 218 of file codegen.hpp.
|
inlinestatic |
Definition at line 222 of file codegen.hpp.
|
inlinestatic |
Definition at line 246 of file codegen.hpp.
|
inlinestatic |
Definition at line 250 of file codegen.hpp.
|
inlinestatic |
Definition at line 242 of file codegen.hpp.
|
inlinestatic |
Definition at line 234 of file codegen.hpp.
|
inlinestatic |
Definition at line 238 of file codegen.hpp.
|
inlinestatic |
Definition at line 254 of file codegen.hpp.