CACAO
Macros | Functions | Variables
codegen.hpp File Reference

Go to the source code of this file.

Macros

#define PASS13BIT(imm)   ((((s4)(imm)&0x1fff)<<19)>>19)
 
#define BRANCH_NOPS
 
#define PATCHER_CALL_INSTRUCTIONS   2 /* number of instructions */
 
#define PATCHER_CALL_SIZE   2 * 4 /* size in bytes of a patcher call */
 
#define EXCEPTION_CHECK_INSTRUCTIONS   3 /* number of instructions */
 
#define EXCEPTION_CHECK_SIZE   3 * 4 /* byte size of an exception check */
 
#define PATCHER_NOPS
 
#define MCODECHECK(icnt)
 
#define ALIGNCODENOP
 
#define ALIGN_STACK_SLOTS(slots)
 
#define M_COPY(s, d)   emit_copy(jd, iptr, (s), (d))
 
#define ICONST(d, c)   emit_iconst(cd, (d), (c))
 
#define LCONST(d, c)   emit_lconst(cd, (d), (c))
 
#define REG   0
 
#define IMM   1
 
#define M_OP3(op, op3, rd, rs1, rs2, imm)
 
#define M_OP3_GET_RD(x)   (((x) >> 25) & 0x1f)
 
#define M_OP3_GET_RS(x)   (((x) >> 14) & 0x1f)
 
#define M_OP3_GET_IMM(x)   ( (x) & 0x1fff)
 
#define M_OP3C(op, op3, rcond, rd, rs1, rs2, imm)
 
#define M_SHFT(op, op3, rs1, rs2, rd, imm, x)
 
#define M_FMT4(op, op3, rd, rs2, cond, cc2, cc1, cc0, imm)
 
#define FR_X(r)   (((r)<<1) + 1) /* transpose macro for floats which reside in upper half of double word */
 
#define DR_X(r)   ((((r)*2)|(((r)*2)>>5)) & 0x1f) /* transpose & pack double, see SPARC spec. */
 
#define M_FOP3(op, op3, opf, rd, rs1, rs2)
 
#define M_FOP3_FX(op, op3, opf, rd, rs1, rs2)
 
#define M_FOP3_DX(op, op3, opf, rd, rs1, rs2)
 
#define M_FCMP_DX(op, op3, opf, fcc, rs1, rs2)
 
#define M_FCMP_FX(op, op3, opf, fcc, rs1, rs2)
 
#define M_BRAREG(op, rcond, rs1, disp16, p, anul)
 
#define M_BRACC(op, op2, cond, disp19, ccx, p, anul)
 
#define M_SETHI(imm22, rd)
 
#define M_NOP   M_SETHI(0,0) /* nop */
 
#define M_AND(rs1, rs2, rd)   M_OP3(0x02,0x01,rd,rs1,rs2,REG) /* 64b c = a & b */
 
#define M_AND_IMM(rs1, rs2, rd)   M_OP3(0x02,0x01,rd,rs1,rs2,IMM)
 
#define M_ANDCC(rs1, rs2, rd)   M_OP3(0x02,0x11,rd,rs1,rs2,REG)
 
#define M_ANDCC_IMM(rs1, rs2, rd)   M_OP3(0x02,0x11,rd,rs1,rs2,IMM)
 
#define M_OR(rs1, rs2, rd)   M_OP3(0x02,0x02,rd,rs1,rs2,REG) /* rd = rs1 | rs2 */
 
#define M_OR_IMM(rs1, rs2, rd)   M_OP3(0x02,0x02,rd,rs1,rs2,IMM)
 
#define M_XOR(rs1, rs2, rd)   M_OP3(0x02,0x03,rd,rs1,rs2,REG) /* rd = rs1 ^ rs2 */
 
#define M_XOR_IMM(rs1, rs2, rd)   M_OP3(0x02,0x03,rd,rs1,rs2,IMM)
 
#define M_MOV(rs, rd)   M_OR(REG_ZERO, rs, rd) /* rd = rs */
 
#define M_CLR(rd)   M_OR(REG_ZERO,REG_ZERO,rd) /* rd = 0 */
 
#define M_SLLX(rs1, rs2, rd)   M_SHFT(0x02,0x25,rs1,rs2,rd,REG,1) /* 64b rd = rs << rs2 */
 
#define M_SLLX_IMM(rs1, rs2, rd)   M_SHFT(0x02,0x25,rs1,rs2,rd,IMM,1)
 
#define M_SLL(rs1, rs2, rd)   M_SHFT(0x02,0x25,rs1,rs2,rd,REG,0) /* 32b rd = rs << rs2 */
 
#define M_SLL_IMM(rs1, rs2, rd)   M_SHFT(0x02,0x25,rs1,rs2,rd,IMM,0)
 
#define M_SRLX(rs1, rs2, rd)   M_SHFT(0x02,0x26,rs1,rs2,rd,REG,1) /* 64b rd = rs >>>rs2 */
 
#define M_SRLX_IMM(rs1, rs2, rd)   M_SHFT(0x02,0x26,rs1,rs2,rd,IMM,1)
 
#define M_SRL(rs1, rs2, rd)   M_SHFT(0x02,0x26,rs1,rs2,rd,REG,0) /* 32b rd = rs >>>rs2 */
 
#define M_SRL_IMM(rs1, rs2, rd)   M_SHFT(0x02,0x26,rs1,rs2,rd,IMM,0)
 
#define M_SRAX(rs1, rs2, rd)   M_SHFT(0x02,0x27,rs1,rs2,rd,REG,1) /* 64b rd = rs >> rs2 */
 
#define M_SRAX_IMM(rs1, rs2, rd)   M_SHFT(0x02,0x27,rs1,rs2,rd,IMM,1)
 
#define M_SRA(rs1, rs2, rd)   M_SHFT(0x02,0x27,rs1,rs2,rd,REG,0) /* 32b rd = rs >> rs2 */
 
#define M_SRA_IMM(rs1, rs2, rd)   M_SHFT(0x02,0x27,rs1,rs2,rd,IMM,0)
 
#define M_ISEXT(rs, rd)   M_SRA(rs,REG_ZERO,rd) /* sign extend 32 bits*/
 
#define M_ADD(rs1, rs2, rd)   M_OP3(0x02,0x00,rd,rs1,rs2,REG) /* 64b rd = rs1 + rs2 */
 
#define M_ADD_IMM(rs1, rs2, rd)   M_OP3(0x02,0x00,rd,rs1,rs2,IMM)
 
#define M_SUB(rs1, rs2, rd)   M_OP3(0x02,0x04,rd,rs1,rs2,REG) /* 64b rd = rs1 - rs2 */
 
#define M_SUB_IMM(rs1, rs2, rd)   M_OP3(0x02,0x04,rd,rs1,rs2,IMM)
 
#define M_MULX(rs1, rs2, rd)   M_OP3(0x02,0x09,rd,rs1,rs2,REG) /* 64b rd = rs1 * rs2 */
 
#define M_MULX_IMM(rs1, rs2, rd)   M_OP3(0x02,0x09,rd,rs1,rs2,IMM)
 
#define M_DIVX(rs1, rs2, rd)   M_OP3(0x02,0x2d,rd,rs1,rs2,REG) /* 64b rd = rs1 / rs2 */
 
#define M_SUBcc(rs1, rs2, rd)   M_OP3(0x02,0x14,rd,rs1,rs2,REG) /* sets xcc and icc */
 
#define M_SUBcc_IMM(rs1, rs2, rd)   M_OP3(0x02,0x14,rd,rs1,rs2,IMM) /* sets xcc and icc */
 
#define M_CMP(rs1, rs2)   M_SUBcc(rs1,rs2,REG_ZERO)
 
#define M_CMP_IMM(rs1, rs2)   M_SUBcc_IMM(rs1,rs2,REG_ZERO)
 
#define M_XCMOVEQ(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x1,1,1,0,REG) /* a==b ? rd=rs */
 
#define M_XCMOVNE(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x9,1,1,0,REG) /* a!=b ? rd=rs */
 
#define M_XCMOVLT(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x3,1,1,0,REG) /* a<b ? rd=rs */
 
