X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Freginfo.h;h=ad49043d357683a56bfb48fbb34be126c6c62e44;hb=c130e597b013e37c94afd6651be1e8859ba7e5ac;hp=bcf760b1691209ee099f555477a5acd4365b9c02;hpb=0b08eb0e6869a736e3015b161d715c02f6d21bfc;p=cc65 diff --git a/src/cc65/reginfo.h b/src/cc65/reginfo.h index bcf760b16..ad49043d3 100644 --- a/src/cc65/reginfo.h +++ b/src/cc65/reginfo.h @@ -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 */ @@ -44,11 +44,14 @@ /*****************************************************************************/ -/* 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 +