Pristine Ack-5.5
[Ack-5.5.git] / mach / proto / cg / data.h
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: data.h,v 2.3 1994/06/24 13:23:25 ceriel Exp $ */
6
7 typedef struct {
8         int     t_token;        /* kind of token, -1 for register */
9         union {
10                 word aw;        /* integer type */
11                 string as;      /* string type */
12                 int ar;         /* register type */
13         } t_att[TOKENSIZE];
14 } token_t,*token_p;
15
16 struct reginfo {
17         int     r_repr;                 /* index in string table */
18         int     r_size;                 /* size in bytes */
19 #if MAXMEMBERS!=0
20         int     r_members[MAXMEMBERS];  /* register contained within this reg */
21         short   r_clash[REGSETSIZE];    /* set of clashing registers */
22 #endif
23         int     r_refcount;             /* Times in use */
24         token_t r_contents;             /* Current contents */
25         int     r_tcount;               /* Temporary count difference */
26 };
27
28 #if MAXMEMBERS!=0
29 #define clash(a,b) ((machregs[a].r_clash[(b)>>4]&(1<<((b)&017)))!=0)
30 #else
31 #define clash(a,b) ((a)==(b))
32 #endif
33
34 typedef struct {
35         int     t_size;                 /* size in bytes */
36         cost_t  t_cost;                 /* cost in bytes and time */ 
37         byte    t_type[TOKENSIZE];      /* types of attributes, TT_??? */
38         int     t_format;               /* index of formatstring */
39 } tkdef_t,*tkdef_p;
40
41 struct emline {
42         int     em_instr;
43         int     em_optyp;
44         string  em_soper;
45         union {
46                 word    em_ioper;
47                 long    em_loper;
48         } em_u;
49 };
50
51 #define OPNO 0
52 #define OPINT 1
53 #define OPSYMBOL 2
54
55 typedef struct {
56         int rl_n;       /* number in list */
57         int rl_list[NREGS];
58 } rl_t,*rl_p;