X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fcoptsize.c;h=9ab398ff6f82dfc63807f6fb062efc8840526a97;hb=c130e597b013e37c94afd6651be1e8859ba7e5ac;hp=6a04240d6640bb0213b20d27766f342bd1860a3e;hpb=42463beaeee70434222da3fd1b43e03319a16503;p=cc65 diff --git a/src/cc65/coptsize.c b/src/cc65/coptsize.c index 6a04240d6..9ab398ff6 100644 --- a/src/cc65/coptsize.c +++ b/src/cc65/coptsize.c @@ -35,10 +35,12 @@ #include +/* 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 */