/* */
/* */
/* */
-/* (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 {
short RegY;
short SRegLo;
short SRegHi;
+ short Tmp1;
};
/* Register change info */
typedef struct RegInfo RegInfo;
struct RegInfo {
- RegContents In; /* Incoming register values */
- RegContents Out; /* Outgoing register values */
+ RegContents In; /* Incoming register values */
+ RegContents Out; /* Outgoing register values */
+ RegContents Out2; /* Alternative outgoing reg values for branches */
};
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
+
+
/* End of reginfo.h */
#endif
+