]> git.sur5r.net Git - cc65/blobdiff - src/cc65/coptsize.c
New option --forget-inc-paths
[cc65] / src / cc65 / coptsize.c
index 6a04240d6640bb0213b20d27766f342bd1860a3e..9ab398ff6f82dfc63807f6fb062efc8840526a97 100644 (file)
 
 #include <stdlib.h>
 
+/* common */
+#include "cpu.h"
+
 /* cc65 */
 #include "codeent.h"
 #include "codeinfo.h"
-#include "cpu.h"
 #include "coptsize.h"
 
 
@@ -82,6 +84,8 @@ static const CallDesc CallTable [] = {
     { "pushax",     -1,    0,   -1, "pusha0"        },
     { "pushax",     -1, 0xFF,   -1, "pushaFF"       },
     { "pushaysp",   -1,   -1,    0, "pusha0sp"      },
+    { "pushwidx",   -1,   -1,    1, "pushw"         },
+    { "pushwysp",   -1,   -1,    3, "pushw0sp"      },
     { "staxysp",    -1,   -1,    0, "stax0sp"       },
     { "tosaddax",   -1,    0,   -1, "tosadda0"      },
     { "tosandax",   -1,    0,   -1, "tosanda0"      },
@@ -221,6 +225,7 @@ unsigned OptSize1 (CodeSeg* S)
                 if ((D->A < 0 || D->A == E->RI->In.RegA) &&
                     (D->X < 0 || D->X == E->RI->In.RegX) &&
                     (D->Y < 0 || D->Y == E->RI->In.RegY)) {
+
                     /* Ok, match for all registers */
                     CodeEntry* X;
                     X = NewCodeEntry (E->OPC, E->AM, D->ShortFunc, 0, E->LI);
@@ -229,6 +234,9 @@ unsigned OptSize1 (CodeSeg* S)
 
                     /* Remember that we had changes */
                     ++Changes;
+
+                    /* Done */
+                    break;
                 }
 
                 /* Next table entry, bail out if next entry not valid */