]> git.sur5r.net Git - cc65/commitdiff
Enable optimization for arithmetic right shift. NOTE: There's a bug lingering
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 11 Jul 2012 20:58:29 +0000 (20:58 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 11 Jul 2012 20:58:29 +0000 (20:58 +0000)
in the shift code optimization which needs fixing.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5780 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/coptstop.c

index fb3e753bc35984cfc7e6f1209a9b6d4128ba7463..4cd57787930592fc55e34674a83a73f81378e33d 100644 (file)
@@ -840,7 +840,7 @@ static unsigned Opt_tosshift (StackOpData* D, const char* Name)
     /* Store the value into the zeropage instead of pushing it */
     ReplacePushByStore (D);
 
-    /* Inline the compare */
+    /* Inline the shift */
     D->IP = D->OpIndex+1;
 
     /* tay */
@@ -1645,10 +1645,7 @@ static const OptFuncDesc FuncTable[] = {
     { "tosaddax",   Opt_tosaddax,  REG_NONE, OP_NONE                    },
     { "tosandax",   Opt_tosandax,  REG_NONE, OP_NONE                    },
     { "tosaslax",   Opt_tosaslax,  REG_NONE, OP_NONE                    },
-#if 0
-    /* Library routine missing */
     { "tosasrax",   Opt_tosasrax,  REG_NONE, OP_NONE                    },
-#endif
     { "toseqax",    Opt_toseqax,   REG_NONE, OP_NONE                    },
     { "tosgeax",    Opt_tosgeax,   REG_NONE, OP_RHS_LOAD_DIRECT         },
     { "tosltax",    Opt_tosltax,   REG_NONE, OP_RHS_LOAD_DIRECT         },