#define M_XCMOVGE(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0xb,1,1,0,REG) /* a>=b ? rd=rs */
 
#define M_XCMOVLE(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x2,1,1,0,REG) /* a<=b ? rd=rs */
 
#define M_XCMOVGT(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0xa,1,1,0,REG) /* a>b ? rd=rs */
 
#define M_XCMOVULE(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x4,1,1,0,REG) /* a<=b ? rd=rs (u)*/
 
#define M_XCMOVEQ_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x1,1,1,0,IMM) /* a==b ? rd=rs */
 
#define M_XCMOVNE_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x9,1,1,0,IMM) /* a!=b ? rd=rs */
 
#define M_XCMOVLT_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x3,1,1,0,IMM) /* a<b ? rd=rs */
 
#define M_XCMOVGE_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0xb,1,1,0,IMM) /* a>=b ? rd=rs */
 
#define M_XCMOVLE_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x2,1,1,0,IMM) /* a<=b ? rd=rs */
 
#define M_XCMOVGT_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0xa,1,1,0,IMM) /* a>b ? rd=rs */
 
#define M_XCMOVULE_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x4,1,1,0,IMM) /* a<=b ? rd=rs (u)*/
 
#define M_CMOVFGT_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x6,0,0,0,IMM) /* fa>fb ? rd=rs */
 
#define M_CMOVFLT_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x4,0,0,0,IMM) /* fa<fb ? rd=rs */
 
#define M_CMOVFEQ_IMM(rs, rd)   M_FMT4(0x2,0x2c,rd,rs,0x9,0,0,0,IMM) /* fa==fb ? rd=rs */
 
#define M_CMOVREQ(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x1,rd,rs1,rs2,REG) /* rs1==0 ? rd=rs2 */
 
#define M_CMOVRNE(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x5,rd,rs1,rs2,REG) /* rs1!=0 ? rd=rs2 */
 
#define M_CMOVRLE(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x2,rd,rs1,rs2,REG) /* rs1<=0 ? rd=rs2 */
 
#define M_CMOVRLT(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x3,rd,rs1,rs2,REG) /* rs1<0 ? rd=rs2 */
 
#define M_CMOVRGT(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x6,rd,rs1,rs2,REG) /* rs1>0 ? rd=rs2 */
 
#define M_CMOVRGE(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x7,rd,rs1,rs2,REG) /* rs1>=0 ? rd=rs2 */
 
#define M_CMOVREQ_IMM(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x1,rd,rs1,rs2,IMM) /* rs1==0 ? rd=rs2 */
 
#define M_CMOVRNE_IMM(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x5,rd,rs1,rs2,IMM) /* rs1!=0 ? rd=rs2 */
 
#define M_CMOVRLE_IMM(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x2,rd,rs1,rs2,IMM) /* rs1<=0 ? rd=rs2 */
 
#define M_CMOVRLT_IMM(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x3,rd,rs1,rs2,IMM) /* rs1<0 ? rd=rs2 */
 
#define M_CMOVRGT_IMM(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x6,rd,rs1,rs2,IMM) /* rs1>0 ? rd=rs2 */
 
#define M_CMOVRGE_IMM(rs1, rs2, rd)   M_OP3C(0x2,0x2f,0x7,rd,rs1,rs2,IMM) /* rs1>=0 ? rd=rs2 */
 
#define abs(x)   ((x) < 0 ? (-(x)) : (x))
 
#define sethi_part(x)   ((x)>>10)
 
#define setlo_part(x)   ((x) & 0x3ff)
 
#define DO_SETHI_REG(c, rd)
 
#define DO_SETHI_PART(c, rs, rd)
 
#define M_LDA(rd, rs, disp)
 
#define M_SLDU(rd, rs, disp)   M_OP3(0x03,0x02,rd,rs,disp,IMM) /* 16-bit load, uns*/
 
#define M_SLDS(rd, rs, disp)   M_OP3(0x03,0x0a,rd,rs,disp,IMM) /* 16-bit load, sig*/
 
#define M_BLDS(rd, rs, disp)   M_OP3(0x03,0x09,rd,rs,disp,IMM) /* 8-bit load, sig */
 
#define M_LDX_INTERN(rd, rs, disp)   M_OP3(0x03,0x0b,rd,rs,disp,IMM) /* 64-bit load, sig*/
 
#define M_LDX(rd, rs, disp)
 
#define M_ILD_INTERN(rd, rs, disp)   M_OP3(0x03,0x08,rd,rs,disp,IMM) /* 32-bit load, sig */
 
#define M_ILD(rd, rs, disp)
 
#define M_SST(rd, rs, disp)   M_OP3(0x03,0x06,rd,rs,disp,IMM) /* 16-bit store */
 
#define M_BST(rd, rs, disp)   M_OP3(0x03,0x05,rd,rs,disp,IMM) /* 8-bit store */
 
#define M_STX_INTERN(rd, rs, disp)   M_OP3(0x03,0x0e,rd,rs,disp,IMM) /* 64-bit store */
 
#define M_STX(rd, rs, disp)
 
#define M_IST_INTERN(rd, rs, disp)   M_OP3(0x03,0x04,rd,rs,disp,IMM) /* 32-bit store */
 
#define M_IST(rd, rs, disp)
 
#define M_BEQZ(r, disp)   M_BRAREG(0x0,0x1,r,disp,1,0) /* br r == 0 */
 
#define M_BLEZ(r, disp)   M_BRAREG(0x0,0x2,r,disp,1,0) /* br r <= 0 */
 
#define M_BLTZ(r, disp)   M_BRAREG(0x0,0x3,r,disp,1,0) /* br r < 0 */
 
#define M_BNEZ(r, disp)   M_BRAREG(0x0,0x5,r,disp,1,0) /* br r != 0 */
 
#define M_BGTZ(r, disp)   M_BRAREG(0x0,0x6,r,disp,1,0) /* br r > 0 */
 
#define M_BGEZ(r, disp)   M_BRAREG(0x0,0x7,r,disp,1,0) /* br r >= 0 */
 
#define M_XBEQ(disp)   M_BRACC(0x00,0x1,0x1,disp,2,1,0) /* branch a==b */
 
#define M_XBNE(disp)   M_BRACC(0x00,0x1,0x9,disp,2,1,0) /* branch a!=b */
 
#define M_XBGT(disp)   M_BRACC(0x00,0x1,0xa,disp,2,1,0) /* branch a>b */
 
#define M_XBLT(disp)   M_BRACC(0x00,0x1,0x3,disp,2,1,0) /* branch a<b */
 
#define M_XBGE(disp)   M_BRACC(0x00,0x1,0xb,disp,2,1,0) /* branch a>=b */
 
#define M_XBLE(disp)   M_BRACC(0x00,0x1,0x2,disp,2,1,0) /* branch a<=b */
 
#define M_XBUGE(disp)   M_BRACC(0x00,0x1,0xd,disp,2,1,0) /* br uns a>=b */
 
#define M_XBUGT(disp)   M_BRACC(0x00,0x1,0xc,disp,2,1,0) /* br uns a>b */
 
#define M_XBULT(disp)   M_BRACC(0x00,0x1,0x5,disp,2,1,0) /* br uns a<b */
 
#define M_BR(disp)   M_BRACC(0x00,0x1,0x8,disp,0,1,0) /* branch */
 
#define M_BEQ(disp)   M_BRACC(0x00,0x1,0x1,disp,0,1,0) /* branch a==b */
 
#define M_BNE(disp)   M_BRACC(0x00,0x1,0x9,disp,0,1,0) /* branch a!=b */
 
#define M_BGT(disp)   M_BRACC(0x00,0x1,0xa,disp,0,1,0) /* branch a>b */
 
#define M_BLT(disp)   M_BRACC(0x00,0x1,0x3,disp,0,1,0) /* branch a<b */
 
#define M_BGE(disp)   M_BRACC(0x00,0x1,0xb,disp,0,1,0) /* branch a>=b */
 
#define M_BLE(disp)   M_BRACC(0x00,0x1,0x2,disp,0,1,0) /* branch a<=b */
 
