]> git.sur5r.net Git - cc65/commitdiff
Mark RTI as "uses all registers" to avoid problems with the optimizer
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 22 Nov 2003 13:02:37 +0000 (13:02 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 22 Nov 2003 13:02:37 +0000 (13:02 +0000)
removing register loads from an interrupt handler return.

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

src/cc65/opcodes.c

index 7bd8b50322eb887eb4dfc1ae9e858b3107c21e68..3ba541d01a2a3a170632f0f6306782140061bb4b 100644 (file)
@@ -449,11 +449,14 @@ const OPCDesc OPCTable[OPCODE_COUNT] = {
                REG_NONE,                               /* use */
                REG_NONE,                               /* chg */
        OF_SETF                                 /* flags */
-    },
+    },         
+    /* Mark RTI as "uses all registers but doesn't change them", so the
+     * optimizer won't remove preceeding loads.
+     */
     {   OP65_RTI,                                      /* opcode */
                "rti",                                  /* mnemonic */
                1,                                      /* size */
-               REG_NONE,                               /* use */
+               REG_AXY,                                /* use */
                REG_NONE,                               /* chg */
        OF_RET                                  /* flags */
     },