]> git.sur5r.net Git - cc65/commitdiff
Minor improvement in last change
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 15 Aug 2009 13:42:40 +0000 (13:42 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 15 Aug 2009 13:42:40 +0000 (13:42 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4014 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/coptind.c

index bb739a688180db226a7557de9b0a05aced57b112..ae77b6f87bb4feedac440b2bb10ccddefe884524 100644 (file)
@@ -1478,14 +1478,16 @@ unsigned OptTransfers4 (CodeSeg* S)
                  * replace the transfer by a load and remove the initial load.
                  */
                 if ((GetRegInfo (S, I, LoadEntry->Chg) & LoadEntry->Chg) == 0   &&
-                    (LoadEntry->AM == AM65_ABS || LoadEntry->AM == AM65_ZP)   &&
+                    (LoadEntry->AM == AM65_ABS          || 
+                     LoadEntry->AM == AM65_ZP           ||
+                     LoadEntry->AM == AM65_IMM)                                 &&
                     !MemAccess (S, Load+1, Xfer-1, E->Arg)) {
 
                     /* Generate the replacement load insn */
                     CodeEntry* X = 0;
                     switch (XferEntry->OPC) {
 
-                        case OP65_TXA:                
+                        case OP65_TXA:
                         case OP65_TYA:
                             X = NewCodeEntry (OP65_LDA,
                                               LoadEntry->AM,