#define M_BULE(disp)   M_BRACC(0x00,0x1,0x4,disp,0,1,0) /* br uns a<=b */
 
#define M_BUGT(disp)   M_BRACC(0x00,0x1,0xc,disp,0,1,0) /* br uns a>b */
 
#define M_BULT(disp)   M_BRACC(0x00,0x1,0x5,disp,0,1,0) /* br uns a<b */
 
#define M_FBR(disp)   M_BRACC(0x00,0x5,0x8,disp,0,1,0) /* branch */
 
#define M_FBU(disp)   M_BRACC(0x00,0x5,0x7,disp,0,1,0) /* unordered */
 
#define M_FBG(disp)   M_BRACC(0x00,0x5,0x6,disp,0,1,0) /* branch a>b */
 
#define M_FBL(disp)   M_BRACC(0x00,0x5,0x4,disp,0,1,0) /* branch a<b */
 
#define M_FBO(disp)   M_BRACC(0x00,0x5,0xf,disp,0,1,0) /* br ordered */
 
#define M_SAVE(rs1, rs2, rd)   M_OP3(0x02,0x3c,rd,rs1,rs2,IMM)
 
#define M_SAVE_REG(rs1, rs2, rd)   M_OP3(0x02,0x3c,rd,rs1,rs2,REG)
 
#define M_RESTORE(rs1, rs2, rd)   M_OP3(0x02,0x3d,rd,rs1,rs2,IMM)
 
#define M_JMP(rd, rs1, rs2)   M_OP3(0x02,0x38,rd, rs1,rs2,REG) /* jump to rs1+rs2, adr of instr. saved to rd */
 
#define M_JMP_IMM(rd, rs1, rs2)   M_OP3(0x02,0x38,rd, rs1,rs2,IMM)
 
#define M_RET(rs1, imm)   M_OP3(0x02,0x38,REG_ZERO,rs1,imm,IMM) /* a jump which discards the current pc */
 
#define M_RETURN(rs1, imm)   M_OP3(0x02,0x39,0,rs1,imm,IMM) /* like ret, but does window restore */
 
#define M_DMOV(rs, rd)   M_FOP3_DX(0x02,0x34,0x02,rd,-1,rs) /* rd = rs */
 
#define M_FMOV(rs, rd)   M_FOP3_FX(0x02,0x34,0x01,rd,-1,rs) /* rd = rs */
 
#define M_FMOV_INTERN(rs, rd)   M_FOP3(0x02,0x34,0x01,rd,-1,rs) /* rd = rs */
 
#define M_FNEG(rs, rd)   M_FOP3_FX(0x02,0x34,0x05,rd,-1,rs) /* rd = -rs */
 
#define M_DNEG(rs, rd)   M_FOP3_DX(0x02,0x34,0x06,rd,-1,rs) /* rd = -rs */
 
#define M_FADD(rs1, rs2, rd)   M_FOP3_FX(0x02,0x34,0x41,rd,rs1,rs2) /* float add */
 
#define M_DADD(rs1, rs2, rd)   M_FOP3_DX(0x02,0x34,0x42,rd,rs1,rs2) /* double add */
 
#define M_FSUB(rs1, rs2, rd)   M_FOP3_FX(0x02,0x34,0x045,rd,rs1,rs2) /* float sub */
 
#define M_DSUB(rs1, rs2, rd)   M_FOP3_DX(0x02,0x34,0x046,rd,rs1,rs2) /* double sub */
 
#define M_FMUL(rs1, rs2, rd)   M_FOP3_FX(0x02,0x34,0x049,rd,rs1,rs2) /* float mul */
 
#define M_DMUL(rs1, rs2, rd)   M_FOP3_DX(0x02,0x34,0x04a,rd,rs1,rs2) /* double mul */
 
#define M_FDIV(rs1, rs2, rd)   M_FOP3_FX(0x02,0x34,0x04d,rd,rs1,rs2) /* float div */
 
#define M_DDIV(rs1, rs2, rd)   M_FOP3_DX(0x02,0x34,0x04e,rd,rs1,rs2) /* double div */
 
#define M_FCMP(rs1, rs2)   M_FCMP_FX(0x02,0x35,0x051,0,rs1,rs2) /* compare flt */
 
#define M_DCMP(rs1, rs2)   M_FCMP_DX(0x02,0x35,0x052,0,rs1,rs2) /* compare dbl */
 
#define M_CVTIF(rs, rd)   M_FOP3_FX(0x02,0x34,0x0c4,rd,-1,rs)/* int2flt */
 
#define M_CVTID(rs, rd)   M_FOP3(0x02,0x34,0x0c8,DR_X(rd),-1,FR_X(rs)) /* int2dbl */
 
#define M_CVTLF(rs, rd)   M_FOP3(0x02,0x34,0x084,FR_X(rd),-1,DR_X(rs)) /* long2flt */
 
#define M_CVTLD(rs, rd)   M_FOP3_DX(0x02,0x34,0x088,rd,-1,rs) /* long2dbl */
 
#define M_CVTFI(rs, rd)   M_FOP3_FX(0x02,0x34,0x0d1,rd,-1,rs) /* flt2int */
 
#define M_CVTDI(rs, rd)   M_FOP3(0x02,0x34,0x0d2,FR_X(rd),-1,DR_X(rs)) /* dbl2int */
 
#define M_CVTFL(rs, rd)   M_FOP3(0x02,0x34,0x081,DR_X(rd),-1,FR_X(rs)) /* flt2long */
 
#define M_CVTDL(rs, rd)   M_FOP3_DX(0x02,0x34,0x082,rd,-1,rs) /* dbl2long */
 
#define M_CVTFD(rs, rd)   M_FOP3(0x02,0x34,0x0c9,DR_X(rd),-1,FR_X(rs)) /* flt2dbl */
 
#define M_CVTDF(rs, rd)   M_FOP3(0x02,0x34,0x0c6,FR_X(rd),-1,DR_X(rs)) /* dbl2float */
 
#define M_DLD_INTERN(rd, rs1, disp)   M_OP3(0x03,0x23,DR_X(rd),rs1,disp,IMM) /* double (64-bit) load */
 
#define M_DLD(rd, rs, disp)
 
#define M_FLD_INTERN(rd, rs1, disp)   M_OP3(0x03,0x20,FR_X(rd),rs1,disp,IMM) /* float (32-bit) load */
 
#define M_FLD(rd, rs, disp)
 
#define M_FST_INTERN(rd, rs, disp)   M_OP3(0x03,0x24,FR_X(rd),rs,disp,IMM) /* float (32-bit) store */
 
#define M_FST(rd, rs, disp)
 
#define M_DST_INTERN(rd, rs1, disp)   M_OP3(0x03,0x27,DR_X(rd),rs1,disp,IMM) /* double (64-bit) store */
 
#define M_DST(rd, rs, disp)
 
#define POINTERSHIFT   3 /* x8 */
 
#define M_ALD_INTERN(a, b, disp)   M_LDX_INTERN(a,b,disp)
 
#define M_ALD(rd, rs, disp)   M_LDX(rd,rs,disp)
 
#define M_AST_INTERN(a, b, disp)   M_STX_INTERN(a,b,disp)
 
#define M_AST(a, b, disp)   M_STX(a,b,disp)
 
#define M_AADD(a, b, c)   M_ADD(a,b,c)
 
#define M_AADD_IMM(a, b, c)   M_ADD_IMM(a,b,c)
 
#define M_ASUB_IMM(a, b, c)   M_SUB_IMM(a,b,c)
 
#define M_ASLL_IMM(a, b, c)   M_SLLX_IMM(a,b,c)
 
#define M_ACMP(a, b)   M_CMP(a,b)
 
#define M_ICMP(a, b)   M_CMP(a,b)
 

Functions

bool fits_13 (s4 disp)
 
s4 get_lopart_disp (s4 disp)
 

Variables

s4 nat_argintregs [INT_NATARG_CNT]
 

Macro Definition Documentation

#define abs (   x)    ((x) < 0 ? (-(x)) : (x))

Definition at line 378 of file codegen.hpp.

