2 * C code generator header
11 #define UNS(x) ((_UNSIGNED_INT)(x))
37 extern int nerror; /* number of hard errors */
38 extern struct table cctab[];
39 extern struct table efftab[];
40 extern struct table regtab[];
41 extern struct table sptab[];
42 extern struct table lsptab[1];
98 extern struct instab instab[];
99 extern struct instab branchtab[];
100 extern int opdope1[];
101 extern char *opntab[];
104 extern struct locnnode sfuncr;
105 extern char *funcbase;
106 extern char *curbase;
107 extern char *coremax;
108 extern struct cnode czero, cone;
109 extern long totspace;
110 extern int regpanic; /* set when SU register alg. fails */
111 extern int panicposs; /* set when there might be need for regpanic */
112 extern jmp_buf jmpbuf;
115 /*struct optab *match();*/
116 /*struct node *optim();*/
117 /*struct node *unoptim();*/
118 /*struct node *pow2();*/
119 /*struct node *tnode();*/
120 /*struct node *sdelay();*/
121 /*struct node *ncopy();*/
122 /*struct node *getblk();*/
123 /*struct node *strfunc();*/
124 /*struct node *isconstant();*/
125 /*struct node *tconst();*/
126 /*struct node *hardlongs();*/
127 /*struct node *lconst();*/
128 /*struct node *acommute();*/
129 /*struct node *lvfield();*/
130 /*struct node *paint();*/
134 * Some special stuff for long comparisons
136 extern int xlab1, xlab2, xop, xzero;
138 #if 1 /* moved here from c12.c */
143 struct tnode *nlist[LSTSIZ];
144 struct node *llist[LSTSIZ+1];
150 #define __P(args) args
157 int main __P((int argc, char *argv[]));
158 struct optab *match __P((struct node *tree, struct table *table, int nrleft, int nocvt));
159 int rcexpr1 __P((struct node *atree, struct table *atable, int reg));
160 int cexpr __P((register struct node *tree, struct table *table, int areg));
161 int reorder __P((struct node **treep, struct table *table, int reg));
162 int sreorder __P((struct node **treep, struct table *table, int reg, int recurf));
163 int delay __P((struct node **treep, struct table *table, int reg));
164 struct node *sdelay __P((struct node **ap));
165 struct node *paint __P((register struct node *tp, register int type));
166 struct nnode *ncopy __P((register struct nnode *p));
167 int chkleaf __P((register struct node *tree, struct table *table, int reg));
168 int comarg __P((register struct node *tree, int *flagp));
169 struct node *strfunc __P((register struct node *tp));
170 void doinit __P((register int type, register struct node *tree));
171 void movreg __P((int r0, int r1, struct node *tree));
174 int degree __P((register struct node *t));
175 void pname __P((register struct node *p, int flag));
176 void pbase __P((register struct nnode *p));
177 int xdcalc __P((register struct node *p, int nrleft));
178 int dcalc __P((register struct node *p, int nrleft));
179 int notcompat __P((register struct node *p, int ast, int deg, int op));
180 int prins __P((int op, int c, struct instab *itable, int lbl));
181 int collcon __P((register struct node *p));
182 int isfloat __P((register struct node *t));
183 int oddreg __P((register struct node *t, register int reg));
184 int arlength __P((int t));
185 void pswitch1 __P((struct swtab *afp, struct swtab *alp, int deflab));
186 void breq __P((int v, int l));
187 int sort __P((struct swtab *afp, struct swtab *alp));
188 int ispow2 __P((register struct tnode *tree));
189 struct tnode *pow2 __P((register struct tnode *tree));
190 void cbranch1 __P((struct node *atree, register int lbl, int cond, register int reg));
191 void branch1 __P((int lbl, int aop, int c));
192 void longrel __P((struct tnode *atree, int lbl, int cond, int reg));
193 int xlongrel __P((int f));
194 void label1 __P((int l));
195 void popstk __P((int a));
196 void werror1 __P((char *s));
197 void error1 __P((char *s, ...));
198 void psoct __P((int an));
199 void getree __P((void));
200 int geti __P((void));
201 void strasg __P((struct tnode *atp));
202 int decref1 __P((register int t));
203 int incref1 __P((register int t));
206 struct node *optim __P((register struct node *tree));
207 struct node *binoptim __P((register struct node *tree));
208 struct node *unoptim __P((register struct node *tree));
209 struct node *lvfield __P((register struct tnode *t));
210 struct node *acommute __P((register struct node *tree));
211 int sideeffects __P((register struct node *tp));
212 void distrib __P((struct acl *list));
213 void squash __P((struct node **p, struct node **maxp));
214 void _const __P((int op, register _INT *vp, _INT v, int type));
215 struct lnode *lconst __P((int op, register struct node *lp, register struct node *rp));
216 void insert __P((int op, register struct node *tree, register struct acl *list));
217 struct tnode *tnode __P((int op, int type, struct node *tr1, struct node *tr2));
218 struct cnode *tconst __P((int val, int type));
219 struct node *getblk __P((int size));
220 int islong __P((int t));
221 struct cnode *isconstant __P((register struct node *t));
222 struct node *hardlongs __P((register struct node *t));
223 int uns __P((struct node *tp));