Fix issues #2461. This was always wrong even in cases where it seemed to work.

If it did, it was by coincidence.
This commit is contained in:
Kugel Fuhr
2024-09-03 20:21:48 +02:00
parent 5e5dd1d6c4
commit d996e20c5f
2 changed files with 71 additions and 2 deletions

View File

@@ -1128,8 +1128,10 @@ void AddOpHigh (StackOpData* D, opc_t OPC, LoadInfo* LI, int KeepResult)
InsertEntry (D, X, D->IP++);
}
/* In both cases, we can remove the load */
LI->X.Flags |= LI_REMOVE;
/* If this is the right hand side, we can remove the load. */
if (LI == &D->Rhs) {
LI->X.Flags |= LI_REMOVE;
}
} else {
/* opc zphi */