diff --git a/src/alloy/frontend/ppc/ppc_emit_alu.cc b/src/alloy/frontend/ppc/ppc_emit_alu.cc index 3ed1a002b..8ead6733b 100644 --- a/src/alloy/frontend/ppc/ppc_emit_alu.cc +++ b/src/alloy/frontend/ppc/ppc_emit_alu.cc @@ -692,11 +692,6 @@ XEEMITTER(cntlzwx, 0x7C000034, X )(PPCFunctionBuilder& f, InstrData& i) { XEEMITTER(eqvx, 0x7C000238, X )(PPCFunctionBuilder& f, InstrData& i) { // RA <- (RS) == (RB) - - // UNTESTED: ensure this is correct. - XEASSERTALWAYS(); - f.DebugBreak(); - Value* ra = f.Xor(f.LoadGPR(i.X.RT), f.LoadGPR(i.X.RB)); ra = f.Not(ra); if (i.X.Rc) { diff --git a/src/alloy/frontend/ppc/ppc_emit_control.cc b/src/alloy/frontend/ppc/ppc_emit_control.cc index 45b12649b..99540a993 100644 --- a/src/alloy/frontend/ppc/ppc_emit_control.cc +++ b/src/alloy/frontend/ppc/ppc_emit_control.cc @@ -546,6 +546,24 @@ XEEMITTER(mtspr, 0x7C0003A6, XFX)(PPCFunctionBuilder& f, InstrData& i) { return 0; } +// TODO(benvanik): MSR is used for toggling interrupts, and it'd be nice to +// obey that setting. It's usually guarding atomic stores. + +XEEMITTER(mfmsr, 0x7C0000A6, X )(PPCFunctionBuilder& f, InstrData& i) { + f.Nop(); + return 0; +} + +XEEMITTER(mtmsr, 0x7C000124, X )(PPCFunctionBuilder& f, InstrData& i) { + f.Nop(); + return 0; +} + +XEEMITTER(mtmsrd, 0x7C000164, X )(PPCFunctionBuilder& f, InstrData& i) { + f.Nop(); + return 0; +} + void RegisterEmitCategoryControl() { XEREGISTERINSTR(bx, 0x48000000); @@ -571,6 +589,9 @@ void RegisterEmitCategoryControl() { XEREGISTERINSTR(mftb, 0x7C0002E6); XEREGISTERINSTR(mtcrf, 0x7C000120); XEREGISTERINSTR(mtspr, 0x7C0003A6); + XEREGISTERINSTR(mfmsr, 0x7C0000A6); + XEREGISTERINSTR(mtmsr, 0x7C000124); + XEREGISTERINSTR(mtmsrd, 0x7C000164); }