mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Opt_a_tosicmp likely has a bug which will incorrectly migrate a label on a replaced op in one case.
This commit is contained in:
parent
78263cd24b
commit
4e411e8526
@ -1208,6 +1208,8 @@ static unsigned Opt_a_tosicmp (StackOpData* D)
|
||||
/* RHS src is not directly comparable */
|
||||
X = NewCodeEntry (OP65_STA, AM65_ZP, D->ZPHi, 0, D->OpEntry->LI);
|
||||
InsertEntry (D, X, D->Rhs.A.ChgIndex + 1);
|
||||
/* RHS insertion may have moved the OpIndex, recalculate insertion point to prevent label migration. */
|
||||
D->IP = D->OpIndex + 1;
|
||||
|
||||
/* Cmp with stored RHS */
|
||||
X = NewCodeEntry (OP65_CMP, AM65_ZP, D->ZPHi, 0, D->OpEntry->LI);
|
||||
|
Loading…
Reference in New Issue
Block a user