/* bunch of stuff for putting the passes together... */
/* cookies, used as arguments to codgen */
# define FOREFF 01 /* compute for effects only */
# define INAREG 02 /* compute into a register */
# define INTAREG 04 /* compute into a scratch register */
# define INBREG 010 /* compute into a lvalue register */
# define INTBREG 020 /* compute into a scratch lvalue register */
# define FORCC 040 /* compute for condition codes only */
# define INTEMP 010000 /* compute into a temporary location */
# define FORARG 020000 /* compute for an argument of a function */
# define FORREW 040000 /* search the table, looking for a rewrite rule */
/* the ASG operator may be used on some of these */
# define OPSIMP 010000 /* +, -, &, |, ^ */
# define OPCOMM 010002 /* +, &, |, ^ */
# define OPMUL 010004 /* *, / */
# define OPDIV 010006 /* /, % */
# define OPUNARY 010010 /* unary ops */
# define OPLEAF 010012 /* leaves */
# define OPANY 010014 /* any op... */
# define OPLOG 010016 /* logical ops */
# define OPFLOAT 010020 /* +, -, *, or / (for floats) */
# define OPSHFT 010022 /* <<, >> */
# define OPLTYPE 010024 /* leaf type nodes (e.g, NAME, ICON, etc. ) */
# define SANY 01 /* same as FOREFF */
# define SAREG 02 /* same as INAREG */
# define STAREG 04 /* same as INTAREG */
# define SBREG 010 /* same as INBREG */
# define STBREG 020 /* same as INTBREG */
# define SCC 040 /* same as FORCC */
# define SONE (SPECIAL|1)
# define SMONE (SPECIAL|2)
/* FORARG and INTEMP are carefully not conflicting with shapes */
# define TPTRTO 04000 /* pointer to one of the above */
# define TANY 010000 /* matches anything within reason */
# define TSTRUCT 020000 /* structure or union */
/* reclamation cookies */
# define RNULL 0 /* clobber result */
# define RNOP 010000 /* DANGER: can cause loops.. */
# define NASL 04 /* share left register */
# define NASR 010 /* share right register */
# define MUSTDO 010000 /* force register requirements */
# define NOPREF 020000 /* no preference for register assignment */
/* register allocation */
extern struct respref { int cform; int mform; } respref[];
# define isbreg(r) (rstatus[r]&SBREG)
# define istreg(r) (rstatus[r]&(STBREG|STAREG))
# define istnode(p) (p->op==REG && istreg(p->rval))
# define REGLOOP(i) for(i=0;i<REGSZ;++i)
# define SETSTO(x,y) (stotree=(x),stocook=(y))
extern NODE *deltrees[DELAYS];
extern int deli; /* mmmmm */
int label; /* for use with branching */
int stsize; /* sizes of structure objects */
int stalign; /* alignment of structure objects */
extern int nrecur; /* flag to keep track of recursions */
# define NRECUR (10*TREESZ)
extern int fldshf, fldsz;
extern int lflag, xdebug, udebug, edebug, odebug, rdebug, radebug, tdebug, sdebug;
#define callchk(x) allchk()
# define PUTCHAR(x) putchar(x)
/* macros for doing double indexing */
# define R2PACK(x,y) (0200*((x)+1)+y)
# define R2UPK1(x) (((x)>>7)-1)
# define R2UPK2(x) ((x)&0177)
# define R2TEST(x) ((x)>=0200)