From 60471653255c6716f35ba0746234199432e43443 Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 5 Oct 2002 22:55:42 +0000 Subject: [PATCH] Fixed problem with earlier change git-svn-id: svn://svn.cc65.org/cc65/trunk@1445 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/coptind.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc65/coptind.c b/src/cc65/coptind.c index f517088e2..aef3cd162 100644 --- a/src/cc65/coptind.c +++ b/src/cc65/coptind.c @@ -1054,10 +1054,10 @@ unsigned OptTransfers (CodeSeg* S) (N->Info & OF_XFR) != 0) { /* Check if it's a transfer and back */ - if ((E->OPC == OP65_TAX && N->OPC == OP65_TXA && !RegXUsed (S, I+1)) || - (E->OPC == OP65_TAY && N->OPC == OP65_TYA && !RegYUsed (S, I+1)) || - (E->OPC == OP65_TXA && N->OPC == OP65_TAX && !RegAUsed (S, I+1)) || - (E->OPC == OP65_TYA && N->OPC == OP65_TAY && !RegAUsed (S, I+1))) { + if ((E->OPC == OP65_TAX && N->OPC == OP65_TXA && !RegXUsed (S, I+2)) || + (E->OPC == OP65_TAY && N->OPC == OP65_TYA && !RegYUsed (S, I+2)) || + (E->OPC == OP65_TXA && N->OPC == OP65_TAX && !RegAUsed (S, I+2)) || + (E->OPC == OP65_TYA && N->OPC == OP65_TAY && !RegAUsed (S, I+2))) { /* If the next insn is a conditional branch, check if the insn * preceeding the first xfr will set the flags right, otherwise we -- 2.39.5