]> git.sur5r.net Git - cc65/blobdiff - src/cc65/reginfo.h
New option --forget-inc-paths
[cc65] / src / cc65 / reginfo.h
index bcf760b1691209ee099f555477a5acd4365b9c02..ad49043d357683a56bfb48fbb34be126c6c62e44 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001      Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2001-2002  Ullrich von Bassewitz                                      */
+/*                Wacholderweg 14                                            */
+/*                D-70597 Stuttgart                                          */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                  Data                                    */
 /*****************************************************************************/
 
 
 
+/* Encoding for an unknown register value */
+#define UNKNOWN_REGVAL  -1
+
 /* Register contents */
 typedef struct RegContents RegContents;
 struct RegContents {
@@ -57,6 +60,7 @@ struct RegContents {
     short       RegY;
     short       SRegLo;
     short       SRegHi;
+    short      Tmp1;
 };
 
 /* Register change info */
@@ -78,6 +82,29 @@ struct RegInfo {
 void RC_Invalidate (RegContents* C);
 /* Invalidate all registers */
 
+void RC_InvalidateZP (RegContents* C);
+/* Invalidate all ZP registers */
+
+#if defined(HAVE_INLINE)
+INLINE int RegValIsKnown (short Val)
+/* Return true if the register value is known */
+{
+    return (Val >= 0);
+}
+#else
+#  define RegValIsKnown(S)      ((S) >= 0)
+#endif
+
+#if defined(HAVE_INLINE)
+INLINE int RegValIsUnknown (short Val)
+/* Return true if the register value is not known */
+{
+    return (Val < 0);
+}
+#else
+#  define RegValIsUnknown(S)      ((S) < 0)
+#endif
+
 RegInfo* NewRegInfo (const RegContents* RC);
 /* Allocate a new register info, initialize and return it. If RC is not
  * a NULL pointer, it is used to initialize both, the input and output
@@ -89,8 +116,11 @@ void FreeRegInfo (RegInfo* RI);
 
 
 
+
+
 /* End of reginfo.h */
 #endif
 
 
 
+