#define SDCC_SYMNAME_MAX 64
#define SDCC_NAME_MAX 3*SDCC_SYMNAME_MAX // big enough for _<func>_<var>_etc
#include "SDCChasht.h"
+#include "SDCCglobl.h"
enum {
TYPEOF_INT=1,
TYPEOF_EEPPOINTER
};
+// values for first byte of generic pointer.
+#define GPTYPE_NEAR 0
+#define GPTYPE_FAR 1
+#define GPTYPE_CODE 2
+#define GPTYPE_XSTACK 3
+#define GPTYPE_GPTR 4 // Never used?
+#define GPTYPE_IDATA 5
+
#define HASHTAB_SIZE 256
/* hash table bucket */
int argreg; /* reg no for regparm */
union
{ /* Values if constant or enum */
- short int v_int; /* int and char values */
- char *v_char; /* character string */
- unsigned short v_uint; /* unsigned int const value */
- long v_long; /* long constant value */
- unsigned long v_ulong; /* unsigned long constant val */
- double v_float; /* floating point constant value */
+ TYPE_WORD v_int; /* 2 bytes: int and char values */
+ char *v_char; /* character string */
+ TYPE_UWORD v_uint; /* 2 bytes: unsigned int const value */
+ TYPE_DWORD v_long; /* 4 bytes: long constant value */
+ TYPE_UDWORD v_ulong; /* 4 bytes: unsigned long constant val */
+ double v_float; /* floating point constant value */
struct symbol *v_enum; /* ptr 2 enum_list if enum==1 */
}
const_val;
unsigned isref:1; /* has been referenced */
unsigned isind:1; /* is a induction variable */
unsigned isinvariant:1; /* is a loop invariant */
- unsigned isstrlit:1; /* is a string literal */
unsigned cdef:1; /* compiler defined symbol */
unsigned addrtaken:1; /* address of the symbol was taken */
unsigned isreqv:1; /* is the register quivalent of a symbol */
unsigned spildir:1; /* spilt in direct space */
unsigned ptrreg:1; /* this symbol assigned to a ptr reg */
unsigned noSpilLoc:1; /* cannot be assigned a spil location */
+ unsigned isstrlit; /* is a string literal and it's usage count */
unsigned accuse; /* can be left in the accumulator
On the Z80 accuse is devided into
ACCUSE_A and ACCUSE_HL as the idea