📄 ppc_isa.h
字号:
#define ppc_op_addis(rd, ra, simm) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:addis rd(%d) ra(%d) simm(%d) ", __FUNCTION__, rd, ra, simm)), \ (PPC_SET_OPCD(15) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_SIMM(simm)))#define ppc_op_addme(rd, ra) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:addme rd(%d) ra(%d) ", __FUNCTION__, rd, ra)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ (0UL << 11) | \ (234UL << 1)))#define ppc_op_addze(rd, ra) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:addze rd(%d) ra(%d) ", __FUNCTION__, rd, ra)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ (0UL << 11) | \ (202UL << 1)))#define ppc_op_and(ra, rs, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:and ra(%d) rs(%d) rb(%d) ", __FUNCTION__, ra, rs, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RA(ra) | \ PPC_SET_RS(rs) | \ PPC_SET_RB(rb) | \ (28UL << 1)))#define ppc_op_andc(ra, rs, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:andc ra(%d) rs(%d) rb(%d) ", __FUNCTION__, ra, rs, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RA(ra) | \ PPC_SET_RS(rs) | \ PPC_SET_RB(rb) | \ (60UL << 1)))#define ppc_op_andi(ra, rs, uimm) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:andi ra(%d) rs(%d) uimm(%d) ", __FUNCTION__, ra, rs, uimm)), \ (PPC_SET_OPCD(28) | \ PPC_SET_RA(ra) | \ PPC_SET_RS(rs) | \ PPC_SET_UIMM(uimm)))#define ppc_op_andis(ra, rs, uimm) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:andis ra(%d) rs(%d) uimm(%d) ", __FUNCTION__, ra, rs, uimm)), \ (PPC_SET_OPCD(29) | \ PPC_SET_RA(ra) | \ PPC_SET_RS(rs) | \ PPC_SET_UIMM(uimm)))#define ppc_op_b(li) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:b li(%d) ", __FUNCTION__, li)), \ (PPC_SET_OPCD(18) | \ PPC_SET_LI(li)))#define ppc_op_bc(bo, bi, bd) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:bc bo(%d) bi(%d) bd(%d) ", __FUNCTION__, bo, bi, bd)), \ (PPC_SET_OPCD(16) | \ PPC_SET_BO(bo) | \ PPC_SET_BI(bi) | \ PPC_SET_BD(bd)))#define ppc_op_bcctr(bo, bi) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:bcctr bo(%d) bi(%d) ", __FUNCTION__, bo, bi)), \ (PPC_SET_OPCD(19) | \ PPC_SET_BO(bo) | \ PPC_SET_BI(bi) | \ (528UL << 1)))#define ppc_op_bctr() \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:bctr ", __FUNCTION__)), \ (PPC_SET_OPCD(19) | \ PPC_SET_BO(20) | \ PPC_SET_BI(0) | \ (528UL << 1)))#define ppc_op_bctrl() \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:bctrl ", __FUNCTION__)), \ (PPC_SET_OPCD(19) | \ PPC_SET_BO(20) | \ PPC_SET_BI(0) | \ (528UL << 1) | \ PPC_OPTION_LK))#define ppc_op_bclr(bo, bi) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:bclr bo(%d) bi(%d) ", __FUNCTION__, bo, bi)), \ (PPC_SET_OPCD(19) | \ PPC_SET_BO(bo) | \ PPC_SET_BI(bi) | \ (16UL << 1)))#define ppc_op_blr() \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:blr ", __FUNCTION__)), \ (PPC_SET_OPCD(19) | \ PPC_SET_BO(20) | \ PPC_SET_BI(0) | \ (16UL << 1)))#define ppc_op_cmp(crfd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:cmp crfd(%d) ra(%d) rb(%d) ", __FUNCTION__, crfd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_CRFD(crfd) | \ (0UL << 22) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ 0))#define ppc_op_cmpi(crfd, ra, simm) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:cmpi crfd(%d) ra(%d) simm(%d) ", __FUNCTION__, crfd, ra, simm)), \ (PPC_SET_OPCD(11) | \ PPC_SET_CRFD(crfd) | \ (0UL << 22) | \ PPC_SET_RA(ra) | \ PPC_SET_SIMM(simm)))#define ppc_op_cmpl(crfd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:cmpl crfd(%d) ra(%d) rb(%d) ", __FUNCTION__, crfd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_CRFD(crfd) | \ (0UL << 22) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (32UL << 1)))#define ppc_op_cmpli(crfd, ra, uimm) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:cmpli crfd(%d) ra(%d) uimm(%d) ", __FUNCTION__, crfd, ra, uimm)), \ (PPC_SET_OPCD(10) | \ PPC_SET_CRFD(crfd) | \ (0UL << 22) | \ PPC_SET_RA(ra) | \ PPC_SET_UIMM(uimm)))#define ppc_op_divw(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:divw rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (491UL << 1)))#define ppc_op_divwu(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:divwu rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (459UL << 1)))#define ppc_op_fabs(frd, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fabs frd(%d) frb(%d) ", __FUNCTION__, frd, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ (0UL << 16) | \ PPC_SET_FRB(frb) | \ (264UL << 1)))#define ppc_op_fadd(frd, fra, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fadd frd(%d) fra(%d) frb(%d) ", __FUNCTION__, frd, fra, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ PPC_SET_FRB(frb) | \ (21UL << 1)))#define ppc_op_fadds(frd, fra, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fadds frd(%d) fra(%d) frb(%d) ", __FUNCTION__, frd, fra, frb)), \ (PPC_SET_OPCD(59) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ PPC_SET_FRB(frb) | \ (21UL << 1)))#define ppc_op_fctiw(frd, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fctiw frd(%d) frb(%d) ", __FUNCTION__, frd, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ (0UL << 16) | \ PPC_SET_FRB(frb) | \ (14UL << 1)))#define ppc_op_fctiwz(frd, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fctiwz frd(%d) frb(%d) ", __FUNCTION__, frd, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ (0UL << 16) | \ PPC_SET_FRB(frb) | \ (15UL << 1)))#define ppc_op_fdiv(frd, fra, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fdiv frd(%d) fra(%d) frb(%d) ", __FUNCTION__, frd, fra, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ PPC_SET_FRB(frb) | \ (18UL << 1)))#define ppc_op_fdivs(frd, fra, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fdivs frd(%d) fra(%d) frb(%d) ", __FUNCTION__, frd, fra, frb)), \ (PPC_SET_OPCD(59) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ PPC_SET_FRB(frb) | \ (18UL << 1)))#define ppc_op_fmul(frd, fra, frc) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fmul frd(%d) fra(%d) frc(%d) ", __FUNCTION__, frd, fra, frc)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ (0UL << 11) | \ PPC_SET_FRC(frc) | \ (25UL << 1)))#define ppc_op_fmuls(frd, fra, frc) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fmuls frd(%d) fra(%d) frc(%d) ", __FUNCTION__, frd, fra, frc)), \ (PPC_SET_OPCD(59) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ (0UL << 11) | \ PPC_SET_FRC(frc) | \ (25UL << 1)))#define ppc_op_fneg(frd, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fneg frd(%d) frb(%d) ", __FUNCTION__, frd, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ (0UL << 16) | \ PPC_SET_FRB(frb) | \ (40UL << 1)))#define ppc_op_frsp(frd, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:frsp frd(%d) frb(%d) ", __FUNCTION__, frd, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ (0UL << 16) | \ PPC_SET_FRB(frb) | \ (12UL << 1)))#define ppc_op_fsub(frd, fra, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fsub frd(%d) fra(%d) frb(%d) ", __FUNCTION__, frd, fra, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ PPC_SET_FRB(frb) | \ (20UL << 1)))#define ppc_op_fsubs(frd, fra, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fsubs frd(%d) fra(%d) frb(%d) ", __FUNCTION__, frd, fra, frb)), \ (PPC_SET_OPCD(59) | \ PPC_SET_FRD(frd) | \ PPC_SET_FRA(fra) | \ PPC_SET_FRB(frb) | \ (20UL << 1)))#define ppc_op_fmr(frd, frb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:fmr frd(%d) frb(%d) ", __FUNCTION__, frd, frb)), \ (PPC_SET_OPCD(63) | \ PPC_SET_FRD(frd) | \ (0UL << 16) | \ PPC_SET_FRB(frb) | \ (72UL << 1)))#define ppc_op_lbz(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lbz rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(34) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lbzu(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lbzu rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(35) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lbzux(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lbzux rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (119UL << 1)))#define ppc_op_lbzx(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lbzx rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (87UL << 1)))#define ppc_op_lfd(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfd rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(50) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lfdu(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfdu rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(51) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lfdux(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfdux rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (631UL << 1)))#define ppc_op_lfdx(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfdx rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (599UL << 1)))#define ppc_op_lfs(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfs rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(48) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lfsu(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfsu rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(49) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lfsux(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfsux rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (567UL << 1)))#define ppc_op_lfsx(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lfsx rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (535UL << 1)))#define ppc_op_lha(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lha rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(42) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lhau(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhau rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(43) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lhaux(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhaux rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (375UL << 1)))#define ppc_op_lhax(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhax rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (343UL << 1)))#define ppc_op_lhbrx(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhbrx rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (790UL << 1)))#define ppc_op_lhz(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhz rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(40) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lhzu(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhzu rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(40) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lhzux(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhzux rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (311UL << 1)))#define ppc_op_lhzx(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lhzx rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (279UL << 1)))#define ppc_op_lmw(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lmw rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(46) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lwz(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lwz rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(32) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lwzu(rd, ra, d) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lwzu rd(%d) ra(%d) d(%d) ", __FUNCTION__, rd, ra, d)), \ (PPC_SET_OPCD(33) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_D(d)))#define ppc_op_lwzux(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lwzux rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (55UL << 1)))#define ppc_op_lwzx(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:lwzx rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (23UL << 1)))#define ppc_op_mfspr(rd, ra, rb) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:mfspr rd(%d) ra(%d) rb(%d) ", __FUNCTION__, rd, ra, rb)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \ PPC_SET_RA(ra) | \ PPC_SET_RB(rb) | \ (339UL << 1)))#define ppc_op_mflr(rd) \ ((void)ppc_op_debug((ppc_op_ctxt, "%s:mflr rd(%d) ", __FUNCTION__, rd)), \ (PPC_SET_OPCD(31) | \ PPC_SET_RD(rd) | \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -