]> git.sur5r.net Git - cc65/blobdiff - src/cc65/codeinfo.h
Fixed a bug
[cc65] / src / cc65 / codeinfo.h
index 55a2e9c18da1cb6675846a626ee887cff49b89b7..7e4eddf983c99c699093e92bc8862fe3f6d0c4bd 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001      Ullrich von Bassewitz                                       */
+/* (C) 2001-2002 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@cc65.org                                                 */
@@ -54,6 +54,9 @@ struct CodeSeg;
 
 
 
+/* Forward to struct RegContents */
+struct RegContents;
+
 /* Defines for registers. */
 #define REG_NONE               0x0000U
 #define REG_A                  0x0001U
@@ -100,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                                    */
 /*****************************************************************************/
@@ -134,6 +154,23 @@ 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. */
 
+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 */