#define ALIGN_STACK_SLOTS (   slots)
Value:
if (slots & 1) \
slots++;

Definition at line 90 of file codegen.hpp.

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

Definition at line 85 of file codegen.hpp.

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

Definition at line 51 of file codegen.hpp.

#define DO_SETHI_PART (   c,
  rs,
  rd 
)
Value:
do { \
if (c > 0) { \
M_ADD(rs,rd,rd); \
} \
else { \
M_SUB(rs,rd,rd); \
assert(sethi_part(c) != 0xf); \
} \
} while (0)
#define M_SUB(rs1, rs2, rd)
Definition: codegen.hpp:309
#define M_ADD(rs1, rs2, rd)
Definition: codegen.hpp:307
#define M_SETHI(imm22, rd)
Definition: codegen.hpp:268
#define sethi_part(x)
Definition: codegen.hpp:380

Definition at line 397 of file codegen.hpp.

#define DO_SETHI_REG (   c,
  rd 
)
Value:
do { \
if (c > 0) { \
M_SETHI(sethi_part(c), rd); \
if (setlo_part(c)) { \
M_OR_IMM(rd, setlo_part(c), rd); \
} \
} \
else { \
M_XOR_IMM(rd, PASS13BIT(setlo_part(c) | 0xffffffffffff1c00), rd); \
} \
} while (0)
#define M_OR_IMM(rs1, rs2, rd)
Definition: codegen.hpp:282
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define M_XOR_IMM(rs1, rs2, rd)
Definition: codegen.hpp:284
#define setlo_part(x)
Definition: codegen.hpp:381
#define M_SETHI(imm22, rd)
Definition: codegen.hpp:268
#define sethi_part(x)
Definition: codegen.hpp:380

Definition at line 383 of file codegen.hpp.

#define DR_X (   r)    ((((r)*2)|(((r)*2)>>5)) & 0x1f) /* transpose & pack double, see SPARC spec. */

Definition at line 177 of file codegen.hpp.

#define EXCEPTION_CHECK_INSTRUCTIONS   3 /* number of instructions */

Definition at line 63 of file codegen.hpp.

#define EXCEPTION_CHECK_SIZE   3 * 4 /* byte size of an exception check */

Definition at line 64 of file codegen.hpp.

#define FR_X (   r)    (((r)<<1) + 1) /* transpose macro for floats which reside in upper half of double word */

Definition at line 176 of file codegen.hpp.

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

Definition at line 96 of file codegen.hpp.

#define IMM   1

Definition at line 105 of file codegen.hpp.

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

Definition at line 97 of file codegen.hpp.

#define M_AADD (   a,
  b,
 
)    M_ADD(a,b,c)

Definition at line 666 of file codegen.hpp.

#define M_AADD_IMM (   a,
  b,
 
)    M_ADD_IMM(a,b,c)

Definition at line 667 of file codegen.hpp.

#define M_ACMP (   a,
 
)    M_CMP(a,b)

Definition at line 671 of file codegen.hpp.

#define M_ADD (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x00,rd,rs1,rs2,REG) /* 64b rd = rs1 + rs2 */

Definition at line 307 of file codegen.hpp.

#define M_ADD_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x00,rd,rs1,rs2,IMM)

Definition at line 308 of file codegen.hpp.

#define M_ALD (   rd,
  rs,
  disp 
)    M_LDX(rd,rs,disp)

Definition at line 663 of file codegen.hpp.

#define M_ALD_INTERN (   a,
  b,
  disp 
)    M_LDX_INTERN(a,b,disp)

Definition at line 662 of file codegen.hpp.

#define M_AND (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x01,rd,rs1,rs2,REG) /* 64b c = a & b */

Definition at line 276 of file codegen.hpp.

#define M_AND_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x01,rd,rs1,rs2,IMM)

Definition at line 277 of file codegen.hpp.

#define M_ANDCC (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x11,rd,rs1,rs2,REG)

Definition at line 278 of file codegen.hpp.

#define M_ANDCC_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x11,rd,rs1,rs2,IMM)

Definition at line 279 of file codegen.hpp.

#define M_ASLL_IMM (   a,
  b,
 
)    M_SLLX_IMM(a,b,c)

Definition at line 669 of file codegen.hpp.

#define M_AST (   a,
  b,
  disp 
)    M_STX(a,b,disp)

Definition at line 665 of file codegen.hpp.

#define M_AST_INTERN (   a,
  b,
  disp 
)    M_STX_INTERN(a,b,disp)

Definition at line 664 of file codegen.hpp.

#define M_ASUB_IMM (   a,
  b,
 
)    M_SUB_IMM(a,b,c)

Definition at line 668 of file codegen.hpp.

#define M_BEQ (   disp)    M_BRACC(0x00,0x1,0x1,disp,0,1,0) /* branch a==b */

Definition at line 518 of file codegen.hpp.

#define M_BEQZ (   r,
  disp 
)    M_BRAREG(0x0,0x1,r,disp,1,0) /* br r == 0 */

Definition at line 495 of file codegen.hpp.

#define M_BGE (   disp)    M_BRACC(0x00,0x1,0xb,disp,0,1,0) /* branch a>=b */

Definition at line 522 of file codegen.hpp.

#define M_BGEZ (   r,
  disp 
)    M_BRAREG(0x0,0x7,r,disp,1,0) /* br r >= 0 */

Definition at line 500 of file codegen.hpp.

#define M_BGT (   disp)    M_BRACC(0x00,0x1,0xa,disp,0,1,0) /* branch a>b */

Definition at line 520 of file codegen.hpp.

#define M_BGTZ (   r,
  disp 
)    M_BRAREG(0x0,0x6,r,disp,1,0) /* br r > 0 */

Definition at line 499 of file codegen.hpp.

#define M_BLDS (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x09,rd,rs,disp,IMM) /* 8-bit load, sig */

Definition at line 428 of file codegen.hpp.

#define M_BLE (   disp)    M_BRACC(0x00,0x1,0x2,disp,0,1,0) /* branch a<=b */

Definition at line 523 of file codegen.hpp.

#define M_BLEZ (   r,
  disp 
)    M_BRAREG(0x0,0x2,r,disp,1,0) /* br r <= 0 */

Definition at line 496 of file codegen.hpp.

#define M_BLT (   disp)    M_BRACC(0x00,0x1,0x3,disp,0,1,0) /* branch a<b */

Definition at line 521 of file codegen.hpp.

#define M_BLTZ (   r,
  disp 
)    M_BRAREG(0x0,0x3,r,disp,1,0) /* br r < 0 */

Definition at line 497 of file codegen.hpp.

#define M_BNE (   disp)    M_BRACC(0x00,0x1,0x9,disp,0,1,0) /* branch a!=b */

Definition at line 519 of file codegen.hpp.

#define M_BNEZ (   r,
  disp 
)    M_BRAREG(0x0,0x5,r,disp,1,0) /* br r != 0 */

Definition at line 498 of file codegen.hpp.

#define M_BR (   disp)    M_BRACC(0x00,0x1,0x8,disp,0,1,0) /* branch */

Definition at line 517 of file codegen.hpp.

#define M_BRACC (   op,
  op2,
  cond,
  disp19,
  ccx,
  p,
  anul 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | ((anul)<<29) | ((cond)<<25) | (op2<<22) | (ccx<<20) | \
(p << 19 ) | ((disp19) & 0x007ffff) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 258 of file codegen.hpp.

#define M_BRAREG (   op,
  rcond,
  rs1,
  disp16,
  p,
  anul 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | ((anul)<<29) | (0<<28) | ((rcond)<<25) | (3<<22) | \
( ((disp16)& 0xC000) << 6 ) | (p << 19) | ((rs1) << 14) | ((disp16)&0x3fff) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 242 of file codegen.hpp.

#define M_BST (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x05,rd,rs,disp,IMM) /* 8-bit store */

Definition at line 458 of file codegen.hpp.

#define M_BUGT (   disp)    M_BRACC(0x00,0x1,0xc,disp,0,1,0) /* br uns a>b */

Definition at line 525 of file codegen.hpp.

