* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / lcc / src / config.h
blob6f0d5a613b2ee8eb1bdbed40d328311eeed8ee66
1 typedef struct {
2 unsigned char max_unaligned_load;
3 Symbol (*rmap)(int);
5 void (*blkfetch)(int size, int off, int reg, int tmp);
6 void (*blkstore)(int size, int off, int reg, int tmp);
7 void (*blkloop)(int dreg, int doff,
8 int sreg, int soff,
9 int size, int tmps[]);
10 void (*_label)(Node);
11 int (*_rule)(void*, int);
12 short **_nts;
13 void (*_kids)(Node, int, Node*);
14 char **_string;
15 char **_templates;
16 char *_isinstruction;
17 char **_ntname;
18 void (*emit2)(Node);
19 void (*doarg)(Node);
20 void (*target)(Node);
21 void (*clobber)(Node);
22 } Xinterface;
23 extern int askregvar(Symbol, Symbol);
24 extern void blkcopy(int, int, int, int, int, int[]);
25 extern int getregnum(Node);
26 extern int mayrecalc(Node);
27 extern int mkactual(int, int);
28 extern void mkauto(Symbol);
29 extern Symbol mkreg(char *, int, int, int);
30 extern Symbol mkwildcard(Symbol *);
31 extern int move(Node);
32 extern int notarget(Node);
33 extern void parseflags(int, char **);
34 extern int range(Node, int, int);
35 extern unsigned regloc(Symbol); /* omit */
36 extern void rtarget(Node, int, Symbol);
37 extern void setreg(Node, Symbol);
38 extern void spill(unsigned, int, Node);
39 extern int widens(Node);
41 extern int argoffset, maxargoffset;
42 extern int bflag, dflag;
43 extern int dalign, salign;
44 extern int framesize;
45 extern unsigned freemask[], usedmask[];
46 extern int offset, maxoffset;
47 extern int swap;
48 extern unsigned tmask[], vmask[];
49 typedef struct {
50 unsigned listed:1;
51 unsigned registered:1;
52 unsigned emitted:1;
53 unsigned copy:1;
54 unsigned equatable:1;
55 unsigned spills:1;
56 unsigned mayrecalc:1;
57 void *state;
58 short inst;
59 Node kids[3];
60 Node prev, next;
61 Node prevuse;
62 short argno;
63 } Xnode;
64 typedef struct {
65 Symbol vbl;
66 short set;
67 short number;
68 unsigned mask;
69 } *Regnode;
70 enum { IREG=0, FREG=1 };
71 typedef struct {
72 char *name;
73 unsigned int eaddr; /* omit */
74 int offset;
75 Node lastuse;
76 int usecount;
77 Regnode regnode;
78 Symbol *wildcard;
79 } Xsymbol;
80 enum { RX=2 };
81 typedef struct {
82 int offset;
83 unsigned freemask[2];
84 } Env;
86 #define LBURG_MAX SHRT_MAX
88 enum { VREG=(44<<4) };
90 /* Exported for the front end */
91 extern void blockbeg(Env *);
92 extern void blockend(Env *);
93 extern void emit(Node);
94 extern Node gen(Node);
96 extern unsigned emitbin(Node, int);
98 #ifdef NDEBUG
99 #define debug(x) (void)0
100 #else
101 #define debug(x) (void)(dflag&&((x),0))
102 #endif