xref: /original-bsd/old/pcc/ccom.vax/table.c (revision 671fe2c7)
1 #ifndef lint
2 static char *sccsid ="@(#)table.c	1.33 (Berkeley) 05/11/88";
3 #endif lint
4 
5 # include "pass2.h"
6 
7 # define WPTR TPTRTO|TINT|TLONG|TFLOAT|TDOUBLE|TPOINT|TUNSIGNED|TULONG
8 # define AWD SNAME|SOREG|SCON|STARNM|STARREG
9 /* tbl */
10 # define ANYSIGNED TPOINT|TINT|TLONG|TSHORT|TCHAR
11 # define ANYUSIGNED TUNSIGNED|TULONG|TUSHORT|TUCHAR
12 # define ANYFIXED ANYSIGNED|ANYUSIGNED
13 # define TWORD TINT|TUNSIGNED|TPOINT|TLONG|TULONG
14 # define NIAWD SNAME|SCON|STARNM
15 /* tbl */
16 
17 struct optab  table[] = {
18 
19 	/* the following entry is to fix a problem with
20 	   the manner that the first pass handles the
21 	   type of a shift expression                 */
22 PCONV,	INAREG|INTAREG,
23 	SAREG|AWD,	TINT|TUNSIGNED,
24 	SANY,	TPOINT,
25 		NAREG|NASL,	RLEFT,
26 		"",
27 
28 #if defined(FORT) || defined(SPRECC)
29 SCONV,	INTAREG|FORCC,
30 	SAREG|AWD,	TDOUBLE,
31 	SANY,	TFLOAT,
32 		NAREG|NASL,	RESC1|RESCC,
33 		"	cvtdf	AL,A1\n",
34 
35 SCONV,	INTAREG|FORCC,
36 	SAREG|AWD,	ANYSIGNED,
37 	SANY,	TFLOAT,
38 		NAREG|NASL,	RESC1|RESCC,
39 		"	cvtZLf	AL,TA1\n",
40 #endif
41 
42 /* take care of redundant conversions introduced by reclaim() */
43 SCONV,	INTAREG,
44 	STAREG,	TWORD,
45 	SANY,	TWORD,
46 		0,	RLEFT,
47 		"",
48 
49 SCONV,	INTAREG,
50 	STAREG,	TDOUBLE,
51 	SANY,	TDOUBLE,
52 		0,	RLEFT,
53 		"",
54 
55 SCONV,	INTAREG|FORCC,
56 	SAREG|AWD,	TANY,
57 	SANY,	TANY,
58 		NAREG|NASL,	RESC1|RESCC,
59 		"	ZA\n",
60 
61 SCONV,	FORARG,
62 	SAREG|AWD,	TANY,
63 	SANY,	TANY,
64 		NAREG|NASL,	RNULL,
65 		"	ZV\n",
66 
67 INIT,	FOREFF,
68 	SCON,	TANY,
69 	SANY,	TWORD,
70 		0,	RNOP,
71 		"	.long	CL\n",
72 
73 INIT,	FOREFF,
74 	SCON,	TANY,
75 	SANY,	TSHORT|TUSHORT,
76 		0,	RNOP,
77 		"	.word	CL\n",
78 
79 INIT,	FOREFF,
80 	SCON,	TANY,
81 	SANY,	TCHAR|TUCHAR,
82 		0,	RNOP,
83 		"	.byte	CL\n",
84 
85 #ifdef FORT
86 	/* for the use of fortran only */
87 
88 GOTO,	FOREFF,
89 	SCON,	TANY,
90 	SANY,	TANY,
91 		0,	RNOP,
92 		"	jbr	CL\n",
93 #endif
94 
95 GOTO,	FOREFF,
96 	SNAME|SOREG,	TANY,
97 	SANY,	TANY,
98 		0,	RNOP,
99 		"	jmp	*AL\n",
100 
101 GOTO,	FOREFF,
102 	SAREG,	TANY,
103 	SANY,	TANY,
104 		0,	RNOP,
105 		"	jmp	(AL)\n",
106 
107 STARG,	FORARG,
108 	SCON|SOREG,	TANY,
109 	SANY,	TANY,
110 		0,	RNULL,
111 		"	subl2	ZT,sp\nZS",
112 
113 STASG,	FOREFF,
114 	SNAME|SOREG,	TANY,
115 	SCON|SAREG,	TANY,
116 		0,	RNOP,
117 		"ZS",
118 
119 STASG,	INAREG,
120 	SNAME|SOREG,	TANY,
121 	SCON,	TANY,
122 		NAREG,	RESC1,
123 		"ZS	movl	AR,A1\n",
124 
125 STASG,	INAREG,
126 	SNAME|SOREG,	TANY,
127 	SAREG,	TANY,
128 		0,	RRIGHT,
129 		"	pushl	AR\nZS	movl	(sp)+,AR\n",
130 
131 FLD,	INAREG|INTAREG,
132 	SANY,	TANY,
133 	SFLD,	ANYSIGNED,
134 		NAREG|NASR,	RESC1,
135 		"	extv	$H,$S,AR,A1\n",
136 
137 FLD,	INAREG|INTAREG,
138 	SANY,	TANY,
139 	SFLD,	ANYUSIGNED,
140 		NAREG|NASR,	RESC1,
141 		"	extzv	$H,$S,AR,A1\n",
142 
143 FLD,	FORARG,
144 	SANY,	TANY,
145 	SFLD,	ANYSIGNED,
146 		0,	RNULL,
147 		"	extv	$H,$S,AR,-(sp)\n",
148 
149 FLD,	FORARG,
150 	SANY,	TANY,
151 	SFLD,	ANYUSIGNED,
152 		0,	RNULL,
153 		"	extzv	$H,$S,AR,-(sp)\n",
154 
155 OPLOG,	FORCC,
156 	SAREG|AWD,	TWORD,
157 	SAREG|AWD,	TWORD,
158 		0,	RESCC,
159 		"	cmpl	AL,AR\nZP",
160 
161 OPLOG,	FORCC,
162 	SAREG|AWD,	TSHORT,
163 	SAREG|AWD,	TSHORT,
164 		0,	RESCC,
165 		"	cmpw	AL,AR\nZP",
166 
167 OPLOG,	FORCC,
168 	SAREG|AWD,	TUSHORT,
169 	SAREG|AWD,	TUSHORT,
170 		0,	RESCC,
171 		"	cmpw	AL,AR\nZP",
172 
173 OPLOG,	FORCC,
174 	SAREG|AWD,	TCHAR,
175 	SAREG|AWD,	TCHAR,
176 		0,	RESCC,
177 		"	cmpb	AL,AR\nZP",
178 
179 OPLOG,	FORCC,
180 	SAREG|AWD,	TUCHAR,
181 	SAREG|AWD,	TUCHAR,
182 		0,	RESCC,
183 		"	cmpb	AL,AR\nZP",
184 
185 /* optim2() handles degenerate comparisons with constants */
186 OPLOG,	FORCC,
187 	SAREG|AWD,	TCHAR|TUCHAR|TSHORT|TUSHORT,
188 	SCON,	ANYFIXED,
189 		0,	RESCC,
190 		"	cmpZL	AL,AR\nZP",
191 
192 OPLOG,	FORCC,
193 	SAREG|AWD,	TDOUBLE,
194 	SAREG|AWD,	TDOUBLE,
195 		0,	RESCC,
196 		"	cmpd	AL,AR\nZP",
197 
198 OPLOG,	FORCC,
199 	SAREG|AWD,	TFLOAT,
200 	SAREG|AWD,	TFLOAT,
201 		0,	RESCC,
202 		"	cmpf	AL,AR\nZP",
203 
204 #ifdef FORT
205 /* this really ought to be taken care of farther upstream... XXX */
206 OPLOG,	FORCC,
207 	SAREG|AWD,	TFLOAT,
208 	SAREG|AWD,	TDOUBLE,
209 		NAREG|NASL,	RESCC,
210 		"	cvtfd	AL,A1\n	cmpd	A1,AR\nZP",
211 
212 OPLOG,	FORCC,
213 	SAREG|AWD,	TDOUBLE,
214 	SAREG|AWD,	TFLOAT,
215 		NAREG|NASR,	RESCC,
216 		"	cvtfd	AR,A1\n	cmpd	AL,A1\nZP",
217 #endif
218 
219 CCODES,	INAREG|INTAREG,
220 	SANY,	TANY,
221 	SANY,	TANY,
222 		NAREG,	RESC1,
223 		"	movl	$1,A1\nZN",
224 
225 UNARY CALL,	INTAREG,
226 	SCON,	TANY,
227 	SANY,	TWORD|TCHAR|TUCHAR|TSHORT|TUSHORT|TFLOAT|TDOUBLE,
228 		NAREG|NASL,	RESC1,
229 		"	calls	ZC,CL\n",
230 
231 UNARY CALL,	INTAREG,
232 	SAREG,	TANY,
233 	SANY,	TWORD|TCHAR|TUCHAR|TSHORT|TUSHORT|TFLOAT|TDOUBLE,
234 		NAREG|NASL,	RESC1,	/* should be 0 */
235 		"	calls	ZC,(AL)\n",
236 
237 UNARY CALL,	INAREG|INTAREG,
238 	SNAME,	TANY,
239 	SANY,	TANY,
240 		NAREG|NASL,	RESC1,	/* really reg 0 */
241 		"	calls	ZC,*AL\n",
242 
243 UNARY CALL,	INAREG|INTAREG,
244 	SSOREG,	TANY,
245 	SANY,	TANY,
246 		NAREG|NASL,	RESC1,	/* really reg 0 */
247 		"	calls	ZC,*AL\n",
248 
249 ASG RS,	INAREG|FOREFF|FORCC,
250 	SAREG,	TWORD,
251 	SCON,	TINT|TUNSIGNED,
252 		0,	RLEFT|RESCC,
253 		"	extzv	AR,ZU,AL,AL\n",
254 
255 ASG RS,	INAREG|FOREFF|FORCC,
256 	SAREG,	TWORD,
257 	SAREG,	ANYFIXED,
258 		NAREG,	RLEFT|RESCC,
259 		"	subl3	AR,$32,A1\n	extzv	AR,A1,AL,AL\n",
260 
261 ASG RS,	INAREG|FOREFF|FORCC,
262 	SAREG,	TWORD,
263 	SAREG|AWD,	TWORD,
264 		NAREG,	RLEFT|RESCC,
265 		"	subl3	AR,$32,A1\n	extzv	AR,A1,AL,AL\n",
266 
267 RS,	INAREG|INTAREG|FORCC,
268 	SAREG,	TWORD,
269 	SCON,	TINT|TUNSIGNED,
270 		NAREG|NASL,	RESC1|RESCC,
271 		"	extzv	AR,ZU,AL,A1\n",
272 
273 ASG LS,	INAREG|FOREFF|FORCC,
274 	SAREG|AWD,	TWORD,
275 	SAREG|NIAWD,	ANYSIGNED|ANYUSIGNED,
276 		0,	RLEFT|RESCC,
277 		"	ashl	AR,AL,AL\n",
278 
279 ASG LS,	INAREG|FOREFF|FORCC,
280 	SAREG|AWD,	TWORD,
281 	SSOREG,	ANYSIGNED|ANYUSIGNED,
282 		0,	RLEFT|RESCC,
283 		"	ashl	AR,AL,AL\n",
284 
285 ASG LS,	INAREG|FOREFF|FORCC,
286 	SAREG|AWD,	TWORD,
287 	SOREG,	ANYSIGNED|ANYUSIGNED,
288 		NAREG,	RLEFT|RESCC,
289 		"	ZB	AR,A1\n	ashl	A1,AL,AL\n",
290 
291 LS,	INAREG|INTAREG|FORCC,
292 	SAREG|AWD,	TWORD,
293 	SAREG|NIAWD,	ANYSIGNED|ANYUSIGNED,
294 		NAREG|NASL|NASR,	RESC1|RESCC,
295 		"	ashl	AR,AL,A1\n",
296 
297 LS,	INAREG|INTAREG|FORCC,
298 	SAREG|AWD,	TWORD,
299 	SSOREG,	ANYSIGNED|ANYUSIGNED,
300 		NAREG|NASL|NASR,	RESC1|RESCC,
301 		"	ashl	AR,AL,A1\n",
302 
303 LS,	INAREG|INTAREG|FORCC,
304 	SAREG|AWD,	TWORD,
305 	SOREG,	ANYSIGNED|ANYUSIGNED,
306 		NAREG|NASR,	RESC1|RESCC,
307 		"	ZB	AR,A1\n	ashl	A1,AL,A1\n",
308 
309 INCR,	FOREFF,
310 	SAREG|AWD,	TANY,
311 	SCON|SNAME,	TANY,
312 		0,	RLEFT,
313 		"	ZE\n",
314 
315 DECR,	FOREFF,
316 	SAREG|AWD,	TANY,
317 	SCON|SNAME,	TANY,
318 		0,	RLEFT,
319 		"	ZE\n",
320 
321 INCR,	INAREG|INTAREG,
322 	SAREG|AWD,	TANY,
323 	SCON|SNAME,	TANY,
324 		NAREG,	RESC1,
325 		"	ZD\n",
326 
327 DECR,	INAREG|INTAREG,
328 	SAREG|AWD,	TANY,
329 	SCON|SNAME,	TANY,
330 		NAREG,	RESC1,
331 		"	ZD\n",
332 
333 ASSIGN,	INAREG|FOREFF|FORCC,
334 	SAREG|AWD,	TFLOAT|TDOUBLE,
335 	SAREG|AWD,	TUCHAR|TUSHORT,
336 		NAREG|NASR,	RLEFT|RESCC,
337 		"	ZA\n",
338 
339 ASSIGN,	INAREG|FOREFF|FORCC,
340 	SAREG|AWD,	TANY,
341 	SAREG|AWD,	TANY,
342 		0,	RLEFT|RESCC,
343 		"	ZA\n",
344 
345 ASSIGN,	FOREFF,
346 	SFLD,	TANY,
347 	SAREG|AWD,	TWORD,
348 		0,	RNOP,
349 		"	insv	AR,$H,$S,AL\n",
350 
351 ASSIGN,	INAREG,
352 	SFLD,	ANYSIGNED,
353 	SAREG|AWD,	TWORD,
354 		NAREG,	RESC1,
355 		"	insv	AR,$H,$S,AL\n	extv	$H,$S,AL,A1\n",
356 
357 ASSIGN,	INAREG,
358 	SFLD,	ANYUSIGNED,
359 	SAREG|AWD,	TWORD,
360 		NAREG,	RESC1,
361 		"	insv	AR,$H,$S,AL\n	extzv	$H,$S,AL,A1\n",
362 
363 ASSIGN,	INAREG|FOREFF|FORCC,
364 	SAREG|AWD,	TWORD,
365 	SFLD,	ANYSIGNED,
366 		0,	RLEFT|RESCC,
367 		"	extv	$H,$S,AR,AL\n",
368 
369 ASSIGN,	INAREG|FOREFF|FORCC,
370 	SAREG|AWD,	TWORD,
371 	SFLD,	ANYUSIGNED,
372 		0,	RLEFT|RESCC,
373 		"	extzv	$H,$S,AR,AL\n",
374 
375 /* dummy UNARY MUL entry to get U* to possibly match OPLTYPE */
376 UNARY MUL,	FOREFF,
377 	SCC,	TANY,
378 	SCC,	TANY,
379 		0,	RNULL,
380 		"	HELP HELP HELP\n",
381 
382 OREG,	INTEMP,
383 	SANY,	TANY,
384 	SOREG,	TDOUBLE,
385 		2*NTEMP,	RESC1,
386 		"	movq	AR,A1\n",
387 
388 OREG,	INTEMP,
389 	SANY,	TANY,
390 	SOREG,	TANY,
391 		NTEMP,	RESC1,
392 		"	movZR	AR,A1\n",
393 
394 REG,	INTEMP,
395 	SANY,	TANY,
396 	SAREG,	TDOUBLE,
397 		2*NTEMP,	RESC1,
398 		"	movq	AR,A1\n",
399 
400 REG,	INTEMP,
401 	SANY,	TANY,
402 	SAREG,	TANY,
403 		NTEMP,	RESC1,
404 		"	movZF	AR,A1\n",
405 
406 #if defined(FORT) || defined(SPRECC)
407 REG,	FORARG,
408 	SANY,	TANY,
409 	SAREG,	TFLOAT,
410 		0,	RNULL,
411 		"	cvtfd	AR,-(sp)\n",
412 
413 REG,	FORARG,
414 	SANY,	TANY,
415 	SAREG,	TDOUBLE,
416 		0,	RNULL,
417 		"	movq	AR,-(sp)\n",
418 #endif
419 
420 OPLEAF,	FOREFF,
421 	SANY,	TANY,
422 	SAREG|AWD,	TANY,
423 		0,	RLEFT,
424 		"",
425 
426 OPLTYPE,	INAREG|INTAREG,
427 	SANY,	TANY,
428 	SANY,	TANY,
429 		NAREG|NASR,	RESC1,
430 		"	ZA\n",
431 
432 OPLTYPE,	FORCC,
433 	SANY,	TANY,
434 	SANY,	TANY,
435 		0,	RESCC,
436 		"	tstZR	AR\n",
437 
438 OPLTYPE,	FORARG,
439 	SANY,	TANY,
440 	SANY,	TANY,
441 		0,	RNULL,
442 		"	ZV\n",
443 
444 #if defined(FORT) || defined(SPRECC)
445 UNARY MINUS,	INTAREG|FORCC,
446 	SAREG|AWD,	TFLOAT,
447 	SANY,	TANY,
448 		NAREG|NASL,	RESC1|RESCC,
449 		"	mnegZL	TAL,A1\n",
450 
451 #endif
452 
453 UNARY MINUS,	INTAREG|FORCC,
454 	SAREG|AWD,	TWORD|TDOUBLE,
455 	SANY,	TANY,
456 		NAREG|NASL,	RESC1|RESCC,
457 		"	mnegZL	AL,A1\n",
458 
459 COMPL,	INTAREG|FORCC,
460 	SAREG|AWD,	TWORD,
461 	SANY,	TANY,
462 		NAREG|NASL,	RESC1|RESCC,
463 		"	mcomZL	AL,A1\n",
464 
465 AND,	FORCC,
466 	SAREG|AWD,	TCHAR|TSHORT,
467 	SCON,	ANYFIXED,
468 		NAREG|NASL,	RESCC,
469 		"	ZZ\n",
470 
471 AND,	FORCC,
472 	SAREG|AWD,	TWORD|ANYUSIGNED,
473 	SCON,	ANYFIXED,
474 		0,	RESCC,
475 		"	ZZ\n",
476 
477 ASG AND,	INAREG|FOREFF|FORCC,
478 	SAREG,	TWORD,
479 	SCON,	TWORD,
480 		0,	RLEFT|RESCC,
481 		"	bicl2	AR,AL\n",
482 
483 /* General cases for DIV and ASG DIV are handled below with OPMUL */
484 /* Some special cases are handled in optim2() */
485 
486 DIV,	INAREG|FOREFF|FORCC,
487 	SAREG|AWD,	TUNSIGNED|TULONG,
488 	SCON,	ANYUSIGNED,
489 		NAREG|NEVEN,	RESC1|RESCC,
490 		"	movl	AL,A1\n	clrl	U1\n	ediv	AR,A1,A1,U1\n",
491 
492 ASG DIV,	INAREG|FOREFF|FORCC,
493 	SAREG|AWD,	TINT|TLONG|TUNSIGNED|TULONG,
494 	SMCON,	ANYUSIGNED,
495 		0,	RLEFT|RESCC,
496 		"	ZJ\n",
497 
498 ASG DIV,	INAREG|FOREFF|FORCC,
499 	SAREG|AWD,	TINT|TLONG|TUNSIGNED|TULONG,
500 	SCON,	ANYUSIGNED,
501 		NAREG|NEVEN,	RLEFT|RESCC,
502 		"	movl	AL,A1\n	clrl	U1\n	ediv	AR,A1,AL,U1\n",
503 
504 MOD,	INAREG|INTAREG,
505 	SAREG|AWD,	TINT|TLONG,
506 	SAREG|AWD,	TINT|TLONG,
507 		NAREG,	RESC1,
508 		"	divl3	AR,AL,A1\n	mull2	AR,A1\n	subl3	A1,AL,A1\n",
509 
510 MOD,	INAREG|FOREFF,
511 	SAREG|AWD,	TUNSIGNED|TULONG,
512 	SMCON,	ANYUSIGNED,
513 		NAREG|NASL,	RLEFT|RESC1,
514 		"	ZJ\n",
515 
516 MOD,	INAREG|FOREFF,
517 	SAREG|AWD,	TUNSIGNED|TULONG,
518 	SCON,	ANYUSIGNED,
519 		NAREG|NEVEN,	RESC1,
520 		"	movl	AL,A1\n	clrl	U1\n	ediv	AR,A1,U1,A1\n",
521 
522 /* should only see UNSIGNED lhs here if converted from UCHAR/USHORT lhs */
523 ASG MOD,	INAREG|FOREFF|FORCC,
524 	SAREG|AWD,	TINT|TLONG|TUNSIGNED|TULONG,
525 	SAREG|AWD,	TINT|TLONG,
526 		NAREG,	RLEFT|RESCC,
527 		"	divl3	AR,AL,A1\n	mull2	AR,A1\n	subl2	A1,AL\n",
528 
529 ASG MOD,	INAREG|FOREFF,
530 	SAREG|AWD,	TINT|TLONG|TUNSIGNED|TULONG,
531 	SMCON,	ANYUSIGNED,
532 		0,	RLEFT,
533 		"	ZJ\n",
534 
535 ASG MOD,	INAREG|FOREFF,
536 	SAREG|AWD,	TINT|TLONG|TUNSIGNED|TULONG,
537 	SCON,	ANYUSIGNED,
538 		NAREG|NEVEN,	RLEFT,
539 		"	movl	AL,A1\n	clrl	U1\n	ediv	AR,A1,A1,AL\n",
540 
541 ASG OPMUL,	INAREG|FOREFF|FORCC,
542 	SAREG|AWD,	TINT|TUNSIGNED|TLONG|TULONG,
543 	SAREG|AWD,	TINT|TUNSIGNED|TLONG|TULONG,
544 		0,	RLEFT|RESCC,
545 		"	OL2	AR,AL\n",
546 
547 OPMUL,	INAREG|INTAREG|FORCC,
548 	STAREG,	TINT|TUNSIGNED|TLONG|TULONG,
549 	SAREG|AWD,	TINT|TUNSIGNED|TLONG|TULONG,
550 		0,	RLEFT|RESCC,
551 		"	OL2	AR,AL\n",
552 
553 OPMUL,	INAREG|INTAREG|FORCC,
554 	SAREG|AWD,	TINT|TUNSIGNED|TLONG|TULONG,
555 	SAREG|AWD,	TINT|TUNSIGNED|TLONG|TULONG,
556 		NAREG|NASL|NASR,	RESC1|RESCC,
557 		"	OL3	AR,AL,A1\n",
558 
559 ASG PLUS,	INAREG|FOREFF|FORCC,
560 	SAREG|AWD,	ANYFIXED,
561 	SONE,	TANY,
562 		0,	RLEFT|RESCC,
563 		"	incZL	AL\n",
564 
565 ASG MINUS,	INAREG|FOREFF|FORCC,
566 	SAREG|AWD,	ANYFIXED,
567 	SONE,	TANY,
568 		0,	RLEFT|RESCC,
569 		"	decZL	AL\n",
570 
571 PLUS,	INAREG|INTAREG|FORCC,
572 	STAREG,	TWORD,
573 	SONE,	TWORD,
574 		0,	RLEFT|RESCC,
575 		"	incZL	AL\n",
576 
577 MINUS,	INAREG|INTAREG|FORCC,
578 	STAREG,	TWORD,
579 	SONE,	TWORD,
580 		0,	RLEFT|RESCC,
581 		"	decZL	AL\n",
582 
583 ASG OPSIMP,	INAREG|FOREFF|FORCC,
584 	SAREG|AWD,	TWORD,
585 	SAREG|AWD,	TWORD,
586 		0,	RLEFT|RESCC,
587 		"	OL2	AR,AL\n",
588 
589 ASG OPSIMP,	INAREG|FOREFF|FORCC,
590 	AWD,	TSHORT|TUSHORT,
591 	SAREG|SNAME|STARNM,	TSHORT|TUSHORT|TINT|TUNSIGNED|TLONG|TULONG,
592 		0,	RLEFT|RESCC,
593 		"	OW2	AR,AL\n",
594 
595 ASG OPSIMP,	INAREG|FOREFF|FORCC,
596 	AWD,	TSHORT|TUSHORT,
597 	SSOREG,	TSHORT|TUSHORT|TINT|TUNSIGNED|TLONG|TULONG,
598 		0,	RLEFT|RESCC,
599 		"	OW2	AR,AL\n",
600 
601 ASG OPSIMP,	INAREG|FOREFF|FORCC,
602 	AWD,	TSHORT|TUSHORT,
603 	SSCON,	ANYFIXED,
604 		0,	RLEFT|RESCC,
605 		"	OW2	AR,AL\n",
606 
607 ASG OPSIMP,	INAREG|FOREFF|FORCC,
608 	AWD,	TSHORT|TUSHORT,
609 	AWD,	TSHORT|TUSHORT,
610 		0,	RLEFT|RESCC,
611 		"	OW2	AR,AL\n",
612 
613 ASG OPSIMP,	INAREG|FOREFF|FORCC,
614 	AWD,	TCHAR|TUCHAR,
615 	SSOREG,	ANYFIXED,
616 		0,	RLEFT|RESCC,
617 		"	OB2	AR,AL\n",
618 
619 ASG OPSIMP,	INAREG|FOREFF|FORCC,
620 	AWD,	TCHAR|TUCHAR,
621 	SAREG|SNAME|STARNM,	ANYFIXED,
622 		0,	RLEFT|RESCC,
623 		"	OB2	AR,AL\n",
624 
625 ASG OPSIMP,	INAREG|FOREFF|FORCC,
626 	AWD,	TCHAR|TUCHAR,
627 	SCCON,	ANYFIXED,
628 		0,	RLEFT|RESCC,
629 		"	OB2	AR,AL\n",
630 
631 ASG OPSIMP,	INAREG|FOREFF|FORCC,
632 	AWD,	TCHAR|TUCHAR,
633 	AWD,	TCHAR|TUCHAR,
634 		0,	RLEFT|RESCC,
635 		"	OB2	AR,AL\n",
636 
637 OPSIMP,	INAREG|INTAREG|FORCC,
638 	STAREG,	ANYFIXED,
639 	SAREG|AWD,	TWORD,
640 		0,	RLEFT|RESCC,
641 		"	OL2	AR,AL\n",
642 
643 OPSIMP,	INAREG|INTAREG|FORCC,
644 	SAREG|AWD,	TWORD,
645 	SAREG|AWD,	TWORD,
646 		NAREG|NASL|NASR,	RESC1|RESCC,
647 		"	OL3	AR,AL,A1\n",
648 
649 ASG OPFLOAT,	INAREG|FOREFF|FORCC,
650 	SAREG|AWD,	TDOUBLE,
651 	SAREG|AWD,	TDOUBLE,
652 		0,	RLEFT|RESCC,
653 		"	OD2	AR,AL\n",
654 
655 ASG OPFLOAT,	INAREG|FOREFF|FORCC,
656 	SAREG|AWD,	TFLOAT,
657 	SAREG|AWD,	TFLOAT,
658 		0,	RLEFT|RESCC,
659 #if defined(FORT) || defined(SPRECC)
660 		"	OF2	AR,TAL\n",
661 #else
662 		"	OF2	AR,AL\n",
663 #endif
664 
665 ASG OPFLOAT,	INAREG|INTAREG|FOREFF|FORCC,
666 	SAREG|AWD,	TFLOAT,
667 	SAREG|AWD,	TDOUBLE,
668 		NAREG,	RLEFT|RESC1|RESCC,
669 		"	cvtfd	AL,A1\n	OD2	AR,A1\n	cvtdf	A1,AL\n",
670 
671 ASG OPFLOAT,	INAREG|FOREFF|FORCC,
672 	SAREG|AWD,	ANYFIXED,
673 #ifndef SPRECC
674 	SAREG|AWD,	TDOUBLE,		/* force FLOAT to register */
675 #else
676 	SAREG|AWD,	TFLOAT|TDOUBLE,
677 #endif
678 		NAREG,	RLEFT|RESCC,	/* usable() knows we need a reg pair */
679 		"	ZG\n",
680 
681 OPFLOAT,	INAREG|INTAREG|FORCC,
682 	STAREG,	TDOUBLE,
683 	SAREG|AWD,	TDOUBLE,
684 		0,	RLEFT|RESCC,
685 		"	OD2	AR,AL\n",
686 
687 OPFLOAT,	INAREG|INTAREG|FORCC,
688 	SAREG|AWD,	TDOUBLE,
689 	SAREG|AWD,	TDOUBLE,
690 		NAREG|NASL|NASR,	RESC1|RESCC,
691 		"	OD3	AR,AL,A1\n",
692 
693 #if defined(FORT) || defined(SPRECC)
694 OPFLOAT,	INAREG|INTAREG|FORCC,
695 	STAREG,		TFLOAT,
696 	SAREG|AWD,	TFLOAT,
697 		0,	RLEFT|RESCC,
698 		"	OF2	AR,TAL\n",
699 
700 OPFLOAT,	INAREG|INTAREG|FORCC,
701 	SAREG|AWD,	TFLOAT,
702 	SAREG|AWD,	TFLOAT,
703 		NAREG|NASL|NASR,	RESC1|RESCC,
704 		"	OF3	AR,AL,TA1\n",
705 #endif
706 
707 #ifdef FORT
708 /* perform some implicit conversions XXX SHOULD FIX f77 FRONT END */
709 OPFLOAT,	INAREG|INTAREG|FORCC,
710 	SAREG|AWD,	TFLOAT,
711 	SAREG|AWD,	TDOUBLE,
712 		NAREG|NASL,	RESC1|RESCC,
713 		"	cvtfd	AL,A1\n	OD2	AR,A1\n",
714 
715 OPFLOAT,	INAREG|INTAREG|FORCC,
716 	SAREG|AWD,	TDOUBLE,
717 	SAREG|AWD,	TFLOAT,
718 		NAREG|NASR,	RESC1|RESCC,
719 		"	cvtfd	AR,A1\n	OD3	A1,AL,A1\n",
720 #endif
721 
722 	/* Default actions for hard trees ... */
723 
724 # define DF(x) FORREW,SANY,TANY,SANY,TANY,REWRITE,x,""
725 
726 UNARY MUL, DF( UNARY MUL ),
727 
728 INCR, DF(INCR),
729 
730 DECR, DF(INCR),
731 
732 ASSIGN, DF(ASSIGN),
733 
734 STASG, DF(STASG),
735 
736 FLD, DF(FLD),
737 
738 OPLEAF, DF(NAME),
739 
740 OPLOG,	FORCC,
741 	SANY,	TANY,
742 	SANY,	TANY,
743 		REWRITE,	BITYPE,
744 		"",
745 
746 OPLOG,	DF(NOT),
747 
748 COMOP, DF(COMOP),
749 
750 INIT, DF(INIT),
751 
752 OPUNARY, DF(UNARY MINUS),
753 
754 ASG OPANY, DF(ASG PLUS),
755 
756 OPANY, DF(BITYPE),
757 
758 FREE,	FREE,	FREE,	FREE,	FREE,	FREE,	FREE,	FREE,	"help; I'm in trouble\n" };
759