#define M_BULE (   disp)    M_BRACC(0x00,0x1,0x4,disp,0,1,0) /* br uns a<=b */

Definition at line 524 of file codegen.hpp.

#define M_BULT (   disp)    M_BRACC(0x00,0x1,0x5,disp,0,1,0) /* br uns a<b */

Definition at line 526 of file codegen.hpp.

#define M_CLR (   rd)    M_OR(REG_ZERO,REG_ZERO,rd) /* rd = 0 */

Definition at line 287 of file codegen.hpp.

#define M_CMOVFEQ_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x9,0,0,0,IMM) /* fa==fb ? rd=rs */

Definition at line 348 of file codegen.hpp.

#define M_CMOVFGT_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x6,0,0,0,IMM) /* fa>fb ? rd=rs */

Definition at line 346 of file codegen.hpp.

#define M_CMOVFLT_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x4,0,0,0,IMM) /* fa<fb ? rd=rs */

Definition at line 347 of file codegen.hpp.

#define M_CMOVREQ (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x1,rd,rs1,rs2,REG) /* rs1==0 ? rd=rs2 */

Definition at line 356 of file codegen.hpp.

#define M_CMOVREQ_IMM (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x1,rd,rs1,rs2,IMM) /* rs1==0 ? rd=rs2 */

Definition at line 363 of file codegen.hpp.

#define M_CMOVRGE (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x7,rd,rs1,rs2,REG) /* rs1>=0 ? rd=rs2 */

Definition at line 361 of file codegen.hpp.

#define M_CMOVRGE_IMM (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x7,rd,rs1,rs2,IMM) /* rs1>=0 ? rd=rs2 */

Definition at line 368 of file codegen.hpp.

#define M_CMOVRGT (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x6,rd,rs1,rs2,REG) /* rs1>0 ? rd=rs2 */

Definition at line 360 of file codegen.hpp.

#define M_CMOVRGT_IMM (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x6,rd,rs1,rs2,IMM) /* rs1>0 ? rd=rs2 */

Definition at line 367 of file codegen.hpp.

#define M_CMOVRLE (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x2,rd,rs1,rs2,REG) /* rs1<=0 ? rd=rs2 */

Definition at line 358 of file codegen.hpp.

#define M_CMOVRLE_IMM (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x2,rd,rs1,rs2,IMM) /* rs1<=0 ? rd=rs2 */

Definition at line 365 of file codegen.hpp.

#define M_CMOVRLT (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x3,rd,rs1,rs2,REG) /* rs1<0 ? rd=rs2 */

Definition at line 359 of file codegen.hpp.

#define M_CMOVRLT_IMM (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x3,rd,rs1,rs2,IMM) /* rs1<0 ? rd=rs2 */

Definition at line 366 of file codegen.hpp.

#define M_CMOVRNE (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x5,rd,rs1,rs2,REG) /* rs1!=0 ? rd=rs2 */

Definition at line 357 of file codegen.hpp.

#define M_CMOVRNE_IMM (   rs1,
  rs2,
  rd 
)    M_OP3C(0x2,0x2f,0x5,rd,rs1,rs2,IMM) /* rs1!=0 ? rd=rs2 */

Definition at line 364 of file codegen.hpp.

#define M_CMP (   rs1,
  rs2 
)    M_SUBcc(rs1,rs2,REG_ZERO)

Definition at line 322 of file codegen.hpp.

#define M_CMP_IMM (   rs1,
  rs2 
)    M_SUBcc_IMM(rs1,rs2,REG_ZERO)

Definition at line 323 of file codegen.hpp.

#define M_COPY (   s,
 
)    emit_copy(jd, iptr, (s), (d))

Definition at line 95 of file codegen.hpp.

#define M_CVTDF (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x0c6,FR_X(rd),-1,DR_X(rs)) /* dbl2float */

Definition at line 590 of file codegen.hpp.

#define M_CVTDI (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x0d2,FR_X(rd),-1,DR_X(rs)) /* dbl2int */

Definition at line 585 of file codegen.hpp.

#define M_CVTDL (   rs,
  rd 
)    M_FOP3_DX(0x02,0x34,0x082,rd,-1,rs) /* dbl2long */

Definition at line 587 of file codegen.hpp.

#define M_CVTFD (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x0c9,DR_X(rd),-1,FR_X(rs)) /* flt2dbl */

Definition at line 589 of file codegen.hpp.

#define M_CVTFI (   rs,
  rd 
)    M_FOP3_FX(0x02,0x34,0x0d1,rd,-1,rs) /* flt2int */

Definition at line 584 of file codegen.hpp.

#define M_CVTFL (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x081,DR_X(rd),-1,FR_X(rs)) /* flt2long */

Definition at line 586 of file codegen.hpp.

#define M_CVTID (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x0c8,DR_X(rd),-1,FR_X(rs)) /* int2dbl */

Definition at line 580 of file codegen.hpp.

#define M_CVTIF (   rs,
  rd 
)    M_FOP3_FX(0x02,0x34,0x0c4,rd,-1,rs)/* int2flt */

Definition at line 579 of file codegen.hpp.

#define M_CVTLD (   rs,
  rd 
)    M_FOP3_DX(0x02,0x34,0x088,rd,-1,rs) /* long2dbl */

Definition at line 582 of file codegen.hpp.

#define M_CVTLF (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x084,FR_X(rd),-1,DR_X(rs)) /* long2flt */

Definition at line 581 of file codegen.hpp.

#define M_DADD (   rs1,
  rs2,
  rd 
)    M_FOP3_DX(0x02,0x34,0x42,rd,rs1,rs2) /* double add */

Definition at line 562 of file codegen.hpp.

#define M_DCMP (   rs1,
  rs2 
)    M_FCMP_DX(0x02,0x35,0x052,0,rs1,rs2) /* compare dbl */

Definition at line 575 of file codegen.hpp.

#define M_DDIV (   rs1,
  rs2,
  rd 
)    M_FOP3_DX(0x02,0x34,0x04e,rd,rs1,rs2) /* double div */

Definition at line 568 of file codegen.hpp.

#define M_DIVX (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x2d,rd,rs1,rs2,REG) /* 64b rd = rs1 / rs2 */

Definition at line 313 of file codegen.hpp.

#define M_DLD (   rd,
  rs,
  disp 
)
Value:
do { \
s4 lo = (short) (disp); \
s4 hi = (short) (((disp) - lo) >> 13); \
if (hi == 0) { \
M_DLD_INTERN(rd,rs,lo); \
} else { \
M_SETHI(hi&0x3ffff8,rd); \
M_AADD(rs,rd,rd); \
M_DLD_INTERN(rd,rd,PASS13BIT(lo)); \
} \
} while (0)
#define M_DLD_INTERN(rd, rs1, disp)
Definition: codegen.hpp:594
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define M_AADD(a, b, c)
Definition: codegen.hpp:666
int32_t s4
Definition: types.hpp:45
#define M_SETHI(imm22, rd)
Definition: codegen.hpp:268

Definition at line 595 of file codegen.hpp.

#define M_DLD_INTERN (   rd,
  rs1,
  disp 
)    M_OP3(0x03,0x23,DR_X(rd),rs1,disp,IMM) /* double (64-bit) load */

Definition at line 594 of file codegen.hpp.

#define M_DMOV (   rs,
  rd 
)    M_FOP3_DX(0x02,0x34,0x02,rd,-1,rs) /* rd = rs */

Definition at line 553 of file codegen.hpp.

#define M_DMUL (   rs1,
  rs2,
  rd 
)    M_FOP3_DX(0x02,0x34,0x04a,rd,rs1,rs2) /* double mul */

Definition at line 566 of file codegen.hpp.

#define M_DNEG (   rs,
  rd 
)    M_FOP3_DX(0x02,0x34,0x06,rd,-1,rs) /* rd = -rs */

Definition at line 559 of file codegen.hpp.

