Highlight: Consider uimm/simm/offset all equivalent

Fixes #33
This commit is contained in:
Luke Street 2024-01-21 23:48:12 -07:00
parent eef9598e76
commit 197d1247a8
1 changed files with 10 additions and 0 deletions

View File

@ -61,6 +61,16 @@ impl ObjInsArg {
| (ppc750cl::Argument::Offset(off), ppc750cl::Argument::Simm(simm)) => {
simm.0 == off.0
}
// Consider Uimm and Offset equivalent
(ppc750cl::Argument::Uimm(uimm), ppc750cl::Argument::Offset(off))
| (ppc750cl::Argument::Offset(off), ppc750cl::Argument::Uimm(uimm)) => {
uimm.0 == off.0 as u16
}
// Consider Uimm and Simm equivalent
(ppc750cl::Argument::Uimm(uimm), ppc750cl::Argument::Simm(simm))
| (ppc750cl::Argument::Simm(simm), ppc750cl::Argument::Uimm(uimm)) => {
uimm.0 == simm.0 as u16
}
_ => false,
}
}