]> git.sur5r.net Git - cc65/blobdiff - src/cc65/codeinfo.h
More optimizations
[cc65] / src / cc65 / codeinfo.h
index d9e1036ed8515089aa01c5e2de45ed35d3477f98..4e0b16887e603c4e9c75d4baca8281d0bea6b18b 100644 (file)
@@ -103,6 +103,23 @@ struct ZPInfo {
 
 
 
+/* Defines for the conditions in a compare */
+typedef enum {
+    CMP_INV = -1,
+    CMP_EQ,
+    CMP_NE,
+    CMP_GT,
+    CMP_GE,
+    CMP_LT,
+    CMP_LE,
+    CMP_UGT,
+    CMP_UGE,
+    CMP_ULT,
+    CMP_ULE
+} cmp_t;
+
+
+
 /*****************************************************************************/
 /*                                          Code                                    */
 /*****************************************************************************/
@@ -137,12 +154,26 @@ int RegYUsed (struct CodeSeg* S, unsigned Index);
 int RegAXUsed (struct CodeSeg* S, unsigned Index);
 /* Check if the value in A or(!) the value in X are used. */
 
+int RegEAXUsed (struct CodeSeg* S, unsigned Index);
+/* Check if any of the four bytes in EAX are used. */
+
 unsigned GetKnownReg (unsigned Use, const struct RegContents* RC);
 /* Return the register or zero page location from the set in Use, thats
  * contents are known. If Use does not contain any register, or if the
  * register in question does not have a known value, return REG_NONE.
  */
 
+cmp_t FindBoolCmpCond (const char* Name);
+/* Check if the given string is the name of one of the boolean transformer
+ * subroutine, and if so, return the condition that is evaluated by this
+ * routine. Return CMP_INV if the condition is not recognised.
+ */
+
+cmp_t FindTosCmpCond (const char* Name);
+/* Check if this is a call to one of the TOS compare functions (tosgtax).
+ * Return the condition code or CMP_INV on failure.
+ */
+
 
 
 /* End of codeinfo.h */