#define M_DST (   rd,
  rs,
  disp 
)
Value:
do { \
s4 lo = (short) (disp); \
s4 hi = (short) (((disp) - lo) >> 13); \
if (hi == 0) { \
M_DST_INTERN(rd,rs,lo); \
} else { \
M_SETHI(hi&0x3ffff8,REG_ITMP3); \
} \
} while (0)
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define M_DST_INTERN(rd, rs1, disp)
Definition: codegen.hpp:639
#define M_AADD(a, b, c)
Definition: codegen.hpp:666
int32_t s4
Definition: types.hpp:45
#define M_SETHI(imm22, rd)
Definition: codegen.hpp:268
#define REG_ITMP3
Definition: md-abi.hpp:48

Definition at line 640 of file codegen.hpp.

#define M_DST_INTERN (   rd,
  rs1,
  disp 
)    M_OP3(0x03,0x27,DR_X(rd),rs1,disp,IMM) /* double (64-bit) store */

Definition at line 639 of file codegen.hpp.

#define M_DSUB (   rs1,
  rs2,
  rd 
)    M_FOP3_DX(0x02,0x34,0x046,rd,rs1,rs2) /* double sub */

Definition at line 564 of file codegen.hpp.

#define M_FADD (   rs1,
  rs2,
  rd 
)    M_FOP3_FX(0x02,0x34,0x41,rd,rs1,rs2) /* float add */

Definition at line 561 of file codegen.hpp.

#define M_FBG (   disp)    M_BRACC(0x00,0x5,0x6,disp,0,1,0) /* branch a>b */

Definition at line 532 of file codegen.hpp.

#define M_FBL (   disp)    M_BRACC(0x00,0x5,0x4,disp,0,1,0) /* branch a<b */

Definition at line 533 of file codegen.hpp.

#define M_FBO (   disp)    M_BRACC(0x00,0x5,0xf,disp,0,1,0) /* br ordered */

Definition at line 534 of file codegen.hpp.

#define M_FBR (   disp)    M_BRACC(0x00,0x5,0x8,disp,0,1,0) /* branch */

Definition at line 530 of file codegen.hpp.

#define M_FBU (   disp)    M_BRACC(0x00,0x5,0x7,disp,0,1,0) /* unordered */

Definition at line 531 of file codegen.hpp.

#define M_FCMP (   rs1,
  rs2 
)    M_FCMP_FX(0x02,0x35,0x051,0,rs1,rs2) /* compare flt */

Definition at line 574 of file codegen.hpp.

#define M_FCMP_DX (   op,
  op3,
  opf,
  fcc,
  rs1,
  rs2 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | ((fcc)<<25) | ((op3)<<19) | (DR_X(rs1) << 14) | \
((opf)<<5) | DR_X(rs2) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46
#define DR_X(r)
Definition: codegen.hpp:177

Definition at line 218 of file codegen.hpp.

#define M_FCMP_FX (   op,
  op3,
  opf,
  fcc,
  rs1,
  rs2 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | ((fcc)<<25) | ((op3)<<19) | (FR_X(rs1) << 14) | \
((opf)<<5) | FR_X(rs2) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
#define FR_X(r)
Definition: codegen.hpp:176
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 225 of file codegen.hpp.

#define M_FDIV (   rs1,
  rs2,
  rd 
)    M_FOP3_FX(0x02,0x34,0x04d,rd,rs1,rs2) /* float div */

Definition at line 567 of file codegen.hpp.

#define M_FLD (   rd,
  rs,
  disp 
)
Value:
do { \
s4 lo = (short) (disp); \
s4 hi = (short) (((disp) - lo) >> 13); \
if (hi == 0) { \
M_FLD_INTERN(rd,rs,lo); \
} else { \
M_SETHI(hi&0x3ffff8,rd); \
M_AADD(rs,rd,rd); \
M_FLD_INTERN(rd,rd,PASS13BIT(lo)); \
} \
} while (0)
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define M_FLD_INTERN(rd, rs1, disp)
Definition: codegen.hpp:609
#define M_AADD(a, b, c)
Definition: codegen.hpp:666
int32_t s4
Definition: types.hpp:45
#define M_SETHI(imm22, rd)
Definition: codegen.hpp:268

Definition at line 610 of file codegen.hpp.

#define M_FLD_INTERN (   rd,
  rs1,
  disp 
)    M_OP3(0x03,0x20,FR_X(rd),rs1,disp,IMM) /* float (32-bit) load */

Definition at line 609 of file codegen.hpp.

#define M_FMOV (   rs,
  rd 
)    M_FOP3_FX(0x02,0x34,0x01,rd,-1,rs) /* rd = rs */

Definition at line 554 of file codegen.hpp.

#define M_FMOV_INTERN (   rs,
  rd 
)    M_FOP3(0x02,0x34,0x01,rd,-1,rs) /* rd = rs */

Definition at line 556 of file codegen.hpp.

#define M_FMT4 (   op,
  op3,
  rd,
  rs2,
  cond,
  cc2,
  cc1,
  cc0,
  imm 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op)) << 30) | ((op3) << 19) | ((rd) << 25) | ((cc2) << 18) | ((cond) << 14) | \
((imm) << 13) | ((cc1) << 12) | ((cc0) << 11) | ((rs2) & 0x7ff) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 168 of file codegen.hpp.

#define M_FMUL (   rs1,
  rs2,
  rd 
)    M_FOP3_FX(0x02,0x34,0x049,rd,rs1,rs2) /* float mul */

Definition at line 565 of file codegen.hpp.

#define M_FNEG (   rs,
  rd 
)    M_FOP3_FX(0x02,0x34,0x05,rd,-1,rs) /* rd = -rs */

Definition at line 558 of file codegen.hpp.

#define M_FOP3 (   op,
  op3,
  opf,
  rd,
  rs1,
  rs2 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | ((rd)<<25) | ((op3)<<19) | ((((rs1)==-1)?0:(rs1)) << 14) | \
((opf)<<5) | (rs2) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 188 of file codegen.hpp.

#define M_FOP3_DX (   op,
  op3,
  opf,
  rd,
  rs1,
  rs2 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | (DR_X(rd)<<25) | ((op3)<<19) | ((((rs1)==-1)?0:DR_X(rs1)) << 14) | \
((opf)<<5) | DR_X(rs2) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46
#define DR_X(r)
Definition: codegen.hpp:177

Definition at line 202 of file codegen.hpp.

#define M_FOP3_FX (   op,
  op3,
  opf,
  rd,
  rs1,
  rs2 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op))<<30) | (FR_X(rd)<<25) | ((op3)<<19) | ((((rs1)==-1)?0:FR_X(rs1)) << 14) | \
((opf)<<5) | FR_X(rs2) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
#define FR_X(r)
Definition: codegen.hpp:176
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 195 of file codegen.hpp.

#define M_FST (   rd,
  rs,
  disp 
)
Value:
do { \
s4 lo = (short) (disp); \
s4 hi = (short) (((disp) - lo) >> 13); \
if (hi == 0) { \
M_FST_INTERN(rd,rs,lo); \
} else { \
M_SETHI(hi&0x3ffff8,REG_ITMP3); \
} \
} while (0)
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define M_AADD(a, b, c)
Definition: codegen.hpp:666
int32_t s4
Definition: types.hpp:45
#define M_FST_INTERN(rd, rs, disp)
Definition: codegen.hpp:624
#define M_SETHI(imm22, rd)
Definition: codegen.hpp:268
#define REG_ITMP3
Definition: md-abi.hpp:48

Definition at line 625 of file codegen.hpp.

#define M_FST_INTERN (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x24,FR_X(rd),rs,disp,IMM) /* float (32-bit) store */

Definition at line 624 of file codegen.hpp.

#define M_FSUB (   rs1,
  rs2,
  rd 
)    M_FOP3_FX(0x02,0x34,0x045,rd,rs1,rs2) /* float sub */

Definition at line 563 of file codegen.hpp.

#define M_ICMP (   a,
 
)    M_CMP(a,b)

Definition at line 672 of file codegen.hpp.

#define M_ILD (   rd,
  rs,
  disp 
)
Value:
do { \
if (fits_13(disp)) { \
M_ILD_INTERN(rd,rs,disp); \
} \
else { \
DO_SETHI_PART(disp,rs,rd); \
} \
} while (0)
#define M_ILD_INTERN(rd, rs, disp)
Definition: codegen.hpp:443
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define DO_SETHI_PART(c, rs, rd)
Definition: codegen.hpp:397
s4 get_lopart_disp(disp)
Definition: codegen.cpp:84
bool fits_13(s4 disp)
Definition: codegen.cpp:74

