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