X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fcodeinfo.h;h=4e0b16887e603c4e9c75d4baca8281d0bea6b18b;hb=b821c2c8ae74aca5346429344034f3c5200e5570;hp=d9e1036ed8515089aa01c5e2de45ed35d3477f98;hpb=1118dd123714136c5a3389f377b0b636db2c1aae;p=cc65 diff --git a/src/cc65/codeinfo.h b/src/cc65/codeinfo.h index d9e1036ed..4e0b16887 100644 --- a/src/cc65/codeinfo.h +++ b/src/cc65/codeinfo.h @@ -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 */