reglock draft 1

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-11-04 05:13:48 +00:00
parent 4470c7637f
commit cdbc19e6e3
5 changed files with 146 additions and 99 deletions

View file

@ -258,9 +258,9 @@ struct Context {
base[offset++] = (op |
bitExt(ra.index, 6, 5)
| bitExt(rs.index, 11, 5)
| bitExt(sh, 16, 5)
| bitExt(mb, 21, 4)
| bitExt(me, 26, 4)
| ((sh & 0x1f) << 11)
| ((mb & 0x1f) << 6)
| ((me & 0x1f) << 1)
| bitExt(rc, 31, 1)
);
}
@ -359,6 +359,8 @@ struct Context {
void CMPDI(GPR const rx, uint32_t si) { CMPI(0, 1, rx, si); }
void CMPD(GPR const rx, GPR const ry) { CMP(0, 1, rx, ry); }
void LI(GPR const rx, uint32_t value) { ADDI(rx, R0, value); }
void BLR() {
base[offset++] = 0x4e800020; //BCLR(R0, CR0, R0);
}