1987-03-09 19:15:41 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
2019-05-10 17:11:54 +00:00
|
|
|
#ifndef DATA_H_
|
|
|
|
#define DATA_H_
|
|
|
|
|
|
|
|
#include "types.h"
|
1984-05-19 11:42:19 +00:00
|
|
|
|
1984-05-18 21:27:39 +00:00
|
|
|
typedef struct {
|
|
|
|
int t_token; /* kind of token, -1 for register */
|
|
|
|
union {
|
|
|
|
word aw; /* integer type */
|
|
|
|
string as; /* string type */
|
|
|
|
int ar; /* register type */
|
|
|
|
} t_att[TOKENSIZE];
|
|
|
|
} token_t,*token_p;
|
|
|
|
|
|
|
|
struct reginfo {
|
|
|
|
int r_repr; /* index in string table */
|
|
|
|
int r_size; /* size in bytes */
|
|
|
|
#if MAXMEMBERS!=0
|
|
|
|
int r_members[MAXMEMBERS]; /* register contained within this reg */
|
|
|
|
short r_clash[REGSETSIZE]; /* set of clashing registers */
|
|
|
|
#endif
|
|
|
|
int r_refcount; /* Times in use */
|
|
|
|
token_t r_contents; /* Current contents */
|
|
|
|
int r_tcount; /* Temporary count difference */
|
|
|
|
};
|
|
|
|
|
|
|
|
#if MAXMEMBERS!=0
|
|
|
|
#define clash(a,b) ((machregs[a].r_clash[(b)>>4]&(1<<((b)&017)))!=0)
|
|
|
|
#else
|
|
|
|
#define clash(a,b) ((a)==(b))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int t_size; /* size in bytes */
|
|
|
|
cost_t t_cost; /* cost in bytes and time */
|
|
|
|
byte t_type[TOKENSIZE]; /* types of attributes, TT_??? */
|
|
|
|
int t_format; /* index of formatstring */
|
|
|
|
} tkdef_t,*tkdef_p;
|
|
|
|
|
|
|
|
struct emline {
|
|
|
|
int em_instr;
|
|
|
|
int em_optyp;
|
|
|
|
string em_soper;
|
|
|
|
union {
|
|
|
|
word em_ioper;
|
|
|
|
long em_loper;
|
|
|
|
} em_u;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define OPNO 0
|
|
|
|
#define OPINT 1
|
|
|
|
#define OPSYMBOL 2
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int rl_n; /* number in list */
|
|
|
|
int rl_list[NREGS];
|
|
|
|
} rl_t,*rl_p;
|
2019-05-10 17:11:54 +00:00
|
|
|
|
|
|
|
#endif /* DATA_H_ */
|