Skip to content

Commit 197d124

Browse files
committed
Highlight: Consider uimm/simm/offset all equivalent
Fixes #33
1 parent eef9598 commit 197d124

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/obj/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ impl ObjInsArg {
6161
| (ppc750cl::Argument::Offset(off), ppc750cl::Argument::Simm(simm)) => {
6262
simm.0 == off.0
6363
}
64+
// Consider Uimm and Offset equivalent
65+
(ppc750cl::Argument::Uimm(uimm), ppc750cl::Argument::Offset(off))
66+
| (ppc750cl::Argument::Offset(off), ppc750cl::Argument::Uimm(uimm)) => {
67+
uimm.0 == off.0 as u16
68+
}
69+
// Consider Uimm and Simm equivalent
70+
(ppc750cl::Argument::Uimm(uimm), ppc750cl::Argument::Simm(simm))
71+
| (ppc750cl::Argument::Simm(simm), ppc750cl::Argument::Uimm(uimm)) => {
72+
uimm.0 == simm.0 as u16
73+
}
6474
_ => false,
6575
}
6676
}

0 commit comments

Comments
 (0)