Better nop handling.
This commit is contained in:
parent
50f53a483e
commit
28ff739449
|
@ -425,14 +425,15 @@ XEDISASMR(orcx, 0x7C000338, X )(InstrData& i, InstrDisasm& d) {
|
|||
|
||||
XEDISASMR(ori, 0x60000000, D )(InstrData& i, InstrDisasm& d) {
|
||||
if (!i.D.RA && !i.D.RT && !i.D.DS) {
|
||||
d.Init("no-op", "OR Immediate", 0);
|
||||
d.Init("nop", "OR Immediate", 0);
|
||||
return d.Finish();
|
||||
} else {
|
||||
d.Init("ori", "OR Immediate", 0);
|
||||
}
|
||||
d.AddRegOperand(InstrRegister::kGPR, i.D.RA, InstrRegister::kWrite);
|
||||
d.AddRegOperand(InstrRegister::kGPR, i.D.RT, InstrRegister::kRead);
|
||||
d.AddUImmOperand(i.D.DS, 2);
|
||||
return d.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
XEDISASMR(oris, 0x64000000, D )(InstrData& i, InstrDisasm& d) {
|
||||
|
|
|
@ -800,6 +800,10 @@ XEEMITTER(orcx, 0x7C000338, X )(PPCFunctionBuilder& f, InstrData& i) {
|
|||
|
||||
XEEMITTER(ori, 0x60000000, D )(PPCFunctionBuilder& f, InstrData& i) {
|
||||
// RA <- (RS) | (i48.0 || UI)
|
||||
if (!i.D.RA && !i.D.RT && !i.D.DS) {
|
||||
f.Nop();
|
||||
return 0;
|
||||
}
|
||||
Value* ra = f.Or(
|
||||
f.LoadGPR(i.D.RT),
|
||||
f.LoadConstant((uint64_t)i.D.DS));
|
||||
|
|
Loading…
Reference in New Issue