[Bug] Fixed push/pop RW instruction data (segment and GP interfering each other)

This commit is contained in:
kobalicek
2023-01-08 13:54:47 +01:00
parent 5c18fcafc5
commit 9f6d677615
2 changed files with 177 additions and 176 deletions

View File

@@ -2195,10 +2195,14 @@ class InstRWInfoTable extends core.Task {
if (op.consecutiveLeadCount)
d.clc = op.consecutiveLeadCount;
if (op.isReg())
d.fixed = GenUtils.fixedRegOf(op.reg);
else
d.fixed = GenUtils.fixedRegOf(op.mem);
// NOTE: Avoid push/pop here as PUSH/POP has many variations for segment registers,
// which would set 'd.fixed' field even for GP variation of the instuction.
if (dbInst.name !== "push" && dbInst.name !== "pop") {
if (op.isReg())
d.fixed = GenUtils.fixedRegOf(op.reg);
else
d.fixed = GenUtils.fixedRegOf(op.mem);
}
if (op.zext)
d.flags.ZExt = true;