]> git.sur5r.net Git - cc65/blobdiff - src/cc65/coptind.h
Merge remote-tracking branch 'upstream/master' into a5200
[cc65] / src / cc65 / coptind.h
index eb22301e10d12de8952a95720d732a93043c6fdc..509ae00809d5bfb917d94354605355744fd8cc66 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                coptind.h                                 */
+/*                                 coptind.h                                 */
 /*                                                                           */
-/*             Environment independent low level optimizations              */
+/*              Environment independent low level optimizations              */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
@@ -44,7 +44,7 @@
 
 
 /*****************************************************************************/
-/*                                  Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
@@ -89,6 +89,12 @@ unsigned OptJumpTarget2 (CodeSeg* S);
  * it's job is already done.
  */
 
+unsigned OptJumpTarget3 (CodeSeg* S);
+/* Jumps to load instructions of a register, that do already have the matching
+ * register contents may skip the load instruction, since it's job is already
+ * done.
+ */
+
 unsigned OptCondBranches1 (CodeSeg* S);
 /* If an immidiate load of a register is followed by a conditional jump that
  * is never taken because the load of the register sets the flags in such a
@@ -141,10 +147,32 @@ unsigned OptPrecalc (CodeSeg* S);
 unsigned OptBranchDist (CodeSeg* S);
 /* Change branches for the distance needed. */
 
+unsigned OptIndLoads1 (CodeSeg* S);
+/* Change
+ *
+ *     lda      (zp),y
+ *
+ * into
+ *
+ *     lda      (zp,x)
+ *
+ * provided that x and y are both zero.
+ */
 
+unsigned OptIndLoads2 (CodeSeg* S);
+/* Change
+ *
+ *     lda      (zp,x)
+ *
+ * into
+ *
+ *     lda      (zp),y
+ *
+ * provided that x and y are both zero.
+ */
 
-/* End of coptind.h */
-#endif
 
 
+/* End of coptind.h */
 
+#endif