wiithon.ppc.instructions module
- wiithon.ppc.instructions.b(target, from_addr)[source]
b target - unconditional relative branch, no link
- wiithon.ppc.instructions.bl(target, from_addr)[source]
bl target - unconditional relative branch with link (saves return address in LR)
- wiithon.ppc.instructions.bc(bo, bi, target, from_addr)[source]
bc bo, bi, target - conditional relative branch, no link
- wiithon.ppc.instructions.bcl(bo, bi, target, from_addr)[source]
bcl bo, bi, target - conditional relative branch with link
- wiithon.ppc.instructions.cmp(crfD, rA, rB, l=0)[source]
cmp crfD, rA, rB - signed integer compare; result written to CR field crfD
- wiithon.ppc.instructions.cmpi(crfD, rA, imm, l=0)[source]
cmpi crfD, rA, imm - signed compare immediate; result written to CR field crfD
- wiithon.ppc.instructions.lis(rD, imm)[source]
lis rD, imm - load immediate shifted left 16 (accepts signed or unsigned 16-bit)
- wiithon.ppc.instructions.addi(rD, rA, imm)[source]
addi rD, rA, imm - add signed 16-bit immediate; rA=r0 reads as 0
- wiithon.ppc.instructions.addis(rD, rA, imm)[source]
addis rD, rA, imm - add immediate shifted; imm is placed in the high halfword
- wiithon.ppc.instructions.mulli(rD, rA, imm)[source]
mulli rD, rA, imm - multiply rA by signed 16-bit immediate, store low 32 bits
- wiithon.ppc.instructions.lwz(rD, offset, rA)[source]
lwz rD, offset(rA) - load word and zero-extend from effective address
- wiithon.ppc.instructions.stw(rS, offset, rA)[source]
stw rS, offset(rA) - store 32-bit word to effective address
- wiithon.ppc.instructions.lbz(rD, offset, rA)[source]
lbz rD, offset(rA) - load byte and zero-extend
- wiithon.ppc.instructions.stb(rS, offset, rA)[source]
stb rS, offset(rA) - store byte (low 8 bits of rS)
- wiithon.ppc.instructions.lhz(rD, offset, rA)[source]
lhz rD, offset(rA) - load halfword and zero-extend
- wiithon.ppc.instructions.sth(rS, offset, rA)[source]
sth rS, offset(rA) - store halfword (low 16 bits of rS)
- wiithon.ppc.instructions.ori(rA, rS, imm)[source]
ori rA, rS, imm - bitwise OR with unsigned 16-bit immediate
- wiithon.ppc.instructions.oris(rA, rS, imm)[source]
oris rA, rS, imm - bitwise OR with unsigned 16-bit immediate shifted
- wiithon.ppc.instructions.andi(rA, rS, imm)[source]
andi. rA, rS, imm - rA = rS & imm (unsigned 16-bit); always updates CR0
- wiithon.ppc.instructions.lfs(frD, offset, rA)[source]
lfs frD, offset(rA) - load single-precision float, convert to double in frD
- wiithon.ppc.instructions.stfs(frS, offset, rA)[source]
stfs frS, offset(rA) - convert frS to single precision and store to memory
- wiithon.ppc.instructions.rlwnm(rA, rS, rB, mb, me)[source]
rlwnm rA, rS, rB, MB, ME - rotate rS left by rB bits, AND with mask(MB, ME), store in rA
- wiithon.ppc.instructions.mfspr(rD, spr)[source]
mfspr rD, spr - move from special-purpose register into rD
- wiithon.ppc.instructions.mtspr(spr, rS)[source]
mtspr spr, rS - move rS into special-purpose register