Definition at line 444 of file codegen.hpp.

#define M_ILD_INTERN (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x08,rd,rs,disp,IMM) /* 32-bit load, sig */

Definition at line 443 of file codegen.hpp.

#define M_ISEXT (   rs,
  rd 
)    M_SRA(rs,REG_ZERO,rd) /* sign extend 32 bits*/

Definition at line 304 of file codegen.hpp.

#define M_IST (   rd,
  rs,
  disp 
)
Value:
do { \
if (fits_13(disp)) { \
M_IST_INTERN(rd,rs,disp); \
} \
else { \
} \
} while (0)
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define DO_SETHI_PART(c, rs, rd)
Definition: codegen.hpp:397
s4 get_lopart_disp(disp)
Definition: codegen.cpp:84
#define M_IST_INTERN(rd, rs, disp)
Definition: codegen.hpp:477
bool fits_13(s4 disp)
Definition: codegen.cpp:74
#define REG_ITMP3
Definition: md-abi.hpp:48

Definition at line 478 of file codegen.hpp.

#define M_IST_INTERN (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x04,rd,rs,disp,IMM) /* 32-bit store */

Definition at line 477 of file codegen.hpp.

#define M_JMP (   rd,
  rs1,
  rs2 
)    M_OP3(0x02,0x38,rd, rs1,rs2,REG) /* jump to rs1+rs2, adr of instr. saved to rd */

Definition at line 544 of file codegen.hpp.

#define M_JMP_IMM (   rd,
  rs1,
  rs2 
)    M_OP3(0x02,0x38,rd, rs1,rs2,IMM)

Definition at line 545 of file codegen.hpp.

#define M_LDA (   rd,
  rs,
  disp 
)
Value:
do { \
if (fits_13(disp)) { \
M_AADD_IMM(rs,disp,rd); \
} \
else { \
DO_SETHI_REG(disp,rd); \
M_AADD(rd,rs,rd); \
} \
} while (0)
#define M_AADD(a, b, c)
Definition: codegen.hpp:666
#define DO_SETHI_REG(c, rd)
Definition: codegen.hpp:383
bool fits_13(s4 disp)
Definition: codegen.cpp:74
#define M_AADD_IMM(a, b, c)
Definition: codegen.hpp:667

Definition at line 413 of file codegen.hpp.

#define M_LDX (   rd,
  rs,
  disp 
)
Value:
do { \
if (fits_13(disp)) { \
M_LDX_INTERN(rd,rs,disp); \
} \
else { \
DO_SETHI_PART(disp,rs,rd); \
} \
} while (0)
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define DO_SETHI_PART(c, rs, rd)
Definition: codegen.hpp:397
s4 get_lopart_disp(disp)
Definition: codegen.cpp:84
#define M_LDX_INTERN(rd, rs, disp)
Definition: codegen.hpp:431
bool fits_13(s4 disp)
Definition: codegen.cpp:74

Definition at line 432 of file codegen.hpp.

#define M_LDX_INTERN (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x0b,rd,rs,disp,IMM) /* 64-bit load, sig*/

Definition at line 431 of file codegen.hpp.

#define M_MOV (   rs,
  rd 
)    M_OR(REG_ZERO, rs, rd) /* rd = rs */

Definition at line 286 of file codegen.hpp.

#define M_MULX (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x09,rd,rs1,rs2,REG) /* 64b rd = rs1 * rs2 */

Definition at line 311 of file codegen.hpp.

#define M_MULX_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x09,rd,rs1,rs2,IMM)

Definition at line 312 of file codegen.hpp.

#define M_NOP   M_SETHI(0,0) /* nop */

Definition at line 274 of file codegen.hpp.

#define M_OP3 (   op,
  op3,
  rd,
  rs1,
  rs2,
  imm 
)
Value:
do { \
assert(check_13bit_imm(rs2)); \
*((u4 *) cd->mcodeptr) = ((((s4) (op)) << 30) | ((rd) << 25) | ((op3) << 19) | ((rs1) << 14) | ((imm)<<13) | (imm?((rs2)&0x1fff):(rs2)) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46
bool check_13bit_imm(s8 imm)
Definition: codegen.cpp:101

Definition at line 117 of file codegen.hpp.

#define M_OP3_GET_IMM (   x)    ( (x) & 0x1fff)

Definition at line 127 of file codegen.hpp.

#define M_OP3_GET_RD (   x)    (((x) >> 25) & 0x1f)

Definition at line 125 of file codegen.hpp.

#define M_OP3_GET_RS (   x)    (((x) >> 14) & 0x1f)

Definition at line 126 of file codegen.hpp.

#define M_OP3C (   op,
  op3,
  rcond,
  rd,
  rs1,
  rs2,
  imm 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ((((s4) (op)) << 30) | ((rd) << 25) | ((op3) << 19) | ((rs1) << 14) | ((imm)<<13) | \
((rcond) << 10) | (imm?((rs2)&0x3ff):(rs2)) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 134 of file codegen.hpp.

#define M_OR (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x02,rd,rs1,rs2,REG) /* rd = rs1 | rs2 */

Definition at line 281 of file codegen.hpp.

#define M_OR_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x02,rd,rs1,rs2,IMM)

Definition at line 282 of file codegen.hpp.

#define M_RESTORE (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x3d,rd,rs1,rs2,IMM)

Definition at line 540 of file codegen.hpp.

#define M_RET (   rs1,
  imm 
)    M_OP3(0x02,0x38,REG_ZERO,rs1,imm,IMM) /* a jump which discards the current pc */

Definition at line 546 of file codegen.hpp.

#define M_RETURN (   rs1,
  imm 
)    M_OP3(0x02,0x39,0,rs1,imm,IMM) /* like ret, but does window restore */

Definition at line 548 of file codegen.hpp.

#define M_SAVE (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x3c,rd,rs1,rs2,IMM)

Definition at line 538 of file codegen.hpp.

#define M_SAVE_REG (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x3c,rd,rs1,rs2,REG)

Definition at line 539 of file codegen.hpp.

#define M_SETHI (   imm22,
  rd 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ((((s4)(0x00)) << 30) | ((rd) << 25) | ((0x04)<<22) | ((imm22)&0x3FFFFF) ); \
cd->mcodeptr += 4; \
} while (0)
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 268 of file codegen.hpp.

#define M_SHFT (   op,
  op3,
  rs1,
  rs2,
  rd,
  imm,
 
)
Value:
do { \
*((u4 *) cd->mcodeptr) = ( (((s4)(op)) << 30) | ((op3) << 19) | ((rd) << 25) | ((rs1) << 14) | ((imm) << 13) | \
((x) << 12) | (((imm) && (x))?((rs2) & 0x3f):((rs2) & 0x1f)) ); \
cd->mcodeptr += 4; \
} while (0)
u2 op
Definition: disass.cpp:129
int32_t s4
Definition: types.hpp:45
uint32_t u4
Definition: types.hpp:46

Definition at line 151 of file codegen.hpp.

#define M_SLDS (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x0a,rd,rs,disp,IMM) /* 16-bit load, sig*/

Definition at line 427 of file codegen.hpp.

#define M_SLDU (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x02,rd,rs,disp,IMM) /* 16-bit load, uns*/

Definition at line 426 of file codegen.hpp.

#define M_SLL (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x25,rs1,rs2,rd,REG,0) /* 32b rd = rs << rs2 */

Definition at line 293 of file codegen.hpp.

#define M_SLL_IMM (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x25,rs1,rs2,rd,IMM,0)

Definition at line 294 of file codegen.hpp.

#define M_SLLX (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x25,rs1,rs2,rd,REG,1) /* 64b rd = rs << rs2 */

Definition at line 291 of file codegen.hpp.

#define M_SLLX_IMM (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x25,rs1,rs2,rd,IMM,1)

Definition at line 292 of file codegen.hpp.

#define M_SRA (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x27,rs1,rs2,rd,REG,0) /* 32b rd = rs >> rs2 */

Definition at line 301 of file codegen.hpp.

#define M_SRA_IMM (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x27,rs1,rs2,rd,IMM,0)

Definition at line 302 of file codegen.hpp.

#define M_SRAX (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x27,rs1,rs2,rd,REG,1) /* 64b rd = rs >> rs2 */

Definition at line 299 of file codegen.hpp.

#define M_SRAX_IMM (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x27,rs1,rs2,rd,IMM,1)

Definition at line 300 of file codegen.hpp.

#define M_SRL (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x26,rs1,rs2,rd,REG,0) /* 32b rd = rs >>>rs2 */

Definition at line 297 of file codegen.hpp.

#define M_SRL_IMM (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x26,rs1,rs2,rd,IMM,0)

Definition at line 298 of file codegen.hpp.

#define M_SRLX (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x26,rs1,rs2,rd,REG,1) /* 64b rd = rs >>>rs2 */

Definition at line 295 of file codegen.hpp.

#define M_SRLX_IMM (   rs1,
  rs2,
  rd 
)    M_SHFT(0x02,0x26,rs1,rs2,rd,IMM,1)

Definition at line 296 of file codegen.hpp.

#define M_SST (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x06,rd,rs,disp,IMM) /* 16-bit store */

Definition at line 457 of file codegen.hpp.

#define M_STX (   rd,
  rs,
  disp 
)
Value:
do { \
if (fits_13(disp)) { \
M_STX_INTERN(rd,rs,disp); \
} \
else { \
} \
} while (0)
#define M_STX_INTERN(rd, rs, disp)
Definition: codegen.hpp:464
#define PASS13BIT(imm)
Definition: codegen.hpp:40
#define DO_SETHI_PART(c, rs, rd)
Definition: codegen.hpp:397
s4 get_lopart_disp(disp)
Definition: codegen.cpp:84
bool fits_13(s4 disp)
Definition: codegen.cpp:74
#define REG_ITMP3
Definition: md-abi.hpp:48

Definition at line 465 of file codegen.hpp.

#define M_STX_INTERN (   rd,
  rs,
  disp 
)    M_OP3(0x03,0x0e,rd,rs,disp,IMM) /* 64-bit store */

Definition at line 464 of file codegen.hpp.

#define M_SUB (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x04,rd,rs1,rs2,REG) /* 64b rd = rs1 - rs2 */

Definition at line 309 of file codegen.hpp.

#define M_SUB_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x04,rd,rs1,rs2,IMM)

Definition at line 310 of file codegen.hpp.

#define M_SUBcc (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x14,rd,rs1,rs2,REG) /* sets xcc and icc */

Definition at line 315 of file codegen.hpp.

#define M_SUBcc_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x14,rd,rs1,rs2,IMM) /* sets xcc and icc */

Definition at line 316 of file codegen.hpp.

#define M_XBEQ (   disp)    M_BRACC(0x00,0x1,0x1,disp,2,1,0) /* branch a==b */

Definition at line 505 of file codegen.hpp.

#define M_XBGE (   disp)    M_BRACC(0x00,0x1,0xb,disp,2,1,0) /* branch a>=b */

Definition at line 509 of file codegen.hpp.

#define M_XBGT (   disp)    M_BRACC(0x00,0x1,0xa,disp,2,1,0) /* branch a>b */

Definition at line 507 of file codegen.hpp.

#define M_XBLE (   disp)    M_BRACC(0x00,0x1,0x2,disp,2,1,0) /* branch a<=b */

Definition at line 510 of file codegen.hpp.

#define M_XBLT (   disp)    M_BRACC(0x00,0x1,0x3,disp,2,1,0) /* branch a<b */

Definition at line 508 of file codegen.hpp.

#define M_XBNE (   disp)    M_BRACC(0x00,0x1,0x9,disp,2,1,0) /* branch a!=b */

Definition at line 506 of file codegen.hpp.

#define M_XBUGE (   disp)    M_BRACC(0x00,0x1,0xd,disp,2,1,0) /* br uns a>=b */

Definition at line 511 of file codegen.hpp.

#define M_XBUGT (   disp)    M_BRACC(0x00,0x1,0xc,disp,2,1,0) /* br uns a>b */

Definition at line 512 of file codegen.hpp.

#define M_XBULT (   disp)    M_BRACC(0x00,0x1,0x5,disp,2,1,0) /* br uns a<b */

Definition at line 513 of file codegen.hpp.

#define M_XCMOVEQ (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x1,1,1,0,REG) /* a==b ? rd=rs */

Definition at line 328 of file codegen.hpp.

#define M_XCMOVEQ_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x1,1,1,0,IMM) /* a==b ? rd=rs */

Definition at line 336 of file codegen.hpp.

#define M_XCMOVGE (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0xb,1,1,0,REG) /* a>=b ? rd=rs */

Definition at line 331 of file codegen.hpp.

#define M_XCMOVGE_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0xb,1,1,0,IMM) /* a>=b ? rd=rs */

Definition at line 339 of file codegen.hpp.

#define M_XCMOVGT (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0xa,1,1,0,REG) /* a>b ? rd=rs */

Definition at line 333 of file codegen.hpp.

#define M_XCMOVGT_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0xa,1,1,0,IMM) /* a>b ? rd=rs */

Definition at line 341 of file codegen.hpp.

#define M_XCMOVLE (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x2,1,1,0,REG) /* a<=b ? rd=rs */

Definition at line 332 of file codegen.hpp.

#define M_XCMOVLE_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x2,1,1,0,IMM) /* a<=b ? rd=rs */

Definition at line 340 of file codegen.hpp.

#define M_XCMOVLT (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x3,1,1,0,REG) /* a<b ? rd=rs */

Definition at line 330 of file codegen.hpp.

#define M_XCMOVLT_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x3,1,1,0,IMM) /* a<b ? rd=rs */

Definition at line 338 of file codegen.hpp.

#define M_XCMOVNE (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x9,1,1,0,REG) /* a!=b ? rd=rs */

Definition at line 329 of file codegen.hpp.

#define M_XCMOVNE_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x9,1,1,0,IMM) /* a!=b ? rd=rs */

Definition at line 337 of file codegen.hpp.

#define M_XCMOVULE (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x4,1,1,0,REG) /* a<=b ? rd=rs (u)*/

Definition at line 334 of file codegen.hpp.

#define M_XCMOVULE_IMM (   rs,
  rd 
)    M_FMT4(0x2,0x2c,rd,rs,0x4,1,1,0,IMM) /* a<=b ? rd=rs (u)*/

Definition at line 342 of file codegen.hpp.

#define M_XOR (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x03,rd,rs1,rs2,REG) /* rd = rs1 ^ rs2 */

Definition at line 283 of file codegen.hpp.

#define M_XOR_IMM (   rs1,
  rs2,
  rd 
)    M_OP3(0x02,0x03,rd,rs1,rs2,IMM)

Definition at line 284 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 78 of file codegen.hpp.

#define PASS13BIT (   imm)    ((((s4)(imm)&0x1fff)<<19)>>19)

Definition at line 40 of file codegen.hpp.

#define PATCHER_CALL_INSTRUCTIONS   2 /* number of instructions */

Definition at line 60 of file codegen.hpp.

#define PATCHER_CALL_SIZE   2 * 4 /* size in bytes of a patcher call */

Definition at line 61 of file codegen.hpp.

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

Definition at line 66 of file codegen.hpp.

#define POINTERSHIFT   3 /* x8 */

Definition at line 659 of file codegen.hpp.

#define REG   0

Definition at line 104 of file codegen.hpp.

#define sethi_part (   x)    ((x)>>10)

Definition at line 380 of file codegen.hpp.

#define setlo_part (   x)    ((x) & 0x3ff)

Definition at line 381 of file codegen.hpp.

Function Documentation

bool fits_13 ( s4  disp)

Definition at line 74 of file codegen.cpp.

s4 get_lopart_disp ( s4  disp)

Variable Documentation

s4 nat_argintregs[INT_NATARG_CNT]

Definition at line 47 of file codegen.hpp.