get rid of conflict on case-insensitive fs
[prop.git] / prop-src / spark4.c
blobd1e5799e5fa54ea4049a81b7d96e1ae43be846ed
1 #include "c.h"
2 #define NODEPTR_TYPE Node
3 #define OP_LABEL(p) ((p)->op)
4 #define LEFT_CHILD(p) ((p)->kids[0])
5 #define RIGHT_CHILD(p) ((p)->kids[1])
6 #define STATE_LABEL(p) ((p)->x.state)
7 static void address ARGS((Symbol, Symbol, int));
8 static void blkfetch ARGS((int, int, int, int));
9 static void blkloop ARGS((int, int, int, int, int, int[]));
10 static void blkstore ARGS((int, int, int, int));
11 static void defaddress ARGS((Symbol));
12 static void defconst ARGS((int, Value));
13 static void defstring ARGS((int, char *));
14 static void defsymbol ARGS((Symbol));
15 static void doarg ARGS((Node));
16 static void emit2 ARGS((Node));
17 static void export ARGS((Symbol));
18 static void clobber ARGS((Node));
19 static void function ARGS((Symbol, Symbol [], Symbol [], int));
20 static void global ARGS((Symbol));
21 static void import ARGS((Symbol));
22 static void local ARGS((Symbol));
23 static void progbeg ARGS((int, char **));
24 static void progend ARGS((void));
25 static void segment ARGS((int));
26 static void space ARGS((int));
27 static void target ARGS((Node));
28 static int imm ARGS((Node));
29 static void rename ARGS((void));
30 static void defsymbol2 ARGS((Symbol));
31 static void global2 ARGS((Symbol));
32 static void segment2 ARGS((int));
34 static Symbol greg[32];
35 static Symbol *oreg = &greg[8], *ireg = &greg[24];
36 static Symbol freg[32], freg2[32];
38 static int retstruct;
40 static int pflag = 0;
42 static int cseg;
45 generated at Fri Dec 16 10:42:15 1994
46 by $Id: lburg.c,v 2.2 1994/12/08 16:10:01 cwf Exp $
48 static void _kids ARGS((NODEPTR_TYPE, int, NODEPTR_TYPE[]));
49 static void _label ARGS((NODEPTR_TYPE));
50 static int _rule ARGS((void*, int));
52 #define _stmt_NT 1
53 #define _reg_NT 2
54 #define _con_NT 3
55 #define _stk13_NT 4
56 #define _stk_NT 5
57 #define _con13_NT 6
58 #define _base_NT 7
59 #define _addr_NT 8
60 #define _addrl_NT 9
61 #define _spill_NT 10
62 #define _rc_NT 11
63 #define _rc5_NT 12
64 #define _addrg_NT 13
65 #define _call_NT 14
66 #define _rel_NT 15
68 static char *_ntname[] = {
70 "stmt",
71 "reg",
72 "con",
73 "stk13",
74 "stk",
75 "con13",
76 "base",
77 "addr",
78 "addrl",
79 "spill",
80 "rc",
81 "rc5",
82 "addrg",
83 "call",
84 "rel",
88 struct _state {
89 short cost[16];
90 struct {
91 unsigned int _stmt:6;
92 unsigned int _reg:7;
93 unsigned int _con:3;
94 unsigned int _stk13:2;
95 unsigned int _stk:2;
96 unsigned int _con13:3;
97 unsigned int _base:3;
98 unsigned int _addr:3;
99 unsigned int _addrl:1;
100 unsigned int _spill:1;
101 unsigned int _rc:2;
102 unsigned int _rc5:2;
103 unsigned int _addrg:1;
104 unsigned int _call:2;
105 unsigned int _rel:4;
106 } rule;
109 static short _nts_0[] = { 0 };
110 static short _nts_1[] = { _reg_NT, 0 };
111 static short _nts_2[] = { _stk13_NT, 0 };
112 static short _nts_3[] = { _reg_NT, _con13_NT, 0 };
113 static short _nts_4[] = { _con13_NT, 0 };
114 static short _nts_5[] = { _base_NT, 0 };
115 static short _nts_6[] = { _reg_NT, _reg_NT, 0 };
116 static short _nts_7[] = { _stk_NT, 0 };
117 static short _nts_8[] = { _addr_NT, 0 };
118 static short _nts_9[] = { _addr_NT, _reg_NT, 0 };
119 static short _nts_10[] = { _addrl_NT, 0 };
120 static short _nts_11[] = { _addrl_NT, _reg_NT, 0 };
121 static short _nts_12[] = { _base_NT, _reg_NT, 0 };
122 static short _nts_13[] = { _spill_NT, _reg_NT, 0 };
123 static short _nts_14[] = { _con_NT, 0 };
124 static short _nts_15[] = { _reg_NT, _rc_NT, 0 };
125 static short _nts_16[] = { _reg_NT, _rc5_NT, 0 };
126 static short _nts_17[] = { _addrg_NT, 0 };
127 static short _nts_18[] = { _call_NT, 0 };
128 static short _nts_19[] = { _call_NT, _reg_NT, 0 };
129 static short _nts_20[] = { _rel_NT, 0 };
131 static short *_nts[] = {
132 0, /* 0 */
133 _nts_0, /* 1 */
134 _nts_0, /* 2 */
135 _nts_0, /* 3 */
136 _nts_0, /* 4 */
137 _nts_0, /* 5 */
138 _nts_0, /* 6 */
139 _nts_1, /* 7 */
140 _nts_1, /* 8 */
141 _nts_1, /* 9 */
142 _nts_1, /* 10 */
143 _nts_1, /* 11 */
144 _nts_1, /* 12 */
145 _nts_0, /* 13 */
146 _nts_0, /* 14 */
147 _nts_0, /* 15 */
148 _nts_0, /* 16 */
149 _nts_0, /* 17 */
150 _nts_1, /* 18 */
151 _nts_1, /* 19 */
152 _nts_1, /* 20 */
153 _nts_1, /* 21 */
154 _nts_1, /* 22 */
155 _nts_0, /* 23 */
156 _nts_0, /* 24 */
157 _nts_0, /* 25 */
158 _nts_2, /* 26 */
159 _nts_0, /* 27 */
160 _nts_0, /* 28 */
161 _nts_0, /* 29 */
162 _nts_0, /* 30 */
163 _nts_0, /* 31 */
164 _nts_0, /* 32 */
165 _nts_0, /* 33 */
166 _nts_0, /* 34 */
167 _nts_0, /* 35 */
168 _nts_3, /* 36 */
169 _nts_3, /* 37 */
170 _nts_3, /* 38 */
171 _nts_1, /* 39 */
172 _nts_4, /* 40 */
173 _nts_2, /* 41 */
174 _nts_5, /* 42 */
175 _nts_6, /* 43 */
176 _nts_6, /* 44 */
177 _nts_6, /* 45 */
178 _nts_7, /* 46 */
179 _nts_8, /* 47 */
180 _nts_8, /* 48 */
181 _nts_8, /* 49 */
182 _nts_8, /* 50 */
183 _nts_8, /* 51 */
184 _nts_9, /* 52 */
185 _nts_9, /* 53 */
186 _nts_9, /* 54 */
187 _nts_9, /* 55 */
188 _nts_9, /* 56 */
189 _nts_0, /* 57 */
190 _nts_10, /* 58 */
191 _nts_11, /* 59 */
192 _nts_5, /* 60 */
193 _nts_12, /* 61 */
194 _nts_0, /* 62 */
195 _nts_13, /* 63 */
196 _nts_13, /* 64 */
197 _nts_13, /* 65 */
198 _nts_13, /* 66 */
199 _nts_13, /* 67 */
200 _nts_13, /* 68 */
201 _nts_8, /* 69 */
202 _nts_8, /* 70 */
203 _nts_8, /* 71 */
204 _nts_8, /* 72 */
205 _nts_1, /* 73 */
206 _nts_1, /* 74 */
207 _nts_1, /* 75 */
208 _nts_1, /* 76 */
209 _nts_1, /* 77 */
210 _nts_1, /* 78 */
211 _nts_1, /* 79 */
212 _nts_1, /* 80 */
213 _nts_1, /* 81 */
214 _nts_1, /* 82 */
215 _nts_1, /* 83 */
216 _nts_1, /* 84 */
217 _nts_1, /* 85 */
218 _nts_1, /* 86 */
219 _nts_1, /* 87 */
220 _nts_1, /* 88 */
221 _nts_1, /* 89 */
222 _nts_0, /* 90 */
223 _nts_0, /* 91 */
224 _nts_0, /* 92 */
225 _nts_0, /* 93 */
226 _nts_0, /* 94 */
227 _nts_14, /* 95 */
228 _nts_4, /* 96 */
229 _nts_1, /* 97 */
230 _nts_15, /* 98 */
231 _nts_15, /* 99 */
232 _nts_15, /* 100 */
233 _nts_15, /* 101 */
234 _nts_15, /* 102 */
235 _nts_15, /* 103 */
236 _nts_15, /* 104 */
237 _nts_15, /* 105 */
238 _nts_15, /* 106 */
239 _nts_0, /* 107 */
240 _nts_1, /* 108 */
241 _nts_16, /* 109 */
242 _nts_16, /* 110 */
243 _nts_16, /* 111 */
244 _nts_16, /* 112 */
245 _nts_15, /* 113 */
246 _nts_15, /* 114 */
247 _nts_15, /* 115 */
248 _nts_1, /* 116 */
249 _nts_1, /* 117 */
250 _nts_1, /* 118 */
251 _nts_1, /* 119 */
252 _nts_1, /* 120 */
253 _nts_1, /* 121 */
254 _nts_0, /* 122 */
255 _nts_17, /* 123 */
256 _nts_8, /* 124 */
257 _nts_0, /* 125 */
258 _nts_15, /* 126 */
259 _nts_15, /* 127 */
260 _nts_15, /* 128 */
261 _nts_15, /* 129 */
262 _nts_15, /* 130 */
263 _nts_15, /* 131 */
264 _nts_15, /* 132 */
265 _nts_15, /* 133 */
266 _nts_15, /* 134 */
267 _nts_15, /* 135 */
268 _nts_0, /* 136 */
269 _nts_8, /* 137 */
270 _nts_18, /* 138 */
271 _nts_18, /* 139 */
272 _nts_18, /* 140 */
273 _nts_18, /* 141 */
274 _nts_19, /* 142 */
275 _nts_1, /* 143 */
276 _nts_1, /* 144 */
277 _nts_1, /* 145 */
278 _nts_1, /* 146 */
279 _nts_1, /* 147 */
280 _nts_1, /* 148 */
281 _nts_1, /* 149 */
282 _nts_6, /* 150 */
283 _nts_6, /* 151 */
284 _nts_6, /* 152 */
285 _nts_6, /* 153 */
286 _nts_6, /* 154 */
287 _nts_6, /* 155 */
288 _nts_6, /* 156 */
289 _nts_6, /* 157 */
290 _nts_6, /* 158 */
291 _nts_6, /* 159 */
292 _nts_6, /* 160 */
293 _nts_6, /* 161 */
294 _nts_6, /* 162 */
295 _nts_6, /* 163 */
296 _nts_1, /* 164 */
297 _nts_1, /* 165 */
298 _nts_1, /* 166 */
299 _nts_1, /* 167 */
300 _nts_1, /* 168 */
301 _nts_1, /* 169 */
302 _nts_6, /* 170 */
303 _nts_6, /* 171 */
304 _nts_6, /* 172 */
305 _nts_6, /* 173 */
306 _nts_6, /* 174 */
307 _nts_6, /* 175 */
308 _nts_6, /* 176 */
309 _nts_6, /* 177 */
310 _nts_6, /* 178 */
311 _nts_6, /* 179 */
312 _nts_6, /* 180 */
313 _nts_6, /* 181 */
314 _nts_20, /* 182 */
315 _nts_1, /* 183 */
316 _nts_1, /* 184 */
317 _nts_6, /* 185 */
320 static char _arity[] = {
321 0, /* 0 */
322 0, /* 1 */
323 0, /* 2 */
324 0, /* 3 */
325 0, /* 4 */
326 0, /* 5 */
327 0, /* 6 */
328 0, /* 7 */
329 0, /* 8 */
330 0, /* 9 */
331 0, /* 10 */
332 0, /* 11 */
333 0, /* 12 */
334 0, /* 13 */
335 0, /* 14 */
336 0, /* 15 */
337 0, /* 16 */
338 0, /* 17=CNSTF */
339 0, /* 18=CNSTD */
340 0, /* 19=CNSTC */
341 0, /* 20=CNSTS */
342 0, /* 21=CNSTI */
343 0, /* 22=CNSTU */
344 0, /* 23=CNSTP */
345 0, /* 24 */
346 0, /* 25 */
347 0, /* 26 */
348 0, /* 27 */
349 0, /* 28 */
350 0, /* 29 */
351 0, /* 30 */
352 0, /* 31 */
353 0, /* 32 */
354 1, /* 33=ARGF */
355 1, /* 34=ARGD */
356 0, /* 35 */
357 0, /* 36 */
358 1, /* 37=ARGI */
359 0, /* 38 */
360 1, /* 39=ARGP */
361 0, /* 40 */
362 0, /* 41=ARGB */
363 0, /* 42 */
364 0, /* 43 */
365 0, /* 44 */
366 0, /* 45 */
367 0, /* 46 */
368 0, /* 47 */
369 0, /* 48 */
370 2, /* 49=ASGNF */
371 2, /* 50=ASGND */
372 2, /* 51=ASGNC */
373 2, /* 52=ASGNS */
374 2, /* 53=ASGNI */
375 0, /* 54 */
376 2, /* 55=ASGNP */
377 0, /* 56 */
378 2, /* 57=ASGNB */
379 0, /* 58 */
380 0, /* 59 */
381 0, /* 60 */
382 0, /* 61 */
383 0, /* 62 */
384 0, /* 63 */
385 0, /* 64 */
386 1, /* 65=INDIRF */
387 1, /* 66=INDIRD */
388 1, /* 67=INDIRC */
389 1, /* 68=INDIRS */
390 1, /* 69=INDIRI */
391 0, /* 70 */
392 1, /* 71=INDIRP */
393 0, /* 72 */
394 1, /* 73=INDIRB */
395 0, /* 74 */
396 0, /* 75 */
397 0, /* 76 */
398 0, /* 77 */
399 0, /* 78 */
400 0, /* 79 */
401 0, /* 80 */
402 0, /* 81 */
403 0, /* 82 */
404 0, /* 83 */
405 0, /* 84 */
406 1, /* 85=CVCI */
407 1, /* 86=CVCU */
408 0, /* 87 */
409 0, /* 88 */
410 0, /* 89 */
411 0, /* 90 */
412 0, /* 91 */
413 0, /* 92 */
414 0, /* 93 */
415 0, /* 94 */
416 0, /* 95 */
417 0, /* 96 */
418 1, /* 97=CVDF */
419 0, /* 98 */
420 0, /* 99 */
421 0, /* 100 */
422 1, /* 101=CVDI */
423 0, /* 102 */
424 0, /* 103 */
425 0, /* 104 */
426 0, /* 105 */
427 0, /* 106 */
428 0, /* 107 */
429 0, /* 108 */
430 0, /* 109 */
431 0, /* 110 */
432 0, /* 111 */
433 0, /* 112 */
434 0, /* 113 */
435 1, /* 114=CVFD */
436 0, /* 115 */
437 0, /* 116 */
438 0, /* 117 */
439 0, /* 118 */
440 0, /* 119 */
441 0, /* 120 */
442 0, /* 121 */
443 0, /* 122 */
444 0, /* 123 */
445 0, /* 124 */
446 0, /* 125 */
447 0, /* 126 */
448 0, /* 127 */
449 0, /* 128 */
450 0, /* 129 */
451 1, /* 130=CVID */
452 1, /* 131=CVIC */
453 1, /* 132=CVIS */
454 0, /* 133 */
455 1, /* 134=CVIU */
456 0, /* 135 */
457 0, /* 136 */
458 0, /* 137 */
459 0, /* 138 */
460 0, /* 139 */
461 0, /* 140 */
462 0, /* 141 */
463 0, /* 142 */
464 0, /* 143 */
465 0, /* 144 */
466 0, /* 145 */
467 0, /* 146 */
468 0, /* 147 */
469 0, /* 148 */
470 0, /* 149 */
471 1, /* 150=CVPU */
472 0, /* 151 */
473 0, /* 152 */
474 0, /* 153 */
475 0, /* 154 */
476 0, /* 155 */
477 0, /* 156 */
478 0, /* 157 */
479 0, /* 158 */
480 0, /* 159 */
481 0, /* 160 */
482 0, /* 161 */
483 0, /* 162 */
484 0, /* 163 */
485 0, /* 164 */
486 1, /* 165=CVSI */
487 1, /* 166=CVSU */
488 0, /* 167 */
489 0, /* 168 */
490 0, /* 169 */
491 0, /* 170 */
492 0, /* 171 */
493 0, /* 172 */
494 0, /* 173 */
495 0, /* 174 */
496 0, /* 175 */
497 0, /* 176 */
498 0, /* 177 */
499 0, /* 178 */
500 1, /* 179=CVUC */
501 1, /* 180=CVUS */
502 1, /* 181=CVUI */
503 0, /* 182 */
504 1, /* 183=CVUP */
505 0, /* 184 */
506 0, /* 185 */
507 0, /* 186 */
508 0, /* 187 */
509 0, /* 188 */
510 0, /* 189 */
511 0, /* 190 */
512 0, /* 191 */
513 0, /* 192 */
514 1, /* 193=NEGF */
515 1, /* 194=NEGD */
516 0, /* 195 */
517 0, /* 196 */
518 1, /* 197=NEGI */
519 0, /* 198 */
520 0, /* 199 */
521 0, /* 200 */
522 0, /* 201 */
523 0, /* 202 */
524 0, /* 203 */
525 0, /* 204 */
526 0, /* 205 */
527 0, /* 206 */
528 0, /* 207 */
529 0, /* 208 */
530 1, /* 209=CALLF */
531 1, /* 210=CALLD */
532 0, /* 211 */
533 0, /* 212 */
534 1, /* 213=CALLI */
535 0, /* 214 */
536 0, /* 215 */
537 1, /* 216=CALLV */
538 2, /* 217=CALLB */
539 0, /* 218 */
540 0, /* 219 */
541 0, /* 220 */
542 0, /* 221 */
543 0, /* 222 */
544 0, /* 223 */
545 0, /* 224 */
546 1, /* 225=LOADF */
547 1, /* 226=LOADD */
548 1, /* 227=LOADC */
549 1, /* 228=LOADS */
550 1, /* 229=LOADI */
551 1, /* 230=LOADU */
552 1, /* 231=LOADP */
553 0, /* 232 */
554 0, /* 233=LOADB */
555 0, /* 234 */
556 0, /* 235 */
557 0, /* 236 */
558 0, /* 237 */
559 0, /* 238 */
560 0, /* 239 */
561 0, /* 240 */
562 1, /* 241=RETF */
563 1, /* 242=RETD */
564 0, /* 243 */
565 0, /* 244 */
566 1, /* 245=RETI */
567 0, /* 246 */
568 0, /* 247 */
569 0, /* 248 */
570 0, /* 249 */
571 0, /* 250 */
572 0, /* 251 */
573 0, /* 252 */
574 0, /* 253 */
575 0, /* 254 */
576 0, /* 255 */
577 0, /* 256 */
578 0, /* 257 */
579 0, /* 258 */
580 0, /* 259 */
581 0, /* 260 */
582 0, /* 261 */
583 0, /* 262 */
584 0, /* 263=ADDRGP */
585 0, /* 264 */
586 0, /* 265 */
587 0, /* 266 */
588 0, /* 267 */
589 0, /* 268 */
590 0, /* 269 */
591 0, /* 270 */
592 0, /* 271 */
593 0, /* 272 */
594 0, /* 273 */
595 0, /* 274 */
596 0, /* 275 */
597 0, /* 276 */
598 0, /* 277 */
599 0, /* 278 */
600 0, /* 279=ADDRFP */
601 0, /* 280 */
602 0, /* 281 */
603 0, /* 282 */
604 0, /* 283 */
605 0, /* 284 */
606 0, /* 285 */
607 0, /* 286 */
608 0, /* 287 */
609 0, /* 288 */
610 0, /* 289 */
611 0, /* 290 */
612 0, /* 291 */
613 0, /* 292 */
614 0, /* 293 */
615 0, /* 294 */
616 0, /* 295=ADDRLP */
617 0, /* 296 */
618 0, /* 297 */
619 0, /* 298 */
620 0, /* 299 */
621 0, /* 300 */
622 0, /* 301 */
623 0, /* 302 */
624 0, /* 303 */
625 0, /* 304 */
626 2, /* 305=ADDF */
627 2, /* 306=ADDD */
628 0, /* 307 */
629 0, /* 308 */
630 2, /* 309=ADDI */
631 2, /* 310=ADDU */
632 2, /* 311=ADDP */
633 0, /* 312 */
634 0, /* 313 */
635 0, /* 314 */
636 0, /* 315 */
637 0, /* 316 */
638 0, /* 317 */
639 0, /* 318 */
640 0, /* 319 */
641 0, /* 320 */
642 2, /* 321=SUBF */
643 2, /* 322=SUBD */
644 0, /* 323 */
645 0, /* 324 */
646 2, /* 325=SUBI */
647 2, /* 326=SUBU */
648 2, /* 327=SUBP */
649 0, /* 328 */
650 0, /* 329 */
651 0, /* 330 */
652 0, /* 331 */
653 0, /* 332 */
654 0, /* 333 */
655 0, /* 334 */
656 0, /* 335 */
657 0, /* 336 */
658 0, /* 337 */
659 0, /* 338 */
660 0, /* 339 */
661 0, /* 340 */
662 2, /* 341=LSHI */
663 2, /* 342=LSHU */
664 0, /* 343 */
665 0, /* 344 */
666 0, /* 345 */
667 0, /* 346 */
668 0, /* 347 */
669 0, /* 348 */
670 0, /* 349 */
671 0, /* 350 */
672 0, /* 351 */
673 0, /* 352 */
674 0, /* 353 */
675 0, /* 354 */
676 0, /* 355 */
677 0, /* 356 */
678 2, /* 357=MODI */
679 2, /* 358=MODU */
680 0, /* 359 */
681 0, /* 360 */
682 0, /* 361 */
683 0, /* 362 */
684 0, /* 363 */
685 0, /* 364 */
686 0, /* 365 */
687 0, /* 366 */
688 0, /* 367 */
689 0, /* 368 */
690 0, /* 369 */
691 0, /* 370 */
692 0, /* 371 */
693 0, /* 372 */
694 2, /* 373=RSHI */
695 2, /* 374=RSHU */
696 0, /* 375 */
697 0, /* 376 */
698 0, /* 377 */
699 0, /* 378 */
700 0, /* 379 */
701 0, /* 380 */
702 0, /* 381 */
703 0, /* 382 */
704 0, /* 383 */
705 0, /* 384 */
706 0, /* 385 */
707 0, /* 386 */
708 0, /* 387 */
709 0, /* 388 */
710 0, /* 389 */
711 2, /* 390=BANDU */
712 0, /* 391 */
713 0, /* 392 */
714 0, /* 393 */
715 0, /* 394 */
716 0, /* 395 */
717 0, /* 396 */
718 0, /* 397 */
719 0, /* 398 */
720 0, /* 399 */
721 0, /* 400 */
722 0, /* 401 */
723 0, /* 402 */
724 0, /* 403 */
725 0, /* 404 */
726 0, /* 405 */
727 1, /* 406=BCOMU */
728 0, /* 407 */
729 0, /* 408 */
730 0, /* 409 */
731 0, /* 410 */
732 0, /* 411 */
733 0, /* 412 */
734 0, /* 413 */
735 0, /* 414 */
736 0, /* 415 */
737 0, /* 416 */
738 0, /* 417 */
739 0, /* 418 */
740 0, /* 419 */
741 0, /* 420 */
742 0, /* 421 */
743 2, /* 422=BORU */
744 0, /* 423 */
745 0, /* 424 */
746 0, /* 425 */
747 0, /* 426 */
748 0, /* 427 */
749 0, /* 428 */
750 0, /* 429 */
751 0, /* 430 */
752 0, /* 431 */
753 0, /* 432 */
754 0, /* 433 */
755 0, /* 434 */
756 0, /* 435 */
757 0, /* 436 */
758 0, /* 437 */
759 2, /* 438=BXORU */
760 0, /* 439 */
761 0, /* 440 */
762 0, /* 441 */
763 0, /* 442 */
764 0, /* 443 */
765 0, /* 444 */
766 0, /* 445 */
767 0, /* 446 */
768 0, /* 447 */
769 0, /* 448 */
770 2, /* 449=DIVF */
771 2, /* 450=DIVD */
772 0, /* 451 */
773 0, /* 452 */
774 2, /* 453=DIVI */
775 2, /* 454=DIVU */
776 0, /* 455 */
777 0, /* 456 */
778 0, /* 457 */
779 0, /* 458 */
780 0, /* 459 */
781 0, /* 460 */
782 0, /* 461 */
783 0, /* 462 */
784 0, /* 463 */
785 0, /* 464 */
786 2, /* 465=MULF */
787 2, /* 466=MULD */
788 0, /* 467 */
789 0, /* 468 */
790 2, /* 469=MULI */
791 2, /* 470=MULU */
792 0, /* 471 */
793 0, /* 472 */
794 0, /* 473 */
795 0, /* 474 */
796 0, /* 475 */
797 0, /* 476 */
798 0, /* 477 */
799 0, /* 478 */
800 0, /* 479 */
801 0, /* 480 */
802 2, /* 481=EQF */
803 2, /* 482=EQD */
804 0, /* 483 */
805 0, /* 484 */
806 2, /* 485=EQI */
807 0, /* 486 */
808 0, /* 487 */
809 0, /* 488 */
810 0, /* 489 */
811 0, /* 490 */
812 0, /* 491 */
813 0, /* 492 */
814 0, /* 493 */
815 0, /* 494 */
816 0, /* 495 */
817 0, /* 496 */
818 2, /* 497=GEF */
819 2, /* 498=GED */
820 0, /* 499 */
821 0, /* 500 */
822 2, /* 501=GEI */
823 2, /* 502=GEU */
824 0, /* 503 */
825 0, /* 504 */
826 0, /* 505 */
827 0, /* 506 */
828 0, /* 507 */
829 0, /* 508 */
830 0, /* 509 */
831 0, /* 510 */
832 0, /* 511 */
833 0, /* 512 */
834 2, /* 513=GTF */
835 2, /* 514=GTD */
836 0, /* 515 */
837 0, /* 516 */
838 2, /* 517=GTI */
839 2, /* 518=GTU */
840 0, /* 519 */
841 0, /* 520 */
842 0, /* 521 */
843 0, /* 522 */
844 0, /* 523 */
845 0, /* 524 */
846 0, /* 525 */
847 0, /* 526 */
848 0, /* 527 */
849 0, /* 528 */
850 2, /* 529=LEF */
851 2, /* 530=LED */
852 0, /* 531 */
853 0, /* 532 */
854 2, /* 533=LEI */
855 2, /* 534=LEU */
856 0, /* 535 */
857 0, /* 536 */
858 0, /* 537 */
859 0, /* 538 */
860 0, /* 539 */
861 0, /* 540 */
862 0, /* 541 */
863 0, /* 542 */
864 0, /* 543 */
865 0, /* 544 */
866 2, /* 545=LTF */
867 2, /* 546=LTD */
868 0, /* 547 */
869 0, /* 548 */
870 2, /* 549=LTI */
871 2, /* 550=LTU */
872 0, /* 551 */
873 0, /* 552 */
874 0, /* 553 */
875 0, /* 554 */
876 0, /* 555 */
877 0, /* 556 */
878 0, /* 557 */
879 0, /* 558 */
880 0, /* 559 */
881 0, /* 560 */
882 2, /* 561=NEF */
883 2, /* 562=NED */
884 0, /* 563 */
885 0, /* 564 */
886 2, /* 565=NEI */
887 0, /* 566 */
888 0, /* 567 */
889 0, /* 568 */
890 0, /* 569 */
891 0, /* 570 */
892 0, /* 571 */
893 0, /* 572 */
894 0, /* 573 */
895 0, /* 574 */
896 0, /* 575 */
897 0, /* 576 */
898 0, /* 577 */
899 0, /* 578 */
900 0, /* 579 */
901 0, /* 580 */
902 0, /* 581 */
903 0, /* 582 */
904 0, /* 583 */
905 1, /* 584=JUMPV */
906 0, /* 585 */
907 0, /* 586 */
908 0, /* 587 */
909 0, /* 588 */
910 0, /* 589 */
911 0, /* 590 */
912 0, /* 591 */
913 0, /* 592 */
914 0, /* 593 */
915 0, /* 594 */
916 0, /* 595 */
917 0, /* 596 */
918 0, /* 597 */
919 0, /* 598 */
920 0, /* 599 */
921 0, /* 600=LABELV */
922 0, /* 601 */
923 0, /* 602 */
924 0, /* 603 */
925 0, /* 604 */
926 0, /* 605 */
927 0, /* 606 */
928 0, /* 607 */
929 0, /* 608 */
930 0, /* 609 */
931 0, /* 610 */
932 0, /* 611 */
933 0, /* 612 */
934 0, /* 613 */
935 0, /* 614 */
936 0, /* 615=VREGP */
939 static char *_opname[] = {
940 /* 0 */ 0,
941 /* 1 */ 0,
942 /* 2 */ 0,
943 /* 3 */ 0,
944 /* 4 */ 0,
945 /* 5 */ 0,
946 /* 6 */ 0,
947 /* 7 */ 0,
948 /* 8 */ 0,
949 /* 9 */ 0,
950 /* 10 */ 0,
951 /* 11 */ 0,
952 /* 12 */ 0,
953 /* 13 */ 0,
954 /* 14 */ 0,
955 /* 15 */ 0,
956 /* 16 */ 0,
957 /* 17 */ "CNSTF",
958 /* 18 */ "CNSTD",
959 /* 19 */ "CNSTC",
960 /* 20 */ "CNSTS",
961 /* 21 */ "CNSTI",
962 /* 22 */ "CNSTU",
963 /* 23 */ "CNSTP",
964 /* 24 */ 0,
965 /* 25 */ 0,
966 /* 26 */ 0,
967 /* 27 */ 0,
968 /* 28 */ 0,
969 /* 29 */ 0,
970 /* 30 */ 0,
971 /* 31 */ 0,
972 /* 32 */ 0,
973 /* 33 */ "ARGF",
974 /* 34 */ "ARGD",
975 /* 35 */ 0,
976 /* 36 */ 0,
977 /* 37 */ "ARGI",
978 /* 38 */ 0,
979 /* 39 */ "ARGP",
980 /* 40 */ 0,
981 /* 41 */ "ARGB",
982 /* 42 */ 0,
983 /* 43 */ 0,
984 /* 44 */ 0,
985 /* 45 */ 0,
986 /* 46 */ 0,
987 /* 47 */ 0,
988 /* 48 */ 0,
989 /* 49 */ "ASGNF",
990 /* 50 */ "ASGND",
991 /* 51 */ "ASGNC",
992 /* 52 */ "ASGNS",
993 /* 53 */ "ASGNI",
994 /* 54 */ 0,
995 /* 55 */ "ASGNP",
996 /* 56 */ 0,
997 /* 57 */ "ASGNB",
998 /* 58 */ 0,
999 /* 59 */ 0,
1000 /* 60 */ 0,
1001 /* 61 */ 0,
1002 /* 62 */ 0,
1003 /* 63 */ 0,
1004 /* 64 */ 0,
1005 /* 65 */ "INDIRF",
1006 /* 66 */ "INDIRD",
1007 /* 67 */ "INDIRC",
1008 /* 68 */ "INDIRS",
1009 /* 69 */ "INDIRI",
1010 /* 70 */ 0,
1011 /* 71 */ "INDIRP",
1012 /* 72 */ 0,
1013 /* 73 */ "INDIRB",
1014 /* 74 */ 0,
1015 /* 75 */ 0,
1016 /* 76 */ 0,
1017 /* 77 */ 0,
1018 /* 78 */ 0,
1019 /* 79 */ 0,
1020 /* 80 */ 0,
1021 /* 81 */ 0,
1022 /* 82 */ 0,
1023 /* 83 */ 0,
1024 /* 84 */ 0,
1025 /* 85 */ "CVCI",
1026 /* 86 */ "CVCU",
1027 /* 87 */ 0,
1028 /* 88 */ 0,
1029 /* 89 */ 0,
1030 /* 90 */ 0,
1031 /* 91 */ 0,
1032 /* 92 */ 0,
1033 /* 93 */ 0,
1034 /* 94 */ 0,
1035 /* 95 */ 0,
1036 /* 96 */ 0,
1037 /* 97 */ "CVDF",
1038 /* 98 */ 0,
1039 /* 99 */ 0,
1040 /* 100 */ 0,
1041 /* 101 */ "CVDI",
1042 /* 102 */ 0,
1043 /* 103 */ 0,
1044 /* 104 */ 0,
1045 /* 105 */ 0,
1046 /* 106 */ 0,
1047 /* 107 */ 0,
1048 /* 108 */ 0,
1049 /* 109 */ 0,
1050 /* 110 */ 0,
1051 /* 111 */ 0,
1052 /* 112 */ 0,
1053 /* 113 */ 0,
1054 /* 114 */ "CVFD",
1055 /* 115 */ 0,
1056 /* 116 */ 0,
1057 /* 117 */ 0,
1058 /* 118 */ 0,
1059 /* 119 */ 0,
1060 /* 120 */ 0,
1061 /* 121 */ 0,
1062 /* 122 */ 0,
1063 /* 123 */ 0,
1064 /* 124 */ 0,
1065 /* 125 */ 0,
1066 /* 126 */ 0,
1067 /* 127 */ 0,
1068 /* 128 */ 0,
1069 /* 129 */ 0,
1070 /* 130 */ "CVID",
1071 /* 131 */ "CVIC",
1072 /* 132 */ "CVIS",
1073 /* 133 */ 0,
1074 /* 134 */ "CVIU",
1075 /* 135 */ 0,
1076 /* 136 */ 0,
1077 /* 137 */ 0,
1078 /* 138 */ 0,
1079 /* 139 */ 0,
1080 /* 140 */ 0,
1081 /* 141 */ 0,
1082 /* 142 */ 0,
1083 /* 143 */ 0,
1084 /* 144 */ 0,
1085 /* 145 */ 0,
1086 /* 146 */ 0,
1087 /* 147 */ 0,
1088 /* 148 */ 0,
1089 /* 149 */ 0,
1090 /* 150 */ "CVPU",
1091 /* 151 */ 0,
1092 /* 152 */ 0,
1093 /* 153 */ 0,
1094 /* 154 */ 0,
1095 /* 155 */ 0,
1096 /* 156 */ 0,
1097 /* 157 */ 0,
1098 /* 158 */ 0,
1099 /* 159 */ 0,
1100 /* 160 */ 0,
1101 /* 161 */ 0,
1102 /* 162 */ 0,
1103 /* 163 */ 0,
1104 /* 164 */ 0,
1105 /* 165 */ "CVSI",
1106 /* 166 */ "CVSU",
1107 /* 167 */ 0,
1108 /* 168 */ 0,
1109 /* 169 */ 0,
1110 /* 170 */ 0,
1111 /* 171 */ 0,
1112 /* 172 */ 0,
1113 /* 173 */ 0,
1114 /* 174 */ 0,
1115 /* 175 */ 0,
1116 /* 176 */ 0,
1117 /* 177 */ 0,
1118 /* 178 */ 0,
1119 /* 179 */ "CVUC",
1120 /* 180 */ "CVUS",
1121 /* 181 */ "CVUI",
1122 /* 182 */ 0,
1123 /* 183 */ "CVUP",
1124 /* 184 */ 0,
1125 /* 185 */ 0,
1126 /* 186 */ 0,
1127 /* 187 */ 0,
1128 /* 188 */ 0,
1129 /* 189 */ 0,
1130 /* 190 */ 0,
1131 /* 191 */ 0,
1132 /* 192 */ 0,
1133 /* 193 */ "NEGF",
1134 /* 194 */ "NEGD",
1135 /* 195 */ 0,
1136 /* 196 */ 0,
1137 /* 197 */ "NEGI",
1138 /* 198 */ 0,
1139 /* 199 */ 0,
1140 /* 200 */ 0,
1141 /* 201 */ 0,
1142 /* 202 */ 0,
1143 /* 203 */ 0,
1144 /* 204 */ 0,
1145 /* 205 */ 0,
1146 /* 206 */ 0,
1147 /* 207 */ 0,
1148 /* 208 */ 0,
1149 /* 209 */ "CALLF",
1150 /* 210 */ "CALLD",
1151 /* 211 */ 0,
1152 /* 212 */ 0,
1153 /* 213 */ "CALLI",
1154 /* 214 */ 0,
1155 /* 215 */ 0,
1156 /* 216 */ "CALLV",
1157 /* 217 */ "CALLB",
1158 /* 218 */ 0,
1159 /* 219 */ 0,
1160 /* 220 */ 0,
1161 /* 221 */ 0,
1162 /* 222 */ 0,
1163 /* 223 */ 0,
1164 /* 224 */ 0,
1165 /* 225 */ "LOADF",
1166 /* 226 */ "LOADD",
1167 /* 227 */ "LOADC",
1168 /* 228 */ "LOADS",
1169 /* 229 */ "LOADI",
1170 /* 230 */ "LOADU",
1171 /* 231 */ "LOADP",
1172 /* 232 */ 0,
1173 /* 233 */ "LOADB",
1174 /* 234 */ 0,
1175 /* 235 */ 0,
1176 /* 236 */ 0,
1177 /* 237 */ 0,
1178 /* 238 */ 0,
1179 /* 239 */ 0,
1180 /* 240 */ 0,
1181 /* 241 */ "RETF",
1182 /* 242 */ "RETD",
1183 /* 243 */ 0,
1184 /* 244 */ 0,
1185 /* 245 */ "RETI",
1186 /* 246 */ 0,
1187 /* 247 */ 0,
1188 /* 248 */ 0,
1189 /* 249 */ 0,
1190 /* 250 */ 0,
1191 /* 251 */ 0,
1192 /* 252 */ 0,
1193 /* 253 */ 0,
1194 /* 254 */ 0,
1195 /* 255 */ 0,
1196 /* 256 */ 0,
1197 /* 257 */ 0,
1198 /* 258 */ 0,
1199 /* 259 */ 0,
1200 /* 260 */ 0,
1201 /* 261 */ 0,
1202 /* 262 */ 0,
1203 /* 263 */ "ADDRGP",
1204 /* 264 */ 0,
1205 /* 265 */ 0,
1206 /* 266 */ 0,
1207 /* 267 */ 0,
1208 /* 268 */ 0,
1209 /* 269 */ 0,
1210 /* 270 */ 0,
1211 /* 271 */ 0,
1212 /* 272 */ 0,
1213 /* 273 */ 0,
1214 /* 274 */ 0,
1215 /* 275 */ 0,
1216 /* 276 */ 0,
1217 /* 277 */ 0,
1218 /* 278 */ 0,
1219 /* 279 */ "ADDRFP",
1220 /* 280 */ 0,
1221 /* 281 */ 0,
1222 /* 282 */ 0,
1223 /* 283 */ 0,
1224 /* 284 */ 0,
1225 /* 285 */ 0,
1226 /* 286 */ 0,
1227 /* 287 */ 0,
1228 /* 288 */ 0,
1229 /* 289 */ 0,
1230 /* 290 */ 0,
1231 /* 291 */ 0,
1232 /* 292 */ 0,
1233 /* 293 */ 0,
1234 /* 294 */ 0,
1235 /* 295 */ "ADDRLP",
1236 /* 296 */ 0,
1237 /* 297 */ 0,
1238 /* 298 */ 0,
1239 /* 299 */ 0,
1240 /* 300 */ 0,
1241 /* 301 */ 0,
1242 /* 302 */ 0,
1243 /* 303 */ 0,
1244 /* 304 */ 0,
1245 /* 305 */ "ADDF",
1246 /* 306 */ "ADDD",
1247 /* 307 */ 0,
1248 /* 308 */ 0,
1249 /* 309 */ "ADDI",
1250 /* 310 */ "ADDU",
1251 /* 311 */ "ADDP",
1252 /* 312 */ 0,
1253 /* 313 */ 0,
1254 /* 314 */ 0,
1255 /* 315 */ 0,
1256 /* 316 */ 0,
1257 /* 317 */ 0,
1258 /* 318 */ 0,
1259 /* 319 */ 0,
1260 /* 320 */ 0,
1261 /* 321 */ "SUBF",
1262 /* 322 */ "SUBD",
1263 /* 323 */ 0,
1264 /* 324 */ 0,
1265 /* 325 */ "SUBI",
1266 /* 326 */ "SUBU",
1267 /* 327 */ "SUBP",
1268 /* 328 */ 0,
1269 /* 329 */ 0,
1270 /* 330 */ 0,
1271 /* 331 */ 0,
1272 /* 332 */ 0,
1273 /* 333 */ 0,
1274 /* 334 */ 0,
1275 /* 335 */ 0,
1276 /* 336 */ 0,
1277 /* 337 */ 0,
1278 /* 338 */ 0,
1279 /* 339 */ 0,
1280 /* 340 */ 0,
1281 /* 341 */ "LSHI",
1282 /* 342 */ "LSHU",
1283 /* 343 */ 0,
1284 /* 344 */ 0,
1285 /* 345 */ 0,
1286 /* 346 */ 0,
1287 /* 347 */ 0,
1288 /* 348 */ 0,
1289 /* 349 */ 0,
1290 /* 350 */ 0,
1291 /* 351 */ 0,
1292 /* 352 */ 0,
1293 /* 353 */ 0,
1294 /* 354 */ 0,
1295 /* 355 */ 0,
1296 /* 356 */ 0,
1297 /* 357 */ "MODI",
1298 /* 358 */ "MODU",
1299 /* 359 */ 0,
1300 /* 360 */ 0,
1301 /* 361 */ 0,
1302 /* 362 */ 0,
1303 /* 363 */ 0,
1304 /* 364 */ 0,
1305 /* 365 */ 0,
1306 /* 366 */ 0,
1307 /* 367 */ 0,
1308 /* 368 */ 0,
1309 /* 369 */ 0,
1310 /* 370 */ 0,
1311 /* 371 */ 0,
1312 /* 372 */ 0,
1313 /* 373 */ "RSHI",
1314 /* 374 */ "RSHU",
1315 /* 375 */ 0,
1316 /* 376 */ 0,
1317 /* 377 */ 0,
1318 /* 378 */ 0,
1319 /* 379 */ 0,
1320 /* 380 */ 0,
1321 /* 381 */ 0,
1322 /* 382 */ 0,
1323 /* 383 */ 0,
1324 /* 384 */ 0,
1325 /* 385 */ 0,
1326 /* 386 */ 0,
1327 /* 387 */ 0,
1328 /* 388 */ 0,
1329 /* 389 */ 0,
1330 /* 390 */ "BANDU",
1331 /* 391 */ 0,
1332 /* 392 */ 0,
1333 /* 393 */ 0,
1334 /* 394 */ 0,
1335 /* 395 */ 0,
1336 /* 396 */ 0,
1337 /* 397 */ 0,
1338 /* 398 */ 0,
1339 /* 399 */ 0,
1340 /* 400 */ 0,
1341 /* 401 */ 0,
1342 /* 402 */ 0,
1343 /* 403 */ 0,
1344 /* 404 */ 0,
1345 /* 405 */ 0,
1346 /* 406 */ "BCOMU",
1347 /* 407 */ 0,
1348 /* 408 */ 0,
1349 /* 409 */ 0,
1350 /* 410 */ 0,
1351 /* 411 */ 0,
1352 /* 412 */ 0,
1353 /* 413 */ 0,
1354 /* 414 */ 0,
1355 /* 415 */ 0,
1356 /* 416 */ 0,
1357 /* 417 */ 0,
1358 /* 418 */ 0,
1359 /* 419 */ 0,
1360 /* 420 */ 0,
1361 /* 421 */ 0,
1362 /* 422 */ "BORU",
1363 /* 423 */ 0,
1364 /* 424 */ 0,
1365 /* 425 */ 0,
1366 /* 426 */ 0,
1367 /* 427 */ 0,
1368 /* 428 */ 0,
1369 /* 429 */ 0,
1370 /* 430 */ 0,
1371 /* 431 */ 0,
1372 /* 432 */ 0,
1373 /* 433 */ 0,
1374 /* 434 */ 0,
1375 /* 435 */ 0,
1376 /* 436 */ 0,
1377 /* 437 */ 0,
1378 /* 438 */ "BXORU",
1379 /* 439 */ 0,
1380 /* 440 */ 0,
1381 /* 441 */ 0,
1382 /* 442 */ 0,
1383 /* 443 */ 0,
1384 /* 444 */ 0,
1385 /* 445 */ 0,
1386 /* 446 */ 0,
1387 /* 447 */ 0,
1388 /* 448 */ 0,
1389 /* 449 */ "DIVF",
1390 /* 450 */ "DIVD",
1391 /* 451 */ 0,
1392 /* 452 */ 0,
1393 /* 453 */ "DIVI",
1394 /* 454 */ "DIVU",
1395 /* 455 */ 0,
1396 /* 456 */ 0,
1397 /* 457 */ 0,
1398 /* 458 */ 0,
1399 /* 459 */ 0,
1400 /* 460 */ 0,
1401 /* 461 */ 0,
1402 /* 462 */ 0,
1403 /* 463 */ 0,
1404 /* 464 */ 0,
1405 /* 465 */ "MULF",
1406 /* 466 */ "MULD",
1407 /* 467 */ 0,
1408 /* 468 */ 0,
1409 /* 469 */ "MULI",
1410 /* 470 */ "MULU",
1411 /* 471 */ 0,
1412 /* 472 */ 0,
1413 /* 473 */ 0,
1414 /* 474 */ 0,
1415 /* 475 */ 0,
1416 /* 476 */ 0,
1417 /* 477 */ 0,
1418 /* 478 */ 0,
1419 /* 479 */ 0,
1420 /* 480 */ 0,
1421 /* 481 */ "EQF",
1422 /* 482 */ "EQD",
1423 /* 483 */ 0,
1424 /* 484 */ 0,
1425 /* 485 */ "EQI",
1426 /* 486 */ 0,
1427 /* 487 */ 0,
1428 /* 488 */ 0,
1429 /* 489 */ 0,
1430 /* 490 */ 0,
1431 /* 491 */ 0,
1432 /* 492 */ 0,
1433 /* 493 */ 0,
1434 /* 494 */ 0,
1435 /* 495 */ 0,
1436 /* 496 */ 0,
1437 /* 497 */ "GEF",
1438 /* 498 */ "GED",
1439 /* 499 */ 0,
1440 /* 500 */ 0,
1441 /* 501 */ "GEI",
1442 /* 502 */ "GEU",
1443 /* 503 */ 0,
1444 /* 504 */ 0,
1445 /* 505 */ 0,
1446 /* 506 */ 0,
1447 /* 507 */ 0,
1448 /* 508 */ 0,
1449 /* 509 */ 0,
1450 /* 510 */ 0,
1451 /* 511 */ 0,
1452 /* 512 */ 0,
1453 /* 513 */ "GTF",
1454 /* 514 */ "GTD",
1455 /* 515 */ 0,
1456 /* 516 */ 0,
1457 /* 517 */ "GTI",
1458 /* 518 */ "GTU",
1459 /* 519 */ 0,
1460 /* 520 */ 0,
1461 /* 521 */ 0,
1462 /* 522 */ 0,
1463 /* 523 */ 0,
1464 /* 524 */ 0,
1465 /* 525 */ 0,
1466 /* 526 */ 0,
1467 /* 527 */ 0,
1468 /* 528 */ 0,
1469 /* 529 */ "LEF",
1470 /* 530 */ "LED",
1471 /* 531 */ 0,
1472 /* 532 */ 0,
1473 /* 533 */ "LEI",
1474 /* 534 */ "LEU",
1475 /* 535 */ 0,
1476 /* 536 */ 0,
1477 /* 537 */ 0,
1478 /* 538 */ 0,
1479 /* 539 */ 0,
1480 /* 540 */ 0,
1481 /* 541 */ 0,
1482 /* 542 */ 0,
1483 /* 543 */ 0,
1484 /* 544 */ 0,
1485 /* 545 */ "LTF",
1486 /* 546 */ "LTD",
1487 /* 547 */ 0,
1488 /* 548 */ 0,
1489 /* 549 */ "LTI",
1490 /* 550 */ "LTU",
1491 /* 551 */ 0,
1492 /* 552 */ 0,
1493 /* 553 */ 0,
1494 /* 554 */ 0,
1495 /* 555 */ 0,
1496 /* 556 */ 0,
1497 /* 557 */ 0,
1498 /* 558 */ 0,
1499 /* 559 */ 0,
1500 /* 560 */ 0,
1501 /* 561 */ "NEF",
1502 /* 562 */ "NED",
1503 /* 563 */ 0,
1504 /* 564 */ 0,
1505 /* 565 */ "NEI",
1506 /* 566 */ 0,
1507 /* 567 */ 0,
1508 /* 568 */ 0,
1509 /* 569 */ 0,
1510 /* 570 */ 0,
1511 /* 571 */ 0,
1512 /* 572 */ 0,
1513 /* 573 */ 0,
1514 /* 574 */ 0,
1515 /* 575 */ 0,
1516 /* 576 */ 0,
1517 /* 577 */ 0,
1518 /* 578 */ 0,
1519 /* 579 */ 0,
1520 /* 580 */ 0,
1521 /* 581 */ 0,
1522 /* 582 */ 0,
1523 /* 583 */ 0,
1524 /* 584 */ "JUMPV",
1525 /* 585 */ 0,
1526 /* 586 */ 0,
1527 /* 587 */ 0,
1528 /* 588 */ 0,
1529 /* 589 */ 0,
1530 /* 590 */ 0,
1531 /* 591 */ 0,
1532 /* 592 */ 0,
1533 /* 593 */ 0,
1534 /* 594 */ 0,
1535 /* 595 */ 0,
1536 /* 596 */ 0,
1537 /* 597 */ 0,
1538 /* 598 */ 0,
1539 /* 599 */ 0,
1540 /* 600 */ "LABELV",
1541 /* 601 */ 0,
1542 /* 602 */ 0,
1543 /* 603 */ 0,
1544 /* 604 */ 0,
1545 /* 605 */ 0,
1546 /* 606 */ 0,
1547 /* 607 */ 0,
1548 /* 608 */ 0,
1549 /* 609 */ 0,
1550 /* 610 */ 0,
1551 /* 611 */ 0,
1552 /* 612 */ 0,
1553 /* 613 */ 0,
1554 /* 614 */ 0,
1555 /* 615 */ "VREGP",
1558 static char *_templates[] = {
1559 /* 0 */ 0,
1560 /* 1 */ "# read register\n", /* reg: INDIRC(VREGP) */
1561 /* 2 */ "# read register\n", /* reg: INDIRD(VREGP) */
1562 /* 3 */ "# read register\n", /* reg: INDIRF(VREGP) */
1563 /* 4 */ "# read register\n", /* reg: INDIRI(VREGP) */
1564 /* 5 */ "# read register\n", /* reg: INDIRP(VREGP) */
1565 /* 6 */ "# read register\n", /* reg: INDIRS(VREGP) */
1566 /* 7 */ "# write register\n", /* stmt: ASGNC(VREGP,reg) */
1567 /* 8 */ "# write register\n", /* stmt: ASGND(VREGP,reg) */
1568 /* 9 */ "# write register\n", /* stmt: ASGNF(VREGP,reg) */
1569 /* 10 */ "# write register\n", /* stmt: ASGNI(VREGP,reg) */
1570 /* 11 */ "# write register\n", /* stmt: ASGNP(VREGP,reg) */
1571 /* 12 */ "# write register\n", /* stmt: ASGNS(VREGP,reg) */
1572 /* 13 */ "%a", /* con: CNSTC */
1573 /* 14 */ "%a", /* con: CNSTI */
1574 /* 15 */ "%a", /* con: CNSTP */
1575 /* 16 */ "%a", /* con: CNSTS */
1576 /* 17 */ "%a", /* con: CNSTU */
1577 /* 18 */ "", /* stmt: reg */
1578 /* 19 */ "%0", /* reg: CVIU(reg) */
1579 /* 20 */ "%0", /* reg: CVPU(reg) */
1580 /* 21 */ "%0", /* reg: CVUI(reg) */
1581 /* 22 */ "%0", /* reg: CVUP(reg) */
1582 /* 23 */ "set %a,%%%c\n", /* reg: ADDRGP */
1583 /* 24 */ "%a", /* stk13: ADDRFP */
1584 /* 25 */ "%a", /* stk13: ADDRLP */
1585 /* 26 */ "add %0,%%fp,%%%c\n", /* reg: stk13 */
1586 /* 27 */ "set %a,%%%c\n", /* stk: ADDRFP */
1587 /* 28 */ "set %a,%%%c\n", /* stk: ADDRLP */
1588 /* 29 */ "set %a,%%%c\nadd %%%c,%%fp,%%%c\n", /* reg: ADDRFP */
1589 /* 30 */ "set %a,%%%c\nadd %%%c,%%fp,%%%c\n", /* reg: ADDRLP */
1590 /* 31 */ "%a", /* con13: CNSTC */
1591 /* 32 */ "%a", /* con13: CNSTI */
1592 /* 33 */ "%a", /* con13: CNSTP */
1593 /* 34 */ "%a", /* con13: CNSTS */
1594 /* 35 */ "%a", /* con13: CNSTU */
1595 /* 36 */ "%%%0+%1", /* base: ADDI(reg,con13) */
1596 /* 37 */ "%%%0+%1", /* base: ADDP(reg,con13) */
1597 /* 38 */ "%%%0+%1", /* base: ADDU(reg,con13) */
1598 /* 39 */ "%%%0", /* base: reg */
1599 /* 40 */ "%0", /* base: con13 */
1600 /* 41 */ "%%fp+%0", /* base: stk13 */
1601 /* 42 */ "%0", /* addr: base */
1602 /* 43 */ "%%%0+%%%1", /* addr: ADDI(reg,reg) */
1603 /* 44 */ "%%%0+%%%1", /* addr: ADDP(reg,reg) */
1604 /* 45 */ "%%%0+%%%1", /* addr: ADDU(reg,reg) */
1605 /* 46 */ "%%fp+%%%0", /* addr: stk */
1606 /* 47 */ "ldsb [%0],%%%c\n", /* reg: INDIRC(addr) */
1607 /* 48 */ "ldsh [%0],%%%c\n", /* reg: INDIRS(addr) */
1608 /* 49 */ "ld [%0],%%%c\n", /* reg: INDIRI(addr) */
1609 /* 50 */ "ld [%0],%%%c\n", /* reg: INDIRP(addr) */
1610 /* 51 */ "ld [%0],%%f%c\n", /* reg: INDIRF(addr) */
1611 /* 52 */ "stb %%%1,[%0]\n", /* stmt: ASGNC(addr,reg) */
1612 /* 53 */ "sth %%%1,[%0]\n", /* stmt: ASGNS(addr,reg) */
1613 /* 54 */ "st %%%1,[%0]\n", /* stmt: ASGNI(addr,reg) */
1614 /* 55 */ "st %%%1,[%0]\n", /* stmt: ASGNP(addr,reg) */
1615 /* 56 */ "st %%f%1,[%0]\n", /* stmt: ASGNF(addr,reg) */
1616 /* 57 */ "%%%fp+%a", /* addrl: ADDRLP */
1617 /* 58 */ "ldd [%0],%%f%c\n", /* reg: INDIRD(addrl) */
1618 /* 59 */ "std %%f%1,[%0]\n", /* stmt: ASGND(addrl,reg) */
1619 /* 60 */ "ld2 [%0],%%f%c\n", /* reg: INDIRD(base) */
1620 /* 61 */ "st2 %%f%1,[%0]\n", /* stmt: ASGND(base,reg) */
1621 /* 62 */ "%a", /* spill: ADDRLP */
1622 /* 63 */ "set %0,%%g1\nstb %%%1,[%%fp+%%g1]\n", /* stmt: ASGNC(spill,reg) */
1623 /* 64 */ "set %0,%%g1\nsth %%%1,[%%fp+%%g1]\n", /* stmt: ASGNS(spill,reg) */
1624 /* 65 */ "set %0,%%g1\nst %%%1,[%%fp+%%g1]\n", /* stmt: ASGNI(spill,reg) */
1625 /* 66 */ "set %0,%%g1\nst %%%1,[%%fp+%%g1]\n", /* stmt: ASGNP(spill,reg) */
1626 /* 67 */ "set %0,%%g1\nst %%f%1,[%%fp+%%g1]\n", /* stmt: ASGNF(spill,reg) */
1627 /* 68 */ "set %0,%%g1\nstd %%f%1,[%%fp+%%g1]\n", /* stmt: ASGND(spill,reg) */
1628 /* 69 */ "ldsb [%0],%%%c\n", /* reg: CVCI(INDIRC(addr)) */
1629 /* 70 */ "ldsh [%0],%%%c\n", /* reg: CVSI(INDIRS(addr)) */
1630 /* 71 */ "ldub [%0],%%%c\n", /* reg: CVCU(INDIRC(addr)) */
1631 /* 72 */ "lduh [%0],%%%c\n", /* reg: CVSU(INDIRS(addr)) */
1632 /* 73 */ "mov %%%0,%%%c\n", /* reg: CVIC(reg) */
1633 /* 74 */ "mov %%%0,%%%c\n", /* reg: CVIS(reg) */
1634 /* 75 */ "mov %%%0,%%%c\n", /* reg: CVIU(reg) */
1635 /* 76 */ "mov %%%0,%%%c\n", /* reg: CVPU(reg) */
1636 /* 77 */ "mov %%%0,%%%c\n", /* reg: CVUC(reg) */
1637 /* 78 */ "mov %%%0,%%%c\n", /* reg: CVUI(reg) */
1638 /* 79 */ "mov %%%0,%%%c\n", /* reg: CVUP(reg) */
1639 /* 80 */ "mov %%%0,%%%c\n", /* reg: CVUS(reg) */
1640 /* 81 */ "%0", /* reg: CVIC(reg) */
1641 /* 82 */ "%0", /* reg: CVIS(reg) */
1642 /* 83 */ "%0", /* reg: CVUC(reg) */
1643 /* 84 */ "%0", /* reg: CVUS(reg) */
1644 /* 85 */ "mov %%%0,%%%c\n", /* reg: LOADC(reg) */
1645 /* 86 */ "mov %%%0,%%%c\n", /* reg: LOADI(reg) */
1646 /* 87 */ "mov %%%0,%%%c\n", /* reg: LOADP(reg) */
1647 /* 88 */ "mov %%%0,%%%c\n", /* reg: LOADS(reg) */
1648 /* 89 */ "mov %%%0,%%%c\n", /* reg: LOADU(reg) */
1649 /* 90 */ "# reg\n", /* reg: CNSTC */
1650 /* 91 */ "# reg\n", /* reg: CNSTI */
1651 /* 92 */ "# reg\n", /* reg: CNSTP */
1652 /* 93 */ "# reg\n", /* reg: CNSTS */
1653 /* 94 */ "# reg\n", /* reg: CNSTU */
1654 /* 95 */ "set %0,%%%c\n", /* reg: con */
1655 /* 96 */ "%0", /* rc: con13 */
1656 /* 97 */ "%%%0", /* rc: reg */
1657 /* 98 */ "add %%%0,%1,%%%c\n", /* reg: ADDI(reg,rc) */
1658 /* 99 */ "add %%%0,%1,%%%c\n", /* reg: ADDP(reg,rc) */
1659 /* 100 */ "add %%%0,%1,%%%c\n", /* reg: ADDU(reg,rc) */
1660 /* 101 */ "and %%%0,%1,%%%c\n", /* reg: BANDU(reg,rc) */
1661 /* 102 */ "or %%%0,%1,%%%c\n", /* reg: BORU(reg,rc) */
1662 /* 103 */ "xor %%%0,%1,%%%c\n", /* reg: BXORU(reg,rc) */
1663 /* 104 */ "sub %%%0,%1,%%%c\n", /* reg: SUBI(reg,rc) */
1664 /* 105 */ "sub %%%0,%1,%%%c\n", /* reg: SUBP(reg,rc) */
1665 /* 106 */ "sub %%%0,%1,%%%c\n", /* reg: SUBU(reg,rc) */
1666 /* 107 */ "%a", /* rc5: CNSTI */
1667 /* 108 */ "%%%0", /* rc5: reg */
1668 /* 109 */ "sll %%%0,%1,%%%c\n", /* reg: LSHI(reg,rc5) */
1669 /* 110 */ "sll %%%0,%1,%%%c\n", /* reg: LSHU(reg,rc5) */
1670 /* 111 */ "sra %%%0,%1,%%%c\n", /* reg: RSHI(reg,rc5) */
1671 /* 112 */ "srl %%%0,%1,%%%c\n", /* reg: RSHU(reg,rc5) */
1672 /* 113 */ "andn %%%0,%1,%%%c\n", /* reg: BANDU(reg,BCOMU(rc)) */
1673 /* 114 */ "orn %%%0,%1,%%%c\n", /* reg: BORU(reg,BCOMU(rc)) */
1674 /* 115 */ "xnor %%%0,%1,%%%c\n", /* reg: BXORU(reg,BCOMU(rc)) */
1675 /* 116 */ "neg %%%0,%%%c\n", /* reg: NEGI(reg) */
1676 /* 117 */ "not %%%0,%%%c\n", /* reg: BCOMU(reg) */
1677 /* 118 */ "sll %%%0,24,%%%c; sra %%%c,24,%%%c\n", /* reg: CVCI(reg) */
1678 /* 119 */ "sll %%%0,16,%%%c; sra %%%c,16,%%%c\n", /* reg: CVSI(reg) */
1679 /* 120 */ "and %%%0,0xff,%%%c\n", /* reg: CVCU(reg) */
1680 /* 121 */ "set 0xffff,%%g1; and %%%0,%%g1,%%%c\n", /* reg: CVSU(reg) */
1681 /* 122 */ "%a", /* addrg: ADDRGP */
1682 /* 123 */ "ba %0; nop\n", /* stmt: JUMPV(addrg) */
1683 /* 124 */ "jmp %0; nop\n", /* stmt: JUMPV(addr) */
1684 /* 125 */ "%a:\n", /* stmt: LABELV */
1685 /* 126 */ "cmp %%%0,%1; be %a; nop\n", /* stmt: EQI(reg,rc) */
1686 /* 127 */ "cmp %%%0,%1; bge %a; nop\n", /* stmt: GEI(reg,rc) */
1687 /* 128 */ "cmp %%%0,%1; bgeu %a; nop\n", /* stmt: GEU(reg,rc) */
1688 /* 129 */ "cmp %%%0,%1; bg %a; nop\n", /* stmt: GTI(reg,rc) */
1689 /* 130 */ "cmp %%%0,%1; bgu %a; nop\n", /* stmt: GTU(reg,rc) */
1690 /* 131 */ "cmp %%%0,%1; ble %a; nop\n", /* stmt: LEI(reg,rc) */
1691 /* 132 */ "cmp %%%0,%1; bleu %a; nop\n", /* stmt: LEU(reg,rc) */
1692 /* 133 */ "cmp %%%0,%1; bl %a; nop\n", /* stmt: LTI(reg,rc) */
1693 /* 134 */ "cmp %%%0,%1; blu %a; nop\n", /* stmt: LTU(reg,rc) */
1694 /* 135 */ "cmp %%%0,%1; bne %a; nop\n", /* stmt: NEI(reg,rc) */
1695 /* 136 */ "%a", /* call: ADDRGP */
1696 /* 137 */ "%0", /* call: addr */
1697 /* 138 */ "call %0; nop\n", /* reg: CALLD(call) */
1698 /* 139 */ "call %0; nop\n", /* reg: CALLF(call) */
1699 /* 140 */ "call %0; nop\n", /* reg: CALLI(call) */
1700 /* 141 */ "call %0; nop\n", /* stmt: CALLV(call) */
1701 /* 142 */ "call %0; st %%%1,[%%sp+64]\n", /* stmt: CALLB(call,reg) */
1702 /* 143 */ "# ret\n", /* stmt: RETD(reg) */
1703 /* 144 */ "# ret\n", /* stmt: RETF(reg) */
1704 /* 145 */ "# ret\n", /* stmt: RETI(reg) */
1705 /* 146 */ "st %%%0,[%%sp+4*%c+68]\n", /* stmt: ARGI(reg) */
1706 /* 147 */ "st %%%0,[%%sp+4*%c+68]\n", /* stmt: ARGP(reg) */
1707 /* 148 */ "# ARGD\n", /* stmt: ARGD(reg) */
1708 /* 149 */ "# ARGF\n", /* stmt: ARGF(reg) */
1709 /* 150 */ "call .div,2; nop\n", /* reg: DIVI(reg,reg) */
1710 /* 151 */ "call .udiv,2; nop\n", /* reg: DIVU(reg,reg) */
1711 /* 152 */ "call .rem,2; nop\n", /* reg: MODI(reg,reg) */
1712 /* 153 */ "call .urem,2; nop\n", /* reg: MODU(reg,reg) */
1713 /* 154 */ "call .mul,2; nop\n", /* reg: MULI(reg,reg) */
1714 /* 155 */ "call .umul,2; nop\n", /* reg: MULU(reg,reg) */
1715 /* 156 */ "faddd %%f%0,%%f%1,%%f%c\n", /* reg: ADDD(reg,reg) */
1716 /* 157 */ "fadds %%f%0,%%f%1,%%f%c\n", /* reg: ADDF(reg,reg) */
1717 /* 158 */ "fdivd %%f%0,%%f%1,%%f%c\n", /* reg: DIVD(reg,reg) */
1718 /* 159 */ "fdivs %%f%0,%%f%1,%%f%c\n", /* reg: DIVF(reg,reg) */
1719 /* 160 */ "fmuld %%f%0,%%f%1,%%f%c\n", /* reg: MULD(reg,reg) */
1720 /* 161 */ "fmuls %%f%0,%%f%1,%%f%c\n", /* reg: MULF(reg,reg) */
1721 /* 162 */ "fsubd %%f%0,%%f%1,%%f%c\n", /* reg: SUBD(reg,reg) */
1722 /* 163 */ "fsubs %%f%0,%%f%1,%%f%c\n", /* reg: SUBF(reg,reg) */
1723 /* 164 */ "fnegs %%f%0,%%f%c\n", /* reg: NEGF(reg) */
1724 /* 165 */ "fmovs %%f%0,%%f%c\n", /* reg: LOADF(reg) */
1725 /* 166 */ "fdtos %%f%0,%%f%c\n", /* reg: CVDF(reg) */
1726 /* 167 */ "fstod %%f%0,%%f%c\n", /* reg: CVFD(reg) */
1727 /* 168 */ "fdtoi %%f%0,%%f0; st %%f0,[%%sp+64]; ld [%%sp+64],%%%c\n", /* reg: CVDI(reg) */
1728 /* 169 */ "st %%%0,[%%sp+64]; ld [%%sp+64],%%f%c; fitod %%f%c,%%f%c\n", /* reg: CVID(reg) */
1729 /* 170 */ "fcmped %%f%0,%%f%1; nop; fbue", /* rel: EQD(reg,reg) */
1730 /* 171 */ "fcmpes %%f%0,%%f%1; nop; fbue", /* rel: EQF(reg,reg) */
1731 /* 172 */ "fcmped %%f%0,%%f%1; nop; fbuge", /* rel: GED(reg,reg) */
1732 /* 173 */ "fcmpes %%f%0,%%f%1; nop; fbuge", /* rel: GEF(reg,reg) */
1733 /* 174 */ "fcmped %%f%0,%%f%1; nop; fbug", /* rel: GTD(reg,reg) */
1734 /* 175 */ "fcmpes %%f%0,%%f%1; nop; fbug", /* rel: GTF(reg,reg) */
1735 /* 176 */ "fcmped %%f%0,%%f%1; nop; fbule", /* rel: LED(reg,reg) */
1736 /* 177 */ "fcmpes %%f%0,%%f%1; nop; fbule", /* rel: LEF(reg,reg) */
1737 /* 178 */ "fcmped %%f%0,%%f%1; nop; fbul", /* rel: LTD(reg,reg) */
1738 /* 179 */ "fcmpes %%f%0,%%f%1; nop; fbul", /* rel: LTF(reg,reg) */
1739 /* 180 */ "fcmped %%f%0,%%f%1; nop; fbne", /* rel: NED(reg,reg) */
1740 /* 181 */ "fcmpes %%f%0,%%f%1; nop; fbne", /* rel: NEF(reg,reg) */
1741 /* 182 */ "%0 %a; nop\n", /* stmt: rel */
1742 /* 183 */ "# LOADD\n", /* reg: LOADD(reg) */
1743 /* 184 */ "# NEGD\n", /* reg: NEGD(reg) */
1744 /* 185 */ "# ASGNB\n", /* stmt: ASGNB(reg,INDIRB(reg)) */
1747 static char _isinstruction[] = {
1748 /* 0 */ 0,
1749 /* 1 */ 1, /* # read register\n */
1750 /* 2 */ 1, /* # read register\n */
1751 /* 3 */ 1, /* # read register\n */
1752 /* 4 */ 1, /* # read register\n */
1753 /* 5 */ 1, /* # read register\n */
1754 /* 6 */ 1, /* # read register\n */
1755 /* 7 */ 1, /* # write register\n */
1756 /* 8 */ 1, /* # write register\n */
1757 /* 9 */ 1, /* # write register\n */
1758 /* 10 */ 1, /* # write register\n */
1759 /* 11 */ 1, /* # write register\n */
1760 /* 12 */ 1, /* # write register\n */
1761 /* 13 */ 0, /* %a */
1762 /* 14 */ 0, /* %a */
1763 /* 15 */ 0, /* %a */
1764 /* 16 */ 0, /* %a */
1765 /* 17 */ 0, /* %a */
1766 /* 18 */ 0, /* */
1767 /* 19 */ 0, /* %0 */
1768 /* 20 */ 0, /* %0 */
1769 /* 21 */ 0, /* %0 */
1770 /* 22 */ 0, /* %0 */
1771 /* 23 */ 1, /* set %a,%%%c\n */
1772 /* 24 */ 0, /* %a */
1773 /* 25 */ 0, /* %a */
1774 /* 26 */ 1, /* add %0,%%fp,%%%c\n */
1775 /* 27 */ 1, /* set %a,%%%c\n */
1776 /* 28 */ 1, /* set %a,%%%c\n */
1777 /* 29 */ 1, /* set %a,%%%c\nadd %%%c,%%fp,%%%c\n */
1778 /* 30 */ 1, /* set %a,%%%c\nadd %%%c,%%fp,%%%c\n */
1779 /* 31 */ 0, /* %a */
1780 /* 32 */ 0, /* %a */
1781 /* 33 */ 0, /* %a */
1782 /* 34 */ 0, /* %a */
1783 /* 35 */ 0, /* %a */
1784 /* 36 */ 0, /* %%%0+%1 */
1785 /* 37 */ 0, /* %%%0+%1 */
1786 /* 38 */ 0, /* %%%0+%1 */
1787 /* 39 */ 0, /* %%%0 */
1788 /* 40 */ 0, /* %0 */
1789 /* 41 */ 0, /* %%fp+%0 */
1790 /* 42 */ 0, /* %0 */
1791 /* 43 */ 0, /* %%%0+%%%1 */
1792 /* 44 */ 0, /* %%%0+%%%1 */
1793 /* 45 */ 0, /* %%%0+%%%1 */
1794 /* 46 */ 0, /* %%fp+%%%0 */
1795 /* 47 */ 1, /* ldsb [%0],%%%c\n */
1796 /* 48 */ 1, /* ldsh [%0],%%%c\n */
1797 /* 49 */ 1, /* ld [%0],%%%c\n */
1798 /* 50 */ 1, /* ld [%0],%%%c\n */
1799 /* 51 */ 1, /* ld [%0],%%f%c\n */
1800 /* 52 */ 1, /* stb %%%1,[%0]\n */
1801 /* 53 */ 1, /* sth %%%1,[%0]\n */
1802 /* 54 */ 1, /* st %%%1,[%0]\n */
1803 /* 55 */ 1, /* st %%%1,[%0]\n */
1804 /* 56 */ 1, /* st %%f%1,[%0]\n */
1805 /* 57 */ 0, /* %%%fp+%a */
1806 /* 58 */ 1, /* ldd [%0],%%f%c\n */
1807 /* 59 */ 1, /* std %%f%1,[%0]\n */
1808 /* 60 */ 1, /* ld2 [%0],%%f%c\n */
1809 /* 61 */ 1, /* st2 %%f%1,[%0]\n */
1810 /* 62 */ 0, /* %a */
1811 /* 63 */ 1, /* set %0,%%g1\nstb %%%1,[%%fp+%%g1]\n */
1812 /* 64 */ 1, /* set %0,%%g1\nsth %%%1,[%%fp+%%g1]\n */
1813 /* 65 */ 1, /* set %0,%%g1\nst %%%1,[%%fp+%%g1]\n */
1814 /* 66 */ 1, /* set %0,%%g1\nst %%%1,[%%fp+%%g1]\n */
1815 /* 67 */ 1, /* set %0,%%g1\nst %%f%1,[%%fp+%%g1]\n */
1816 /* 68 */ 1, /* set %0,%%g1\nstd %%f%1,[%%fp+%%g1]\n */
1817 /* 69 */ 1, /* ldsb [%0],%%%c\n */
1818 /* 70 */ 1, /* ldsh [%0],%%%c\n */
1819 /* 71 */ 1, /* ldub [%0],%%%c\n */
1820 /* 72 */ 1, /* lduh [%0],%%%c\n */
1821 /* 73 */ 1, /* mov %%%0,%%%c\n */
1822 /* 74 */ 1, /* mov %%%0,%%%c\n */
1823 /* 75 */ 1, /* mov %%%0,%%%c\n */
1824 /* 76 */ 1, /* mov %%%0,%%%c\n */
1825 /* 77 */ 1, /* mov %%%0,%%%c\n */
1826 /* 78 */ 1, /* mov %%%0,%%%c\n */
1827 /* 79 */ 1, /* mov %%%0,%%%c\n */
1828 /* 80 */ 1, /* mov %%%0,%%%c\n */
1829 /* 81 */ 0, /* %0 */
1830 /* 82 */ 0, /* %0 */
1831 /* 83 */ 0, /* %0 */
1832 /* 84 */ 0, /* %0 */
1833 /* 85 */ 1, /* mov %%%0,%%%c\n */
1834 /* 86 */ 1, /* mov %%%0,%%%c\n */
1835 /* 87 */ 1, /* mov %%%0,%%%c\n */
1836 /* 88 */ 1, /* mov %%%0,%%%c\n */
1837 /* 89 */ 1, /* mov %%%0,%%%c\n */
1838 /* 90 */ 1, /* # reg\n */
1839 /* 91 */ 1, /* # reg\n */
1840 /* 92 */ 1, /* # reg\n */
1841 /* 93 */ 1, /* # reg\n */
1842 /* 94 */ 1, /* # reg\n */
1843 /* 95 */ 1, /* set %0,%%%c\n */
1844 /* 96 */ 0, /* %0 */
1845 /* 97 */ 0, /* %%%0 */
1846 /* 98 */ 1, /* add %%%0,%1,%%%c\n */
1847 /* 99 */ 1, /* add %%%0,%1,%%%c\n */
1848 /* 100 */ 1, /* add %%%0,%1,%%%c\n */
1849 /* 101 */ 1, /* and %%%0,%1,%%%c\n */
1850 /* 102 */ 1, /* or %%%0,%1,%%%c\n */
1851 /* 103 */ 1, /* xor %%%0,%1,%%%c\n */
1852 /* 104 */ 1, /* sub %%%0,%1,%%%c\n */
1853 /* 105 */ 1, /* sub %%%0,%1,%%%c\n */
1854 /* 106 */ 1, /* sub %%%0,%1,%%%c\n */
1855 /* 107 */ 0, /* %a */
1856 /* 108 */ 0, /* %%%0 */
1857 /* 109 */ 1, /* sll %%%0,%1,%%%c\n */
1858 /* 110 */ 1, /* sll %%%0,%1,%%%c\n */
1859 /* 111 */ 1, /* sra %%%0,%1,%%%c\n */
1860 /* 112 */ 1, /* srl %%%0,%1,%%%c\n */
1861 /* 113 */ 1, /* andn %%%0,%1,%%%c\n */
1862 /* 114 */ 1, /* orn %%%0,%1,%%%c\n */
1863 /* 115 */ 1, /* xnor %%%0,%1,%%%c\n */
1864 /* 116 */ 1, /* neg %%%0,%%%c\n */
1865 /* 117 */ 1, /* not %%%0,%%%c\n */
1866 /* 118 */ 1, /* sll %%%0,24,%%%c; sra %%%c,24,%%%c\n */
1867 /* 119 */ 1, /* sll %%%0,16,%%%c; sra %%%c,16,%%%c\n */
1868 /* 120 */ 1, /* and %%%0,0xff,%%%c\n */
1869 /* 121 */ 1, /* set 0xffff,%%g1; and %%%0,%%g1,%%%c\n */
1870 /* 122 */ 0, /* %a */
1871 /* 123 */ 1, /* ba %0; nop\n */
1872 /* 124 */ 1, /* jmp %0; nop\n */
1873 /* 125 */ 1, /* %a:\n */
1874 /* 126 */ 1, /* cmp %%%0,%1; be %a; nop\n */
1875 /* 127 */ 1, /* cmp %%%0,%1; bge %a; nop\n */
1876 /* 128 */ 1, /* cmp %%%0,%1; bgeu %a; nop\n */
1877 /* 129 */ 1, /* cmp %%%0,%1; bg %a; nop\n */
1878 /* 130 */ 1, /* cmp %%%0,%1; bgu %a; nop\n */
1879 /* 131 */ 1, /* cmp %%%0,%1; ble %a; nop\n */
1880 /* 132 */ 1, /* cmp %%%0,%1; bleu %a; nop\n */
1881 /* 133 */ 1, /* cmp %%%0,%1; bl %a; nop\n */
1882 /* 134 */ 1, /* cmp %%%0,%1; blu %a; nop\n */
1883 /* 135 */ 1, /* cmp %%%0,%1; bne %a; nop\n */
1884 /* 136 */ 0, /* %a */
1885 /* 137 */ 0, /* %0 */
1886 /* 138 */ 1, /* call %0; nop\n */
1887 /* 139 */ 1, /* call %0; nop\n */
1888 /* 140 */ 1, /* call %0; nop\n */
1889 /* 141 */ 1, /* call %0; nop\n */
1890 /* 142 */ 1, /* call %0; st %%%1,[%%sp+64]\n */
1891 /* 143 */ 1, /* # ret\n */
1892 /* 144 */ 1, /* # ret\n */
1893 /* 145 */ 1, /* # ret\n */
1894 /* 146 */ 1, /* st %%%0,[%%sp+4*%c+68]\n */
1895 /* 147 */ 1, /* st %%%0,[%%sp+4*%c+68]\n */
1896 /* 148 */ 1, /* # ARGD\n */
1897 /* 149 */ 1, /* # ARGF\n */
1898 /* 150 */ 1, /* call .div,2; nop\n */
1899 /* 151 */ 1, /* call .udiv,2; nop\n */
1900 /* 152 */ 1, /* call .rem,2; nop\n */
1901 /* 153 */ 1, /* call .urem,2; nop\n */
1902 /* 154 */ 1, /* call .mul,2; nop\n */
1903 /* 155 */ 1, /* call .umul,2; nop\n */
1904 /* 156 */ 1, /* faddd %%f%0,%%f%1,%%f%c\n */
1905 /* 157 */ 1, /* fadds %%f%0,%%f%1,%%f%c\n */
1906 /* 158 */ 1, /* fdivd %%f%0,%%f%1,%%f%c\n */
1907 /* 159 */ 1, /* fdivs %%f%0,%%f%1,%%f%c\n */
1908 /* 160 */ 1, /* fmuld %%f%0,%%f%1,%%f%c\n */
1909 /* 161 */ 1, /* fmuls %%f%0,%%f%1,%%f%c\n */
1910 /* 162 */ 1, /* fsubd %%f%0,%%f%1,%%f%c\n */
1911 /* 163 */ 1, /* fsubs %%f%0,%%f%1,%%f%c\n */
1912 /* 164 */ 1, /* fnegs %%f%0,%%f%c\n */
1913 /* 165 */ 1, /* fmovs %%f%0,%%f%c\n */
1914 /* 166 */ 1, /* fdtos %%f%0,%%f%c\n */
1915 /* 167 */ 1, /* fstod %%f%0,%%f%c\n */
1916 /* 168 */ 1, /* fdtoi %%f%0,%%f0; st %%f0,[%%sp+64]; ld [%%sp+64],%%%c\n */
1917 /* 169 */ 1, /* st %%%0,[%%sp+64]; ld [%%sp+64],%%f%c; fitod %%f%c,%%f%c\n */
1918 /* 170 */ 0, /* fcmped %%f%0,%%f%1; nop; fbue */
1919 /* 171 */ 0, /* fcmpes %%f%0,%%f%1; nop; fbue */
1920 /* 172 */ 0, /* fcmped %%f%0,%%f%1; nop; fbuge */
1921 /* 173 */ 0, /* fcmpes %%f%0,%%f%1; nop; fbuge */
1922 /* 174 */ 0, /* fcmped %%f%0,%%f%1; nop; fbug */
1923 /* 175 */ 0, /* fcmpes %%f%0,%%f%1; nop; fbug */
1924 /* 176 */ 0, /* fcmped %%f%0,%%f%1; nop; fbule */
1925 /* 177 */ 0, /* fcmpes %%f%0,%%f%1; nop; fbule */
1926 /* 178 */ 0, /* fcmped %%f%0,%%f%1; nop; fbul */
1927 /* 179 */ 0, /* fcmpes %%f%0,%%f%1; nop; fbul */
1928 /* 180 */ 0, /* fcmped %%f%0,%%f%1; nop; fbne */
1929 /* 181 */ 0, /* fcmpes %%f%0,%%f%1; nop; fbne */
1930 /* 182 */ 1, /* %0 %a; nop\n */
1931 /* 183 */ 1, /* # LOADD\n */
1932 /* 184 */ 1, /* # NEGD\n */
1933 /* 185 */ 1, /* # ASGNB\n */
1936 static char *_string[] = {
1937 /* 0 */ 0,
1938 /* 1 */ "reg: INDIRC(VREGP)",
1939 /* 2 */ "reg: INDIRD(VREGP)",
1940 /* 3 */ "reg: INDIRF(VREGP)",
1941 /* 4 */ "reg: INDIRI(VREGP)",
1942 /* 5 */ "reg: INDIRP(VREGP)",
1943 /* 6 */ "reg: INDIRS(VREGP)",
1944 /* 7 */ "stmt: ASGNC(VREGP,reg)",
1945 /* 8 */ "stmt: ASGND(VREGP,reg)",
1946 /* 9 */ "stmt: ASGNF(VREGP,reg)",
1947 /* 10 */ "stmt: ASGNI(VREGP,reg)",
1948 /* 11 */ "stmt: ASGNP(VREGP,reg)",
1949 /* 12 */ "stmt: ASGNS(VREGP,reg)",
1950 /* 13 */ "con: CNSTC",
1951 /* 14 */ "con: CNSTI",
1952 /* 15 */ "con: CNSTP",
1953 /* 16 */ "con: CNSTS",
1954 /* 17 */ "con: CNSTU",
1955 /* 18 */ "stmt: reg",
1956 /* 19 */ "reg: CVIU(reg)",
1957 /* 20 */ "reg: CVPU(reg)",
1958 /* 21 */ "reg: CVUI(reg)",
1959 /* 22 */ "reg: CVUP(reg)",
1960 /* 23 */ "reg: ADDRGP",
1961 /* 24 */ "stk13: ADDRFP",
1962 /* 25 */ "stk13: ADDRLP",
1963 /* 26 */ "reg: stk13",
1964 /* 27 */ "stk: ADDRFP",
1965 /* 28 */ "stk: ADDRLP",
1966 /* 29 */ "reg: ADDRFP",
1967 /* 30 */ "reg: ADDRLP",
1968 /* 31 */ "con13: CNSTC",
1969 /* 32 */ "con13: CNSTI",
1970 /* 33 */ "con13: CNSTP",
1971 /* 34 */ "con13: CNSTS",
1972 /* 35 */ "con13: CNSTU",
1973 /* 36 */ "base: ADDI(reg,con13)",
1974 /* 37 */ "base: ADDP(reg,con13)",
1975 /* 38 */ "base: ADDU(reg,con13)",
1976 /* 39 */ "base: reg",
1977 /* 40 */ "base: con13",
1978 /* 41 */ "base: stk13",
1979 /* 42 */ "addr: base",
1980 /* 43 */ "addr: ADDI(reg,reg)",
1981 /* 44 */ "addr: ADDP(reg,reg)",
1982 /* 45 */ "addr: ADDU(reg,reg)",
1983 /* 46 */ "addr: stk",
1984 /* 47 */ "reg: INDIRC(addr)",
1985 /* 48 */ "reg: INDIRS(addr)",
1986 /* 49 */ "reg: INDIRI(addr)",
1987 /* 50 */ "reg: INDIRP(addr)",
1988 /* 51 */ "reg: INDIRF(addr)",
1989 /* 52 */ "stmt: ASGNC(addr,reg)",
1990 /* 53 */ "stmt: ASGNS(addr,reg)",
1991 /* 54 */ "stmt: ASGNI(addr,reg)",
1992 /* 55 */ "stmt: ASGNP(addr,reg)",
1993 /* 56 */ "stmt: ASGNF(addr,reg)",
1994 /* 57 */ "addrl: ADDRLP",
1995 /* 58 */ "reg: INDIRD(addrl)",
1996 /* 59 */ "stmt: ASGND(addrl,reg)",
1997 /* 60 */ "reg: INDIRD(base)",
1998 /* 61 */ "stmt: ASGND(base,reg)",
1999 /* 62 */ "spill: ADDRLP",
2000 /* 63 */ "stmt: ASGNC(spill,reg)",
2001 /* 64 */ "stmt: ASGNS(spill,reg)",
2002 /* 65 */ "stmt: ASGNI(spill,reg)",
2003 /* 66 */ "stmt: ASGNP(spill,reg)",
2004 /* 67 */ "stmt: ASGNF(spill,reg)",
2005 /* 68 */ "stmt: ASGND(spill,reg)",
2006 /* 69 */ "reg: CVCI(INDIRC(addr))",
2007 /* 70 */ "reg: CVSI(INDIRS(addr))",
2008 /* 71 */ "reg: CVCU(INDIRC(addr))",
2009 /* 72 */ "reg: CVSU(INDIRS(addr))",
2010 /* 73 */ "reg: CVIC(reg)",
2011 /* 74 */ "reg: CVIS(reg)",
2012 /* 75 */ "reg: CVIU(reg)",
2013 /* 76 */ "reg: CVPU(reg)",
2014 /* 77 */ "reg: CVUC(reg)",
2015 /* 78 */ "reg: CVUI(reg)",
2016 /* 79 */ "reg: CVUP(reg)",
2017 /* 80 */ "reg: CVUS(reg)",
2018 /* 81 */ "reg: CVIC(reg)",
2019 /* 82 */ "reg: CVIS(reg)",
2020 /* 83 */ "reg: CVUC(reg)",
2021 /* 84 */ "reg: CVUS(reg)",
2022 /* 85 */ "reg: LOADC(reg)",
2023 /* 86 */ "reg: LOADI(reg)",
2024 /* 87 */ "reg: LOADP(reg)",
2025 /* 88 */ "reg: LOADS(reg)",
2026 /* 89 */ "reg: LOADU(reg)",
2027 /* 90 */ "reg: CNSTC",
2028 /* 91 */ "reg: CNSTI",
2029 /* 92 */ "reg: CNSTP",
2030 /* 93 */ "reg: CNSTS",
2031 /* 94 */ "reg: CNSTU",
2032 /* 95 */ "reg: con",
2033 /* 96 */ "rc: con13",
2034 /* 97 */ "rc: reg",
2035 /* 98 */ "reg: ADDI(reg,rc)",
2036 /* 99 */ "reg: ADDP(reg,rc)",
2037 /* 100 */ "reg: ADDU(reg,rc)",
2038 /* 101 */ "reg: BANDU(reg,rc)",
2039 /* 102 */ "reg: BORU(reg,rc)",
2040 /* 103 */ "reg: BXORU(reg,rc)",
2041 /* 104 */ "reg: SUBI(reg,rc)",
2042 /* 105 */ "reg: SUBP(reg,rc)",
2043 /* 106 */ "reg: SUBU(reg,rc)",
2044 /* 107 */ "rc5: CNSTI",
2045 /* 108 */ "rc5: reg",
2046 /* 109 */ "reg: LSHI(reg,rc5)",
2047 /* 110 */ "reg: LSHU(reg,rc5)",
2048 /* 111 */ "reg: RSHI(reg,rc5)",
2049 /* 112 */ "reg: RSHU(reg,rc5)",
2050 /* 113 */ "reg: BANDU(reg,BCOMU(rc))",
2051 /* 114 */ "reg: BORU(reg,BCOMU(rc))",
2052 /* 115 */ "reg: BXORU(reg,BCOMU(rc))",
2053 /* 116 */ "reg: NEGI(reg)",
2054 /* 117 */ "reg: BCOMU(reg)",
2055 /* 118 */ "reg: CVCI(reg)",
2056 /* 119 */ "reg: CVSI(reg)",
2057 /* 120 */ "reg: CVCU(reg)",
2058 /* 121 */ "reg: CVSU(reg)",
2059 /* 122 */ "addrg: ADDRGP",
2060 /* 123 */ "stmt: JUMPV(addrg)",
2061 /* 124 */ "stmt: JUMPV(addr)",
2062 /* 125 */ "stmt: LABELV",
2063 /* 126 */ "stmt: EQI(reg,rc)",
2064 /* 127 */ "stmt: GEI(reg,rc)",
2065 /* 128 */ "stmt: GEU(reg,rc)",
2066 /* 129 */ "stmt: GTI(reg,rc)",
2067 /* 130 */ "stmt: GTU(reg,rc)",
2068 /* 131 */ "stmt: LEI(reg,rc)",
2069 /* 132 */ "stmt: LEU(reg,rc)",
2070 /* 133 */ "stmt: LTI(reg,rc)",
2071 /* 134 */ "stmt: LTU(reg,rc)",
2072 /* 135 */ "stmt: NEI(reg,rc)",
2073 /* 136 */ "call: ADDRGP",
2074 /* 137 */ "call: addr",
2075 /* 138 */ "reg: CALLD(call)",
2076 /* 139 */ "reg: CALLF(call)",
2077 /* 140 */ "reg: CALLI(call)",
2078 /* 141 */ "stmt: CALLV(call)",
2079 /* 142 */ "stmt: CALLB(call,reg)",
2080 /* 143 */ "stmt: RETD(reg)",
2081 /* 144 */ "stmt: RETF(reg)",
2082 /* 145 */ "stmt: RETI(reg)",
2083 /* 146 */ "stmt: ARGI(reg)",
2084 /* 147 */ "stmt: ARGP(reg)",
2085 /* 148 */ "stmt: ARGD(reg)",
2086 /* 149 */ "stmt: ARGF(reg)",
2087 /* 150 */ "reg: DIVI(reg,reg)",
2088 /* 151 */ "reg: DIVU(reg,reg)",
2089 /* 152 */ "reg: MODI(reg,reg)",
2090 /* 153 */ "reg: MODU(reg,reg)",
2091 /* 154 */ "reg: MULI(reg,reg)",
2092 /* 155 */ "reg: MULU(reg,reg)",
2093 /* 156 */ "reg: ADDD(reg,reg)",
2094 /* 157 */ "reg: ADDF(reg,reg)",
2095 /* 158 */ "reg: DIVD(reg,reg)",
2096 /* 159 */ "reg: DIVF(reg,reg)",
2097 /* 160 */ "reg: MULD(reg,reg)",
2098 /* 161 */ "reg: MULF(reg,reg)",
2099 /* 162 */ "reg: SUBD(reg,reg)",
2100 /* 163 */ "reg: SUBF(reg,reg)",
2101 /* 164 */ "reg: NEGF(reg)",
2102 /* 165 */ "reg: LOADF(reg)",
2103 /* 166 */ "reg: CVDF(reg)",
2104 /* 167 */ "reg: CVFD(reg)",
2105 /* 168 */ "reg: CVDI(reg)",
2106 /* 169 */ "reg: CVID(reg)",
2107 /* 170 */ "rel: EQD(reg,reg)",
2108 /* 171 */ "rel: EQF(reg,reg)",
2109 /* 172 */ "rel: GED(reg,reg)",
2110 /* 173 */ "rel: GEF(reg,reg)",
2111 /* 174 */ "rel: GTD(reg,reg)",
2112 /* 175 */ "rel: GTF(reg,reg)",
2113 /* 176 */ "rel: LED(reg,reg)",
2114 /* 177 */ "rel: LEF(reg,reg)",
2115 /* 178 */ "rel: LTD(reg,reg)",
2116 /* 179 */ "rel: LTF(reg,reg)",
2117 /* 180 */ "rel: NED(reg,reg)",
2118 /* 181 */ "rel: NEF(reg,reg)",
2119 /* 182 */ "stmt: rel",
2120 /* 183 */ "reg: LOADD(reg)",
2121 /* 184 */ "reg: NEGD(reg)",
2122 /* 185 */ "stmt: ASGNB(reg,INDIRB(reg))",
2125 static short _decode_stmt[] = {
2147 123,
2148 124,
2149 125,
2150 126,
2151 127,
2152 128,
2153 129,
2154 130,
2155 131,
2156 132,
2157 133,
2158 134,
2159 135,
2160 141,
2161 142,
2162 143,
2163 144,
2164 145,
2165 146,
2166 147,
2167 148,
2168 149,
2169 182,
2170 185,
2173 static short _decode_reg[] = {
2225 100,
2226 101,
2227 102,
2228 103,
2229 104,
2230 105,
2231 106,
2232 109,
2233 110,
2234 111,
2235 112,
2236 113,
2237 114,
2238 115,
2239 116,
2240 117,
2241 118,
2242 119,
2243 120,
2244 121,
2245 138,
2246 139,
2247 140,
2248 150,
2249 151,
2250 152,
2251 153,
2252 154,
2253 155,
2254 156,
2255 157,
2256 158,
2257 159,
2258 160,
2259 161,
2260 162,
2261 163,
2262 164,
2263 165,
2264 166,
2265 167,
2266 168,
2267 169,
2268 183,
2269 184,
2272 static short _decode_con[] = {
2281 static short _decode_stk13[] = {
2287 static short _decode_stk[] = {
2293 static short _decode_con13[] = {
2302 static short _decode_base[] = {
2312 static short _decode_addr[] = {
2321 static short _decode_addrl[] = {
2326 static short _decode_spill[] = {
2331 static short _decode_rc[] = {
2337 static short _decode_rc5[] = {
2339 107,
2340 108,
2343 static short _decode_addrg[] = {
2345 122,
2348 static short _decode_call[] = {
2350 136,
2351 137,
2354 static short _decode_rel[] = {
2356 170,
2357 171,
2358 172,
2359 173,
2360 174,
2361 175,
2362 176,
2363 177,
2364 178,
2365 179,
2366 180,
2367 181,
2370 static int _rule(state, goalnt) void *state; int goalnt; {
2371 if (goalnt < 1 || goalnt > 15)
2372 fatal("_rule", "Bad goal nonterminal %d\n", goalnt);
2373 if (!state)
2374 return 0;
2375 switch (goalnt) {
2376 case _stmt_NT: return _decode_stmt[((struct _state *)state)->rule._stmt];
2377 case _reg_NT: return _decode_reg[((struct _state *)state)->rule._reg];
2378 case _con_NT: return _decode_con[((struct _state *)state)->rule._con];
2379 case _stk13_NT: return _decode_stk13[((struct _state *)state)->rule._stk13];
2380 case _stk_NT: return _decode_stk[((struct _state *)state)->rule._stk];
2381 case _con13_NT: return _decode_con13[((struct _state *)state)->rule._con13];
2382 case _base_NT: return _decode_base[((struct _state *)state)->rule._base];
2383 case _addr_NT: return _decode_addr[((struct _state *)state)->rule._addr];
2384 case _addrl_NT: return _decode_addrl[((struct _state *)state)->rule._addrl];
2385 case _spill_NT: return _decode_spill[((struct _state *)state)->rule._spill];
2386 case _rc_NT: return _decode_rc[((struct _state *)state)->rule._rc];
2387 case _rc5_NT: return _decode_rc5[((struct _state *)state)->rule._rc5];
2388 case _addrg_NT: return _decode_addrg[((struct _state *)state)->rule._addrg];
2389 case _call_NT: return _decode_call[((struct _state *)state)->rule._call];
2390 case _rel_NT: return _decode_rel[((struct _state *)state)->rule._rel];
2391 default:
2392 fatal("_rule", "Bad goal nonterminal %d\n", goalnt);
2393 return 0;
2397 static void _closure_reg ARGS((NODEPTR_TYPE, int));
2398 static void _closure_con ARGS((NODEPTR_TYPE, int));
2399 static void _closure_stk13 ARGS((NODEPTR_TYPE, int));
2400 static void _closure_stk ARGS((NODEPTR_TYPE, int));
2401 static void _closure_con13 ARGS((NODEPTR_TYPE, int));
2402 static void _closure_base ARGS((NODEPTR_TYPE, int));
2403 static void _closure_addr ARGS((NODEPTR_TYPE, int));
2404 static void _closure_rel ARGS((NODEPTR_TYPE, int));
2406 static void _closure_reg(a, c) NODEPTR_TYPE a; int c; {
2407 struct _state *p = STATE_LABEL(a);
2408 if (c + 0 < p->cost[_rc5_NT]) {
2409 p->cost[_rc5_NT] = c + 0;
2410 p->rule._rc5 = 2;
2412 if (c + 0 < p->cost[_rc_NT]) {
2413 p->cost[_rc_NT] = c + 0;
2414 p->rule._rc = 2;
2416 if (c + 0 < p->cost[_base_NT]) {
2417 p->cost[_base_NT] = c + 0;
2418 p->rule._base = 4;
2419 _closure_base(a, c + 0);
2421 if (c + 0 < p->cost[_stmt_NT]) {
2422 p->cost[_stmt_NT] = c + 0;
2423 p->rule._stmt = 7;
2427 static void _closure_con(a, c) NODEPTR_TYPE a; int c; {
2428 struct _state *p = STATE_LABEL(a);
2429 if (c + 1 < p->cost[_reg_NT]) {
2430 p->cost[_reg_NT] = c + 1;
2431 p->rule._reg = 48;
2432 _closure_reg(a, c + 1);
2436 static void _closure_stk13(a, c) NODEPTR_TYPE a; int c; {
2437 struct _state *p = STATE_LABEL(a);
2438 if (c + 0 < p->cost[_base_NT]) {
2439 p->cost[_base_NT] = c + 0;
2440 p->rule._base = 6;
2441 _closure_base(a, c + 0);
2443 if (c + 1 < p->cost[_reg_NT]) {
2444 p->cost[_reg_NT] = c + 1;
2445 p->rule._reg = 12;
2446 _closure_reg(a, c + 1);
2450 static void _closure_stk(a, c) NODEPTR_TYPE a; int c; {
2451 struct _state *p = STATE_LABEL(a);
2452 if (c + 0 < p->cost[_addr_NT]) {
2453 p->cost[_addr_NT] = c + 0;
2454 p->rule._addr = 5;
2455 _closure_addr(a, c + 0);
2459 static void _closure_con13(a, c) NODEPTR_TYPE a; int c; {
2460 struct _state *p = STATE_LABEL(a);
2461 if (c + 0 < p->cost[_rc_NT]) {
2462 p->cost[_rc_NT] = c + 0;
2463 p->rule._rc = 1;
2465 if (c + 0 < p->cost[_base_NT]) {
2466 p->cost[_base_NT] = c + 0;
2467 p->rule._base = 5;
2468 _closure_base(a, c + 0);
2472 static void _closure_base(a, c) NODEPTR_TYPE a; int c; {
2473 struct _state *p = STATE_LABEL(a);
2474 if (c + 0 < p->cost[_addr_NT]) {
2475 p->cost[_addr_NT] = c + 0;
2476 p->rule._addr = 1;
2477 _closure_addr(a, c + 0);
2481 static void _closure_addr(a, c) NODEPTR_TYPE a; int c; {
2482 struct _state *p = STATE_LABEL(a);
2483 if (c + 0 < p->cost[_call_NT]) {
2484 p->cost[_call_NT] = c + 0;
2485 p->rule._call = 2;
2489 static void _closure_rel(a, c) NODEPTR_TYPE a; int c; {
2490 struct _state *p = STATE_LABEL(a);
2491 if (c + 4 < p->cost[_stmt_NT]) {
2492 p->cost[_stmt_NT] = c + 4;
2493 p->rule._stmt = 43;
2497 static void _label(a) NODEPTR_TYPE a; {
2498 int c;
2499 struct _state *p;
2501 if (!a)
2502 fatal("_label", "Null tree\n", 0);
2503 STATE_LABEL(a) = p = allocate(sizeof *p, FUNC);
2504 p->rule._stmt = 0;
2505 p->cost[1] =
2506 p->cost[2] =
2507 p->cost[3] =
2508 p->cost[4] =
2509 p->cost[5] =
2510 p->cost[6] =
2511 p->cost[7] =
2512 p->cost[8] =
2513 p->cost[9] =
2514 p->cost[10] =
2515 p->cost[11] =
2516 p->cost[12] =
2517 p->cost[13] =
2518 p->cost[14] =
2519 p->cost[15] =
2520 0x7fff;
2521 switch (OP_LABEL(a)) {
2522 case 17: /* CNSTF */
2523 break;
2524 case 18: /* CNSTD */
2525 break;
2526 case 19: /* CNSTC */
2527 /* con: CNSTC */
2528 c = 0;
2529 if (c + 0 < p->cost[_con_NT]) {
2530 p->cost[_con_NT] = c + 0;
2531 p->rule._con = 1;
2532 _closure_con(a, c + 0);
2534 /* con13: CNSTC */
2535 c = imm(a);
2536 if (c + 0 < p->cost[_con13_NT]) {
2537 p->cost[_con13_NT] = c + 0;
2538 p->rule._con13 = 1;
2539 _closure_con13(a, c + 0);
2541 /* reg: CNSTC */
2542 c = range(a, 0, 0);
2543 if (c + 0 < p->cost[_reg_NT]) {
2544 p->cost[_reg_NT] = c + 0;
2545 p->rule._reg = 43;
2546 _closure_reg(a, c + 0);
2548 break;
2549 case 20: /* CNSTS */
2550 /* con: CNSTS */
2551 c = 0;
2552 if (c + 0 < p->cost[_con_NT]) {
2553 p->cost[_con_NT] = c + 0;
2554 p->rule._con = 4;
2555 _closure_con(a, c + 0);
2557 /* con13: CNSTS */
2558 c = imm(a);
2559 if (c + 0 < p->cost[_con13_NT]) {
2560 p->cost[_con13_NT] = c + 0;
2561 p->rule._con13 = 4;
2562 _closure_con13(a, c + 0);
2564 /* reg: CNSTS */
2565 c = range(a, 0, 0);
2566 if (c + 0 < p->cost[_reg_NT]) {
2567 p->cost[_reg_NT] = c + 0;
2568 p->rule._reg = 46;
2569 _closure_reg(a, c + 0);
2571 break;
2572 case 21: /* CNSTI */
2573 /* con: CNSTI */
2574 c = 0;
2575 if (c + 0 < p->cost[_con_NT]) {
2576 p->cost[_con_NT] = c + 0;
2577 p->rule._con = 2;
2578 _closure_con(a, c + 0);
2580 /* con13: CNSTI */
2581 c = imm(a);
2582 if (c + 0 < p->cost[_con13_NT]) {
2583 p->cost[_con13_NT] = c + 0;
2584 p->rule._con13 = 2;
2585 _closure_con13(a, c + 0);
2587 /* reg: CNSTI */
2588 c = range(a, 0, 0);
2589 if (c + 0 < p->cost[_reg_NT]) {
2590 p->cost[_reg_NT] = c + 0;
2591 p->rule._reg = 44;
2592 _closure_reg(a, c + 0);
2594 /* rc5: CNSTI */
2595 c = range(a, 0, 31);
2596 if (c + 0 < p->cost[_rc5_NT]) {
2597 p->cost[_rc5_NT] = c + 0;
2598 p->rule._rc5 = 1;
2600 break;
2601 case 22: /* CNSTU */
2602 /* con: CNSTU */
2603 c = 0;
2604 if (c + 0 < p->cost[_con_NT]) {
2605 p->cost[_con_NT] = c + 0;
2606 p->rule._con = 5;
2607 _closure_con(a, c + 0);
2609 /* con13: CNSTU */
2610 c = imm(a);
2611 if (c + 0 < p->cost[_con13_NT]) {
2612 p->cost[_con13_NT] = c + 0;
2613 p->rule._con13 = 5;
2614 _closure_con13(a, c + 0);
2616 /* reg: CNSTU */
2617 c = range(a, 0, 0);
2618 if (c + 0 < p->cost[_reg_NT]) {
2619 p->cost[_reg_NT] = c + 0;
2620 p->rule._reg = 47;
2621 _closure_reg(a, c + 0);
2623 break;
2624 case 23: /* CNSTP */
2625 /* con: CNSTP */
2626 c = 0;
2627 if (c + 0 < p->cost[_con_NT]) {
2628 p->cost[_con_NT] = c + 0;
2629 p->rule._con = 3;
2630 _closure_con(a, c + 0);
2632 /* con13: CNSTP */
2633 c = imm(a);
2634 if (c + 0 < p->cost[_con13_NT]) {
2635 p->cost[_con13_NT] = c + 0;
2636 p->rule._con13 = 3;
2637 _closure_con13(a, c + 0);
2639 /* reg: CNSTP */
2640 c = range(a, 0, 0);
2641 if (c + 0 < p->cost[_reg_NT]) {
2642 p->cost[_reg_NT] = c + 0;
2643 p->rule._reg = 45;
2644 _closure_reg(a, c + 0);
2646 break;
2647 case 33: /* ARGF */
2648 _label(LEFT_CHILD(a));
2649 /* stmt: ARGF(reg) */
2650 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2651 if (c + 0 < p->cost[_stmt_NT]) {
2652 p->cost[_stmt_NT] = c + 0;
2653 p->rule._stmt = 42;
2655 break;
2656 case 34: /* ARGD */
2657 _label(LEFT_CHILD(a));
2658 /* stmt: ARGD(reg) */
2659 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2660 if (c + 0 < p->cost[_stmt_NT]) {
2661 p->cost[_stmt_NT] = c + 0;
2662 p->rule._stmt = 41;
2664 break;
2665 case 37: /* ARGI */
2666 _label(LEFT_CHILD(a));
2667 /* stmt: ARGI(reg) */
2668 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2669 if (c + 0 < p->cost[_stmt_NT]) {
2670 p->cost[_stmt_NT] = c + 0;
2671 p->rule._stmt = 39;
2673 break;
2674 case 39: /* ARGP */
2675 _label(LEFT_CHILD(a));
2676 /* stmt: ARGP(reg) */
2677 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2678 if (c + 0 < p->cost[_stmt_NT]) {
2679 p->cost[_stmt_NT] = c + 0;
2680 p->rule._stmt = 40;
2682 break;
2683 case 41: /* ARGB */
2684 break;
2685 case 49: /* ASGNF */
2686 _label(LEFT_CHILD(a));
2687 _label(RIGHT_CHILD(a));
2688 if ( /* stmt: ASGNF(VREGP,reg) */
2689 LEFT_CHILD(a)->op == 615 /* VREGP */
2691 c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2692 if (c + 0 < p->cost[_stmt_NT]) {
2693 p->cost[_stmt_NT] = c + 0;
2694 p->rule._stmt = 3;
2697 /* stmt: ASGNF(addr,reg) */
2698 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2699 if (c + 0 < p->cost[_stmt_NT]) {
2700 p->cost[_stmt_NT] = c + 0;
2701 p->rule._stmt = 12;
2703 /* stmt: ASGNF(spill,reg) */
2704 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2705 if (c + 0 < p->cost[_stmt_NT]) {
2706 p->cost[_stmt_NT] = c + 0;
2707 p->rule._stmt = 19;
2709 break;
2710 case 50: /* ASGND */
2711 _label(LEFT_CHILD(a));
2712 _label(RIGHT_CHILD(a));
2713 if ( /* stmt: ASGND(VREGP,reg) */
2714 LEFT_CHILD(a)->op == 615 /* VREGP */
2716 c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2717 if (c + 0 < p->cost[_stmt_NT]) {
2718 p->cost[_stmt_NT] = c + 0;
2719 p->rule._stmt = 2;
2722 /* stmt: ASGND(addrl,reg) */
2723 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addrl_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2724 if (c + 0 < p->cost[_stmt_NT]) {
2725 p->cost[_stmt_NT] = c + 0;
2726 p->rule._stmt = 13;
2728 /* stmt: ASGND(base,reg) */
2729 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_base_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
2730 if (c + 0 < p->cost[_stmt_NT]) {
2731 p->cost[_stmt_NT] = c + 0;
2732 p->rule._stmt = 14;
2734 /* stmt: ASGND(spill,reg) */
2735 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2736 if (c + 0 < p->cost[_stmt_NT]) {
2737 p->cost[_stmt_NT] = c + 0;
2738 p->rule._stmt = 20;
2740 break;
2741 case 51: /* ASGNC */
2742 _label(LEFT_CHILD(a));
2743 _label(RIGHT_CHILD(a));
2744 if ( /* stmt: ASGNC(VREGP,reg) */
2745 LEFT_CHILD(a)->op == 615 /* VREGP */
2747 c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2748 if (c + 0 < p->cost[_stmt_NT]) {
2749 p->cost[_stmt_NT] = c + 0;
2750 p->rule._stmt = 1;
2753 /* stmt: ASGNC(addr,reg) */
2754 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2755 if (c + 0 < p->cost[_stmt_NT]) {
2756 p->cost[_stmt_NT] = c + 0;
2757 p->rule._stmt = 8;
2759 /* stmt: ASGNC(spill,reg) */
2760 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2761 if (c + 0 < p->cost[_stmt_NT]) {
2762 p->cost[_stmt_NT] = c + 0;
2763 p->rule._stmt = 15;
2765 break;
2766 case 52: /* ASGNS */
2767 _label(LEFT_CHILD(a));
2768 _label(RIGHT_CHILD(a));
2769 if ( /* stmt: ASGNS(VREGP,reg) */
2770 LEFT_CHILD(a)->op == 615 /* VREGP */
2772 c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2773 if (c + 0 < p->cost[_stmt_NT]) {
2774 p->cost[_stmt_NT] = c + 0;
2775 p->rule._stmt = 6;
2778 /* stmt: ASGNS(addr,reg) */
2779 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2780 if (c + 0 < p->cost[_stmt_NT]) {
2781 p->cost[_stmt_NT] = c + 0;
2782 p->rule._stmt = 9;
2784 /* stmt: ASGNS(spill,reg) */
2785 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2786 if (c + 0 < p->cost[_stmt_NT]) {
2787 p->cost[_stmt_NT] = c + 0;
2788 p->rule._stmt = 16;
2790 break;
2791 case 53: /* ASGNI */
2792 _label(LEFT_CHILD(a));
2793 _label(RIGHT_CHILD(a));
2794 if ( /* stmt: ASGNI(VREGP,reg) */
2795 LEFT_CHILD(a)->op == 615 /* VREGP */
2797 c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2798 if (c + 0 < p->cost[_stmt_NT]) {
2799 p->cost[_stmt_NT] = c + 0;
2800 p->rule._stmt = 4;
2803 /* stmt: ASGNI(addr,reg) */
2804 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2805 if (c + 0 < p->cost[_stmt_NT]) {
2806 p->cost[_stmt_NT] = c + 0;
2807 p->rule._stmt = 10;
2809 /* stmt: ASGNI(spill,reg) */
2810 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2811 if (c + 0 < p->cost[_stmt_NT]) {
2812 p->cost[_stmt_NT] = c + 0;
2813 p->rule._stmt = 17;
2815 break;
2816 case 55: /* ASGNP */
2817 _label(LEFT_CHILD(a));
2818 _label(RIGHT_CHILD(a));
2819 if ( /* stmt: ASGNP(VREGP,reg) */
2820 LEFT_CHILD(a)->op == 615 /* VREGP */
2822 c = ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2823 if (c + 0 < p->cost[_stmt_NT]) {
2824 p->cost[_stmt_NT] = c + 0;
2825 p->rule._stmt = 5;
2828 /* stmt: ASGNP(addr,reg) */
2829 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
2830 if (c + 0 < p->cost[_stmt_NT]) {
2831 p->cost[_stmt_NT] = c + 0;
2832 p->rule._stmt = 11;
2834 /* stmt: ASGNP(spill,reg) */
2835 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_spill_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
2836 if (c + 0 < p->cost[_stmt_NT]) {
2837 p->cost[_stmt_NT] = c + 0;
2838 p->rule._stmt = 18;
2840 break;
2841 case 57: /* ASGNB */
2842 _label(LEFT_CHILD(a));
2843 _label(RIGHT_CHILD(a));
2844 if ( /* stmt: ASGNB(reg,INDIRB(reg)) */
2845 RIGHT_CHILD(a)->op == 73 /* INDIRB */
2847 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(LEFT_CHILD(RIGHT_CHILD(a))->x.state))->cost[_reg_NT] + 0;
2848 if (c + 0 < p->cost[_stmt_NT]) {
2849 p->cost[_stmt_NT] = c + 0;
2850 p->rule._stmt = 44;
2853 break;
2854 case 65: /* INDIRF */
2855 _label(LEFT_CHILD(a));
2856 if ( /* reg: INDIRF(VREGP) */
2857 LEFT_CHILD(a)->op == 615 /* VREGP */
2859 if (mayrecalc(a)) {
2860 struct _state *q = a->syms[RX]->u.t.cse->x.state;
2861 if (q->cost[_stmt_NT] == 0) {
2862 p->cost[_stmt_NT] = 0;
2863 p->rule._stmt = q->rule._stmt;
2865 if (q->cost[_reg_NT] == 0) {
2866 p->cost[_reg_NT] = 0;
2867 p->rule._reg = q->rule._reg;
2869 if (q->cost[_con_NT] == 0) {
2870 p->cost[_con_NT] = 0;
2871 p->rule._con = q->rule._con;
2873 if (q->cost[_stk13_NT] == 0) {
2874 p->cost[_stk13_NT] = 0;
2875 p->rule._stk13 = q->rule._stk13;
2877 if (q->cost[_stk_NT] == 0) {
2878 p->cost[_stk_NT] = 0;
2879 p->rule._stk = q->rule._stk;
2881 if (q->cost[_con13_NT] == 0) {
2882 p->cost[_con13_NT] = 0;
2883 p->rule._con13 = q->rule._con13;
2885 if (q->cost[_base_NT] == 0) {
2886 p->cost[_base_NT] = 0;
2887 p->rule._base = q->rule._base;
2889 if (q->cost[_addr_NT] == 0) {
2890 p->cost[_addr_NT] = 0;
2891 p->rule._addr = q->rule._addr;
2893 if (q->cost[_addrl_NT] == 0) {
2894 p->cost[_addrl_NT] = 0;
2895 p->rule._addrl = q->rule._addrl;
2897 if (q->cost[_spill_NT] == 0) {
2898 p->cost[_spill_NT] = 0;
2899 p->rule._spill = q->rule._spill;
2901 if (q->cost[_rc_NT] == 0) {
2902 p->cost[_rc_NT] = 0;
2903 p->rule._rc = q->rule._rc;
2905 if (q->cost[_rc5_NT] == 0) {
2906 p->cost[_rc5_NT] = 0;
2907 p->rule._rc5 = q->rule._rc5;
2909 if (q->cost[_addrg_NT] == 0) {
2910 p->cost[_addrg_NT] = 0;
2911 p->rule._addrg = q->rule._addrg;
2913 if (q->cost[_call_NT] == 0) {
2914 p->cost[_call_NT] = 0;
2915 p->rule._call = q->rule._call;
2917 if (q->cost[_rel_NT] == 0) {
2918 p->cost[_rel_NT] = 0;
2919 p->rule._rel = q->rule._rel;
2922 c = 0;
2923 if (c + 0 < p->cost[_reg_NT]) {
2924 p->cost[_reg_NT] = c + 0;
2925 p->rule._reg = 3;
2926 _closure_reg(a, c + 0);
2929 /* reg: INDIRF(addr) */
2930 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1;
2931 if (c + 0 < p->cost[_reg_NT]) {
2932 p->cost[_reg_NT] = c + 0;
2933 p->rule._reg = 19;
2934 _closure_reg(a, c + 0);
2936 break;
2937 case 66: /* INDIRD */
2938 _label(LEFT_CHILD(a));
2939 if ( /* reg: INDIRD(VREGP) */
2940 LEFT_CHILD(a)->op == 615 /* VREGP */
2942 if (mayrecalc(a)) {
2943 struct _state *q = a->syms[RX]->u.t.cse->x.state;
2944 if (q->cost[_stmt_NT] == 0) {
2945 p->cost[_stmt_NT] = 0;
2946 p->rule._stmt = q->rule._stmt;
2948 if (q->cost[_reg_NT] == 0) {
2949 p->cost[_reg_NT] = 0;
2950 p->rule._reg = q->rule._reg;
2952 if (q->cost[_con_NT] == 0) {
2953 p->cost[_con_NT] = 0;
2954 p->rule._con = q->rule._con;
2956 if (q->cost[_stk13_NT] == 0) {
2957 p->cost[_stk13_NT] = 0;
2958 p->rule._stk13 = q->rule._stk13;
2960 if (q->cost[_stk_NT] == 0) {
2961 p->cost[_stk_NT] = 0;
2962 p->rule._stk = q->rule._stk;
2964 if (q->cost[_con13_NT] == 0) {
2965 p->cost[_con13_NT] = 0;
2966 p->rule._con13 = q->rule._con13;
2968 if (q->cost[_base_NT] == 0) {
2969 p->cost[_base_NT] = 0;
2970 p->rule._base = q->rule._base;
2972 if (q->cost[_addr_NT] == 0) {
2973 p->cost[_addr_NT] = 0;
2974 p->rule._addr = q->rule._addr;
2976 if (q->cost[_addrl_NT] == 0) {
2977 p->cost[_addrl_NT] = 0;
2978 p->rule._addrl = q->rule._addrl;
2980 if (q->cost[_spill_NT] == 0) {
2981 p->cost[_spill_NT] = 0;
2982 p->rule._spill = q->rule._spill;
2984 if (q->cost[_rc_NT] == 0) {
2985 p->cost[_rc_NT] = 0;
2986 p->rule._rc = q->rule._rc;
2988 if (q->cost[_rc5_NT] == 0) {
2989 p->cost[_rc5_NT] = 0;
2990 p->rule._rc5 = q->rule._rc5;
2992 if (q->cost[_addrg_NT] == 0) {
2993 p->cost[_addrg_NT] = 0;
2994 p->rule._addrg = q->rule._addrg;
2996 if (q->cost[_call_NT] == 0) {
2997 p->cost[_call_NT] = 0;
2998 p->rule._call = q->rule._call;
3000 if (q->cost[_rel_NT] == 0) {
3001 p->cost[_rel_NT] = 0;
3002 p->rule._rel = q->rule._rel;
3005 c = 0;
3006 if (c + 0 < p->cost[_reg_NT]) {
3007 p->cost[_reg_NT] = c + 0;
3008 p->rule._reg = 2;
3009 _closure_reg(a, c + 0);
3012 /* reg: INDIRD(addrl) */
3013 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addrl_NT] + 1;
3014 if (c + 0 < p->cost[_reg_NT]) {
3015 p->cost[_reg_NT] = c + 0;
3016 p->rule._reg = 20;
3017 _closure_reg(a, c + 0);
3019 /* reg: INDIRD(base) */
3020 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_base_NT] + 2;
3021 if (c + 0 < p->cost[_reg_NT]) {
3022 p->cost[_reg_NT] = c + 0;
3023 p->rule._reg = 21;
3024 _closure_reg(a, c + 0);
3026 break;
3027 case 67: /* INDIRC */
3028 _label(LEFT_CHILD(a));
3029 if ( /* reg: INDIRC(VREGP) */
3030 LEFT_CHILD(a)->op == 615 /* VREGP */
3032 if (mayrecalc(a)) {
3033 struct _state *q = a->syms[RX]->u.t.cse->x.state;
3034 if (q->cost[_stmt_NT] == 0) {
3035 p->cost[_stmt_NT] = 0;
3036 p->rule._stmt = q->rule._stmt;
3038 if (q->cost[_reg_NT] == 0) {
3039 p->cost[_reg_NT] = 0;
3040 p->rule._reg = q->rule._reg;
3042 if (q->cost[_con_NT] == 0) {
3043 p->cost[_con_NT] = 0;
3044 p->rule._con = q->rule._con;
3046 if (q->cost[_stk13_NT] == 0) {
3047 p->cost[_stk13_NT] = 0;
3048 p->rule._stk13 = q->rule._stk13;
3050 if (q->cost[_stk_NT] == 0) {
3051 p->cost[_stk_NT] = 0;
3052 p->rule._stk = q->rule._stk;
3054 if (q->cost[_con13_NT] == 0) {
3055 p->cost[_con13_NT] = 0;
3056 p->rule._con13 = q->rule._con13;
3058 if (q->cost[_base_NT] == 0) {
3059 p->cost[_base_NT] = 0;
3060 p->rule._base = q->rule._base;
3062 if (q->cost[_addr_NT] == 0) {
3063 p->cost[_addr_NT] = 0;
3064 p->rule._addr = q->rule._addr;
3066 if (q->cost[_addrl_NT] == 0) {
3067 p->cost[_addrl_NT] = 0;
3068 p->rule._addrl = q->rule._addrl;
3070 if (q->cost[_spill_NT] == 0) {
3071 p->cost[_spill_NT] = 0;
3072 p->rule._spill = q->rule._spill;
3074 if (q->cost[_rc_NT] == 0) {
3075 p->cost[_rc_NT] = 0;
3076 p->rule._rc = q->rule._rc;
3078 if (q->cost[_rc5_NT] == 0) {
3079 p->cost[_rc5_NT] = 0;
3080 p->rule._rc5 = q->rule._rc5;
3082 if (q->cost[_addrg_NT] == 0) {
3083 p->cost[_addrg_NT] = 0;
3084 p->rule._addrg = q->rule._addrg;
3086 if (q->cost[_call_NT] == 0) {
3087 p->cost[_call_NT] = 0;
3088 p->rule._call = q->rule._call;
3090 if (q->cost[_rel_NT] == 0) {
3091 p->cost[_rel_NT] = 0;
3092 p->rule._rel = q->rule._rel;
3095 c = 0;
3096 if (c + 0 < p->cost[_reg_NT]) {
3097 p->cost[_reg_NT] = c + 0;
3098 p->rule._reg = 1;
3099 _closure_reg(a, c + 0);
3102 /* reg: INDIRC(addr) */
3103 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1;
3104 if (c + 0 < p->cost[_reg_NT]) {
3105 p->cost[_reg_NT] = c + 0;
3106 p->rule._reg = 15;
3107 _closure_reg(a, c + 0);
3109 break;
3110 case 68: /* INDIRS */
3111 _label(LEFT_CHILD(a));
3112 if ( /* reg: INDIRS(VREGP) */
3113 LEFT_CHILD(a)->op == 615 /* VREGP */
3115 if (mayrecalc(a)) {
3116 struct _state *q = a->syms[RX]->u.t.cse->x.state;
3117 if (q->cost[_stmt_NT] == 0) {
3118 p->cost[_stmt_NT] = 0;
3119 p->rule._stmt = q->rule._stmt;
3121 if (q->cost[_reg_NT] == 0) {
3122 p->cost[_reg_NT] = 0;
3123 p->rule._reg = q->rule._reg;
3125 if (q->cost[_con_NT] == 0) {
3126 p->cost[_con_NT] = 0;
3127 p->rule._con = q->rule._con;
3129 if (q->cost[_stk13_NT] == 0) {
3130 p->cost[_stk13_NT] = 0;
3131 p->rule._stk13 = q->rule._stk13;
3133 if (q->cost[_stk_NT] == 0) {
3134 p->cost[_stk_NT] = 0;
3135 p->rule._stk = q->rule._stk;
3137 if (q->cost[_con13_NT] == 0) {
3138 p->cost[_con13_NT] = 0;
3139 p->rule._con13 = q->rule._con13;
3141 if (q->cost[_base_NT] == 0) {
3142 p->cost[_base_NT] = 0;
3143 p->rule._base = q->rule._base;
3145 if (q->cost[_addr_NT] == 0) {
3146 p->cost[_addr_NT] = 0;
3147 p->rule._addr = q->rule._addr;
3149 if (q->cost[_addrl_NT] == 0) {
3150 p->cost[_addrl_NT] = 0;
3151 p->rule._addrl = q->rule._addrl;
3153 if (q->cost[_spill_NT] == 0) {
3154 p->cost[_spill_NT] = 0;
3155 p->rule._spill = q->rule._spill;
3157 if (q->cost[_rc_NT] == 0) {
3158 p->cost[_rc_NT] = 0;
3159 p->rule._rc = q->rule._rc;
3161 if (q->cost[_rc5_NT] == 0) {
3162 p->cost[_rc5_NT] = 0;
3163 p->rule._rc5 = q->rule._rc5;
3165 if (q->cost[_addrg_NT] == 0) {
3166 p->cost[_addrg_NT] = 0;
3167 p->rule._addrg = q->rule._addrg;
3169 if (q->cost[_call_NT] == 0) {
3170 p->cost[_call_NT] = 0;
3171 p->rule._call = q->rule._call;
3173 if (q->cost[_rel_NT] == 0) {
3174 p->cost[_rel_NT] = 0;
3175 p->rule._rel = q->rule._rel;
3178 c = 0;
3179 if (c + 0 < p->cost[_reg_NT]) {
3180 p->cost[_reg_NT] = c + 0;
3181 p->rule._reg = 6;
3182 _closure_reg(a, c + 0);
3185 /* reg: INDIRS(addr) */
3186 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1;
3187 if (c + 0 < p->cost[_reg_NT]) {
3188 p->cost[_reg_NT] = c + 0;
3189 p->rule._reg = 16;
3190 _closure_reg(a, c + 0);
3192 break;
3193 case 69: /* INDIRI */
3194 _label(LEFT_CHILD(a));
3195 if ( /* reg: INDIRI(VREGP) */
3196 LEFT_CHILD(a)->op == 615 /* VREGP */
3198 if (mayrecalc(a)) {
3199 struct _state *q = a->syms[RX]->u.t.cse->x.state;
3200 if (q->cost[_stmt_NT] == 0) {
3201 p->cost[_stmt_NT] = 0;
3202 p->rule._stmt = q->rule._stmt;
3204 if (q->cost[_reg_NT] == 0) {
3205 p->cost[_reg_NT] = 0;
3206 p->rule._reg = q->rule._reg;
3208 if (q->cost[_con_NT] == 0) {
3209 p->cost[_con_NT] = 0;
3210 p->rule._con = q->rule._con;
3212 if (q->cost[_stk13_NT] == 0) {
3213 p->cost[_stk13_NT] = 0;
3214 p->rule._stk13 = q->rule._stk13;
3216 if (q->cost[_stk_NT] == 0) {
3217 p->cost[_stk_NT] = 0;
3218 p->rule._stk = q->rule._stk;
3220 if (q->cost[_con13_NT] == 0) {
3221 p->cost[_con13_NT] = 0;
3222 p->rule._con13 = q->rule._con13;
3224 if (q->cost[_base_NT] == 0) {
3225 p->cost[_base_NT] = 0;
3226 p->rule._base = q->rule._base;
3228 if (q->cost[_addr_NT] == 0) {
3229 p->cost[_addr_NT] = 0;
3230 p->rule._addr = q->rule._addr;
3232 if (q->cost[_addrl_NT] == 0) {
3233 p->cost[_addrl_NT] = 0;
3234 p->rule._addrl = q->rule._addrl;
3236 if (q->cost[_spill_NT] == 0) {
3237 p->cost[_spill_NT] = 0;
3238 p->rule._spill = q->rule._spill;
3240 if (q->cost[_rc_NT] == 0) {
3241 p->cost[_rc_NT] = 0;
3242 p->rule._rc = q->rule._rc;
3244 if (q->cost[_rc5_NT] == 0) {
3245 p->cost[_rc5_NT] = 0;
3246 p->rule._rc5 = q->rule._rc5;
3248 if (q->cost[_addrg_NT] == 0) {
3249 p->cost[_addrg_NT] = 0;
3250 p->rule._addrg = q->rule._addrg;
3252 if (q->cost[_call_NT] == 0) {
3253 p->cost[_call_NT] = 0;
3254 p->rule._call = q->rule._call;
3256 if (q->cost[_rel_NT] == 0) {
3257 p->cost[_rel_NT] = 0;
3258 p->rule._rel = q->rule._rel;
3261 c = 0;
3262 if (c + 0 < p->cost[_reg_NT]) {
3263 p->cost[_reg_NT] = c + 0;
3264 p->rule._reg = 4;
3265 _closure_reg(a, c + 0);
3268 /* reg: INDIRI(addr) */
3269 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1;
3270 if (c + 0 < p->cost[_reg_NT]) {
3271 p->cost[_reg_NT] = c + 0;
3272 p->rule._reg = 17;
3273 _closure_reg(a, c + 0);
3275 break;
3276 case 71: /* INDIRP */
3277 _label(LEFT_CHILD(a));
3278 if ( /* reg: INDIRP(VREGP) */
3279 LEFT_CHILD(a)->op == 615 /* VREGP */
3281 if (mayrecalc(a)) {
3282 struct _state *q = a->syms[RX]->u.t.cse->x.state;
3283 if (q->cost[_stmt_NT] == 0) {
3284 p->cost[_stmt_NT] = 0;
3285 p->rule._stmt = q->rule._stmt;
3287 if (q->cost[_reg_NT] == 0) {
3288 p->cost[_reg_NT] = 0;
3289 p->rule._reg = q->rule._reg;
3291 if (q->cost[_con_NT] == 0) {
3292 p->cost[_con_NT] = 0;
3293 p->rule._con = q->rule._con;
3295 if (q->cost[_stk13_NT] == 0) {
3296 p->cost[_stk13_NT] = 0;
3297 p->rule._stk13 = q->rule._stk13;
3299 if (q->cost[_stk_NT] == 0) {
3300 p->cost[_stk_NT] = 0;
3301 p->rule._stk = q->rule._stk;
3303 if (q->cost[_con13_NT] == 0) {
3304 p->cost[_con13_NT] = 0;
3305 p->rule._con13 = q->rule._con13;
3307 if (q->cost[_base_NT] == 0) {
3308 p->cost[_base_NT] = 0;
3309 p->rule._base = q->rule._base;
3311 if (q->cost[_addr_NT] == 0) {
3312 p->cost[_addr_NT] = 0;
3313 p->rule._addr = q->rule._addr;
3315 if (q->cost[_addrl_NT] == 0) {
3316 p->cost[_addrl_NT] = 0;
3317 p->rule._addrl = q->rule._addrl;
3319 if (q->cost[_spill_NT] == 0) {
3320 p->cost[_spill_NT] = 0;
3321 p->rule._spill = q->rule._spill;
3323 if (q->cost[_rc_NT] == 0) {
3324 p->cost[_rc_NT] = 0;
3325 p->rule._rc = q->rule._rc;
3327 if (q->cost[_rc5_NT] == 0) {
3328 p->cost[_rc5_NT] = 0;
3329 p->rule._rc5 = q->rule._rc5;
3331 if (q->cost[_addrg_NT] == 0) {
3332 p->cost[_addrg_NT] = 0;
3333 p->rule._addrg = q->rule._addrg;
3335 if (q->cost[_call_NT] == 0) {
3336 p->cost[_call_NT] = 0;
3337 p->rule._call = q->rule._call;
3339 if (q->cost[_rel_NT] == 0) {
3340 p->cost[_rel_NT] = 0;
3341 p->rule._rel = q->rule._rel;
3344 c = 0;
3345 if (c + 0 < p->cost[_reg_NT]) {
3346 p->cost[_reg_NT] = c + 0;
3347 p->rule._reg = 5;
3348 _closure_reg(a, c + 0);
3351 /* reg: INDIRP(addr) */
3352 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 1;
3353 if (c + 0 < p->cost[_reg_NT]) {
3354 p->cost[_reg_NT] = c + 0;
3355 p->rule._reg = 18;
3356 _closure_reg(a, c + 0);
3358 break;
3359 case 73: /* INDIRB */
3360 _label(LEFT_CHILD(a));
3361 break;
3362 case 85: /* CVCI */
3363 _label(LEFT_CHILD(a));
3364 if ( /* reg: CVCI(INDIRC(addr)) */
3365 LEFT_CHILD(a)->op == 67 /* INDIRC */
3367 c = ((struct _state *)(LEFT_CHILD(LEFT_CHILD(a))->x.state))->cost[_addr_NT] + 1;
3368 if (c + 0 < p->cost[_reg_NT]) {
3369 p->cost[_reg_NT] = c + 0;
3370 p->rule._reg = 22;
3371 _closure_reg(a, c + 0);
3374 /* reg: CVCI(reg) */
3375 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
3376 if (c + 0 < p->cost[_reg_NT]) {
3377 p->cost[_reg_NT] = c + 0;
3378 p->rule._reg = 67;
3379 _closure_reg(a, c + 0);
3381 break;
3382 case 86: /* CVCU */
3383 _label(LEFT_CHILD(a));
3384 if ( /* reg: CVCU(INDIRC(addr)) */
3385 LEFT_CHILD(a)->op == 67 /* INDIRC */
3387 c = ((struct _state *)(LEFT_CHILD(LEFT_CHILD(a))->x.state))->cost[_addr_NT] + 1;
3388 if (c + 0 < p->cost[_reg_NT]) {
3389 p->cost[_reg_NT] = c + 0;
3390 p->rule._reg = 24;
3391 _closure_reg(a, c + 0);
3394 /* reg: CVCU(reg) */
3395 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3396 if (c + 0 < p->cost[_reg_NT]) {
3397 p->cost[_reg_NT] = c + 0;
3398 p->rule._reg = 69;
3399 _closure_reg(a, c + 0);
3401 break;
3402 case 97: /* CVDF */
3403 _label(LEFT_CHILD(a));
3404 /* reg: CVDF(reg) */
3405 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3406 if (c + 0 < p->cost[_reg_NT]) {
3407 p->cost[_reg_NT] = c + 0;
3408 p->rule._reg = 90;
3409 _closure_reg(a, c + 0);
3411 break;
3412 case 101: /* CVDI */
3413 _label(LEFT_CHILD(a));
3414 /* reg: CVDI(reg) */
3415 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 3;
3416 if (c + 0 < p->cost[_reg_NT]) {
3417 p->cost[_reg_NT] = c + 0;
3418 p->rule._reg = 92;
3419 _closure_reg(a, c + 0);
3421 break;
3422 case 114: /* CVFD */
3423 _label(LEFT_CHILD(a));
3424 /* reg: CVFD(reg) */
3425 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3426 if (c + 0 < p->cost[_reg_NT]) {
3427 p->cost[_reg_NT] = c + 0;
3428 p->rule._reg = 91;
3429 _closure_reg(a, c + 0);
3431 break;
3432 case 130: /* CVID */
3433 _label(LEFT_CHILD(a));
3434 /* reg: CVID(reg) */
3435 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 3;
3436 if (c + 0 < p->cost[_reg_NT]) {
3437 p->cost[_reg_NT] = c + 0;
3438 p->rule._reg = 93;
3439 _closure_reg(a, c + 0);
3441 break;
3442 case 131: /* CVIC */
3443 _label(LEFT_CHILD(a));
3444 /* reg: CVIC(reg) */
3445 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3446 if (c + 0 < p->cost[_reg_NT]) {
3447 p->cost[_reg_NT] = c + 0;
3448 p->rule._reg = 26;
3449 _closure_reg(a, c + 0);
3451 /* reg: CVIC(reg) */
3452 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3453 if (c + 0 < p->cost[_reg_NT]) {
3454 p->cost[_reg_NT] = c + 0;
3455 p->rule._reg = 34;
3456 _closure_reg(a, c + 0);
3458 break;
3459 case 132: /* CVIS */
3460 _label(LEFT_CHILD(a));
3461 /* reg: CVIS(reg) */
3462 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3463 if (c + 0 < p->cost[_reg_NT]) {
3464 p->cost[_reg_NT] = c + 0;
3465 p->rule._reg = 27;
3466 _closure_reg(a, c + 0);
3468 /* reg: CVIS(reg) */
3469 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3470 if (c + 0 < p->cost[_reg_NT]) {
3471 p->cost[_reg_NT] = c + 0;
3472 p->rule._reg = 35;
3473 _closure_reg(a, c + 0);
3475 break;
3476 case 134: /* CVIU */
3477 _label(LEFT_CHILD(a));
3478 /* reg: CVIU(reg) */
3479 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3480 if (c + 0 < p->cost[_reg_NT]) {
3481 p->cost[_reg_NT] = c + 0;
3482 p->rule._reg = 7;
3483 _closure_reg(a, c + 0);
3485 /* reg: CVIU(reg) */
3486 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3487 if (c + 0 < p->cost[_reg_NT]) {
3488 p->cost[_reg_NT] = c + 0;
3489 p->rule._reg = 28;
3490 _closure_reg(a, c + 0);
3492 break;
3493 case 150: /* CVPU */
3494 _label(LEFT_CHILD(a));
3495 /* reg: CVPU(reg) */
3496 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3497 if (c + 0 < p->cost[_reg_NT]) {
3498 p->cost[_reg_NT] = c + 0;
3499 p->rule._reg = 8;
3500 _closure_reg(a, c + 0);
3502 /* reg: CVPU(reg) */
3503 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3504 if (c + 0 < p->cost[_reg_NT]) {
3505 p->cost[_reg_NT] = c + 0;
3506 p->rule._reg = 29;
3507 _closure_reg(a, c + 0);
3509 break;
3510 case 165: /* CVSI */
3511 _label(LEFT_CHILD(a));
3512 if ( /* reg: CVSI(INDIRS(addr)) */
3513 LEFT_CHILD(a)->op == 68 /* INDIRS */
3515 c = ((struct _state *)(LEFT_CHILD(LEFT_CHILD(a))->x.state))->cost[_addr_NT] + 1;
3516 if (c + 0 < p->cost[_reg_NT]) {
3517 p->cost[_reg_NT] = c + 0;
3518 p->rule._reg = 23;
3519 _closure_reg(a, c + 0);
3522 /* reg: CVSI(reg) */
3523 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
3524 if (c + 0 < p->cost[_reg_NT]) {
3525 p->cost[_reg_NT] = c + 0;
3526 p->rule._reg = 68;
3527 _closure_reg(a, c + 0);
3529 break;
3530 case 166: /* CVSU */
3531 _label(LEFT_CHILD(a));
3532 if ( /* reg: CVSU(INDIRS(addr)) */
3533 LEFT_CHILD(a)->op == 68 /* INDIRS */
3535 c = ((struct _state *)(LEFT_CHILD(LEFT_CHILD(a))->x.state))->cost[_addr_NT] + 1;
3536 if (c + 0 < p->cost[_reg_NT]) {
3537 p->cost[_reg_NT] = c + 0;
3538 p->rule._reg = 25;
3539 _closure_reg(a, c + 0);
3542 /* reg: CVSU(reg) */
3543 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
3544 if (c + 0 < p->cost[_reg_NT]) {
3545 p->cost[_reg_NT] = c + 0;
3546 p->rule._reg = 70;
3547 _closure_reg(a, c + 0);
3549 break;
3550 case 179: /* CVUC */
3551 _label(LEFT_CHILD(a));
3552 /* reg: CVUC(reg) */
3553 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3554 if (c + 0 < p->cost[_reg_NT]) {
3555 p->cost[_reg_NT] = c + 0;
3556 p->rule._reg = 30;
3557 _closure_reg(a, c + 0);
3559 /* reg: CVUC(reg) */
3560 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3561 if (c + 0 < p->cost[_reg_NT]) {
3562 p->cost[_reg_NT] = c + 0;
3563 p->rule._reg = 36;
3564 _closure_reg(a, c + 0);
3566 break;
3567 case 180: /* CVUS */
3568 _label(LEFT_CHILD(a));
3569 /* reg: CVUS(reg) */
3570 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3571 if (c + 0 < p->cost[_reg_NT]) {
3572 p->cost[_reg_NT] = c + 0;
3573 p->rule._reg = 33;
3574 _closure_reg(a, c + 0);
3576 /* reg: CVUS(reg) */
3577 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3578 if (c + 0 < p->cost[_reg_NT]) {
3579 p->cost[_reg_NT] = c + 0;
3580 p->rule._reg = 37;
3581 _closure_reg(a, c + 0);
3583 break;
3584 case 181: /* CVUI */
3585 _label(LEFT_CHILD(a));
3586 /* reg: CVUI(reg) */
3587 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3588 if (c + 0 < p->cost[_reg_NT]) {
3589 p->cost[_reg_NT] = c + 0;
3590 p->rule._reg = 9;
3591 _closure_reg(a, c + 0);
3593 /* reg: CVUI(reg) */
3594 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3595 if (c + 0 < p->cost[_reg_NT]) {
3596 p->cost[_reg_NT] = c + 0;
3597 p->rule._reg = 31;
3598 _closure_reg(a, c + 0);
3600 break;
3601 case 183: /* CVUP */
3602 _label(LEFT_CHILD(a));
3603 /* reg: CVUP(reg) */
3604 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + notarget(a);
3605 if (c + 0 < p->cost[_reg_NT]) {
3606 p->cost[_reg_NT] = c + 0;
3607 p->rule._reg = 10;
3608 _closure_reg(a, c + 0);
3610 /* reg: CVUP(reg) */
3611 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3612 if (c + 0 < p->cost[_reg_NT]) {
3613 p->cost[_reg_NT] = c + 0;
3614 p->rule._reg = 32;
3615 _closure_reg(a, c + 0);
3617 break;
3618 case 193: /* NEGF */
3619 _label(LEFT_CHILD(a));
3620 /* reg: NEGF(reg) */
3621 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3622 if (c + 0 < p->cost[_reg_NT]) {
3623 p->cost[_reg_NT] = c + 0;
3624 p->rule._reg = 88;
3625 _closure_reg(a, c + 0);
3627 break;
3628 case 194: /* NEGD */
3629 _label(LEFT_CHILD(a));
3630 /* reg: NEGD(reg) */
3631 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
3632 if (c + 0 < p->cost[_reg_NT]) {
3633 p->cost[_reg_NT] = c + 0;
3634 p->rule._reg = 95;
3635 _closure_reg(a, c + 0);
3637 break;
3638 case 197: /* NEGI */
3639 _label(LEFT_CHILD(a));
3640 /* reg: NEGI(reg) */
3641 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3642 if (c + 0 < p->cost[_reg_NT]) {
3643 p->cost[_reg_NT] = c + 0;
3644 p->rule._reg = 65;
3645 _closure_reg(a, c + 0);
3647 break;
3648 case 209: /* CALLF */
3649 _label(LEFT_CHILD(a));
3650 /* reg: CALLF(call) */
3651 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_call_NT] + 2;
3652 if (c + 0 < p->cost[_reg_NT]) {
3653 p->cost[_reg_NT] = c + 0;
3654 p->rule._reg = 72;
3655 _closure_reg(a, c + 0);
3657 break;
3658 case 210: /* CALLD */
3659 _label(LEFT_CHILD(a));
3660 /* reg: CALLD(call) */
3661 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_call_NT] + 2;
3662 if (c + 0 < p->cost[_reg_NT]) {
3663 p->cost[_reg_NT] = c + 0;
3664 p->rule._reg = 71;
3665 _closure_reg(a, c + 0);
3667 break;
3668 case 213: /* CALLI */
3669 _label(LEFT_CHILD(a));
3670 /* reg: CALLI(call) */
3671 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_call_NT] + 2;
3672 if (c + 0 < p->cost[_reg_NT]) {
3673 p->cost[_reg_NT] = c + 0;
3674 p->rule._reg = 73;
3675 _closure_reg(a, c + 0);
3677 break;
3678 case 216: /* CALLV */
3679 _label(LEFT_CHILD(a));
3680 /* stmt: CALLV(call) */
3681 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_call_NT] + 2;
3682 if (c + 0 < p->cost[_stmt_NT]) {
3683 p->cost[_stmt_NT] = c + 0;
3684 p->rule._stmt = 34;
3686 break;
3687 case 217: /* CALLB */
3688 _label(LEFT_CHILD(a));
3689 _label(RIGHT_CHILD(a));
3690 /* stmt: CALLB(call,reg) */
3691 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_call_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
3692 if (c + 0 < p->cost[_stmt_NT]) {
3693 p->cost[_stmt_NT] = c + 0;
3694 p->rule._stmt = 35;
3696 break;
3697 case 225: /* LOADF */
3698 _label(LEFT_CHILD(a));
3699 /* reg: LOADF(reg) */
3700 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3701 if (c + 0 < p->cost[_reg_NT]) {
3702 p->cost[_reg_NT] = c + 0;
3703 p->rule._reg = 89;
3704 _closure_reg(a, c + 0);
3706 break;
3707 case 226: /* LOADD */
3708 _label(LEFT_CHILD(a));
3709 /* reg: LOADD(reg) */
3710 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
3711 if (c + 0 < p->cost[_reg_NT]) {
3712 p->cost[_reg_NT] = c + 0;
3713 p->rule._reg = 94;
3714 _closure_reg(a, c + 0);
3716 break;
3717 case 227: /* LOADC */
3718 _label(LEFT_CHILD(a));
3719 /* reg: LOADC(reg) */
3720 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3721 if (c + 0 < p->cost[_reg_NT]) {
3722 p->cost[_reg_NT] = c + 0;
3723 p->rule._reg = 38;
3724 _closure_reg(a, c + 0);
3726 break;
3727 case 228: /* LOADS */
3728 _label(LEFT_CHILD(a));
3729 /* reg: LOADS(reg) */
3730 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3731 if (c + 0 < p->cost[_reg_NT]) {
3732 p->cost[_reg_NT] = c + 0;
3733 p->rule._reg = 41;
3734 _closure_reg(a, c + 0);
3736 break;
3737 case 229: /* LOADI */
3738 _label(LEFT_CHILD(a));
3739 /* reg: LOADI(reg) */
3740 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3741 if (c + 0 < p->cost[_reg_NT]) {
3742 p->cost[_reg_NT] = c + 0;
3743 p->rule._reg = 39;
3744 _closure_reg(a, c + 0);
3746 break;
3747 case 230: /* LOADU */
3748 _label(LEFT_CHILD(a));
3749 /* reg: LOADU(reg) */
3750 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3751 if (c + 0 < p->cost[_reg_NT]) {
3752 p->cost[_reg_NT] = c + 0;
3753 p->rule._reg = 42;
3754 _closure_reg(a, c + 0);
3756 break;
3757 case 231: /* LOADP */
3758 _label(LEFT_CHILD(a));
3759 /* reg: LOADP(reg) */
3760 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + move(a);
3761 if (c + 0 < p->cost[_reg_NT]) {
3762 p->cost[_reg_NT] = c + 0;
3763 p->rule._reg = 40;
3764 _closure_reg(a, c + 0);
3766 break;
3767 case 233: /* LOADB */
3768 break;
3769 case 241: /* RETF */
3770 _label(LEFT_CHILD(a));
3771 /* stmt: RETF(reg) */
3772 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3773 if (c + 0 < p->cost[_stmt_NT]) {
3774 p->cost[_stmt_NT] = c + 0;
3775 p->rule._stmt = 37;
3777 break;
3778 case 242: /* RETD */
3779 _label(LEFT_CHILD(a));
3780 /* stmt: RETD(reg) */
3781 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3782 if (c + 0 < p->cost[_stmt_NT]) {
3783 p->cost[_stmt_NT] = c + 0;
3784 p->rule._stmt = 36;
3786 break;
3787 case 245: /* RETI */
3788 _label(LEFT_CHILD(a));
3789 /* stmt: RETI(reg) */
3790 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3791 if (c + 0 < p->cost[_stmt_NT]) {
3792 p->cost[_stmt_NT] = c + 0;
3793 p->rule._stmt = 38;
3795 break;
3796 case 263: /* ADDRGP */
3797 /* reg: ADDRGP */
3798 c = 1;
3799 if (c + 0 < p->cost[_reg_NT]) {
3800 p->cost[_reg_NT] = c + 0;
3801 p->rule._reg = 11;
3802 _closure_reg(a, c + 0);
3804 /* addrg: ADDRGP */
3805 c = 0;
3806 if (c + 0 < p->cost[_addrg_NT]) {
3807 p->cost[_addrg_NT] = c + 0;
3808 p->rule._addrg = 1;
3810 /* call: ADDRGP */
3811 c = 0;
3812 if (c + 0 < p->cost[_call_NT]) {
3813 p->cost[_call_NT] = c + 0;
3814 p->rule._call = 1;
3816 break;
3817 case 279: /* ADDRFP */
3818 /* stk13: ADDRFP */
3819 c = imm(a);
3820 if (c + 0 < p->cost[_stk13_NT]) {
3821 p->cost[_stk13_NT] = c + 0;
3822 p->rule._stk13 = 1;
3823 _closure_stk13(a, c + 0);
3825 /* stk: ADDRFP */
3826 c = 2;
3827 if (c + 0 < p->cost[_stk_NT]) {
3828 p->cost[_stk_NT] = c + 0;
3829 p->rule._stk = 1;
3830 _closure_stk(a, c + 0);
3832 /* reg: ADDRFP */
3833 c = 3;
3834 if (c + 0 < p->cost[_reg_NT]) {
3835 p->cost[_reg_NT] = c + 0;
3836 p->rule._reg = 13;
3837 _closure_reg(a, c + 0);
3839 break;
3840 case 295: /* ADDRLP */
3841 /* stk13: ADDRLP */
3842 c = imm(a);
3843 if (c + 0 < p->cost[_stk13_NT]) {
3844 p->cost[_stk13_NT] = c + 0;
3845 p->rule._stk13 = 2;
3846 _closure_stk13(a, c + 0);
3848 /* stk: ADDRLP */
3849 c = 2;
3850 if (c + 0 < p->cost[_stk_NT]) {
3851 p->cost[_stk_NT] = c + 0;
3852 p->rule._stk = 2;
3853 _closure_stk(a, c + 0);
3855 /* reg: ADDRLP */
3856 c = 3;
3857 if (c + 0 < p->cost[_reg_NT]) {
3858 p->cost[_reg_NT] = c + 0;
3859 p->rule._reg = 14;
3860 _closure_reg(a, c + 0);
3862 /* addrl: ADDRLP */
3863 c = imm(a);
3864 if (c + 0 < p->cost[_addrl_NT]) {
3865 p->cost[_addrl_NT] = c + 0;
3866 p->rule._addrl = 1;
3868 /* spill: ADDRLP */
3869 c = !imm(a);
3870 if (c + 0 < p->cost[_spill_NT]) {
3871 p->cost[_spill_NT] = c + 0;
3872 p->rule._spill = 1;
3874 break;
3875 case 305: /* ADDF */
3876 _label(LEFT_CHILD(a));
3877 _label(RIGHT_CHILD(a));
3878 /* reg: ADDF(reg,reg) */
3879 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3880 if (c + 0 < p->cost[_reg_NT]) {
3881 p->cost[_reg_NT] = c + 0;
3882 p->rule._reg = 81;
3883 _closure_reg(a, c + 0);
3885 break;
3886 case 306: /* ADDD */
3887 _label(LEFT_CHILD(a));
3888 _label(RIGHT_CHILD(a));
3889 /* reg: ADDD(reg,reg) */
3890 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3891 if (c + 0 < p->cost[_reg_NT]) {
3892 p->cost[_reg_NT] = c + 0;
3893 p->rule._reg = 80;
3894 _closure_reg(a, c + 0);
3896 break;
3897 case 309: /* ADDI */
3898 _label(LEFT_CHILD(a));
3899 _label(RIGHT_CHILD(a));
3900 /* base: ADDI(reg,con13) */
3901 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_con13_NT] + 0;
3902 if (c + 0 < p->cost[_base_NT]) {
3903 p->cost[_base_NT] = c + 0;
3904 p->rule._base = 1;
3905 _closure_base(a, c + 0);
3907 /* addr: ADDI(reg,reg) */
3908 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
3909 if (c + 0 < p->cost[_addr_NT]) {
3910 p->cost[_addr_NT] = c + 0;
3911 p->rule._addr = 2;
3912 _closure_addr(a, c + 0);
3914 /* reg: ADDI(reg,rc) */
3915 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
3916 if (c + 0 < p->cost[_reg_NT]) {
3917 p->cost[_reg_NT] = c + 0;
3918 p->rule._reg = 49;
3919 _closure_reg(a, c + 0);
3921 break;
3922 case 310: /* ADDU */
3923 _label(LEFT_CHILD(a));
3924 _label(RIGHT_CHILD(a));
3925 /* base: ADDU(reg,con13) */
3926 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_con13_NT] + 0;
3927 if (c + 0 < p->cost[_base_NT]) {
3928 p->cost[_base_NT] = c + 0;
3929 p->rule._base = 3;
3930 _closure_base(a, c + 0);
3932 /* addr: ADDU(reg,reg) */
3933 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
3934 if (c + 0 < p->cost[_addr_NT]) {
3935 p->cost[_addr_NT] = c + 0;
3936 p->rule._addr = 4;
3937 _closure_addr(a, c + 0);
3939 /* reg: ADDU(reg,rc) */
3940 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
3941 if (c + 0 < p->cost[_reg_NT]) {
3942 p->cost[_reg_NT] = c + 0;
3943 p->rule._reg = 51;
3944 _closure_reg(a, c + 0);
3946 break;
3947 case 311: /* ADDP */
3948 _label(LEFT_CHILD(a));
3949 _label(RIGHT_CHILD(a));
3950 /* base: ADDP(reg,con13) */
3951 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_con13_NT] + 0;
3952 if (c + 0 < p->cost[_base_NT]) {
3953 p->cost[_base_NT] = c + 0;
3954 p->rule._base = 2;
3955 _closure_base(a, c + 0);
3957 /* addr: ADDP(reg,reg) */
3958 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
3959 if (c + 0 < p->cost[_addr_NT]) {
3960 p->cost[_addr_NT] = c + 0;
3961 p->rule._addr = 3;
3962 _closure_addr(a, c + 0);
3964 /* reg: ADDP(reg,rc) */
3965 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
3966 if (c + 0 < p->cost[_reg_NT]) {
3967 p->cost[_reg_NT] = c + 0;
3968 p->rule._reg = 50;
3969 _closure_reg(a, c + 0);
3971 break;
3972 case 321: /* SUBF */
3973 _label(LEFT_CHILD(a));
3974 _label(RIGHT_CHILD(a));
3975 /* reg: SUBF(reg,reg) */
3976 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3977 if (c + 0 < p->cost[_reg_NT]) {
3978 p->cost[_reg_NT] = c + 0;
3979 p->rule._reg = 87;
3980 _closure_reg(a, c + 0);
3982 break;
3983 case 322: /* SUBD */
3984 _label(LEFT_CHILD(a));
3985 _label(RIGHT_CHILD(a));
3986 /* reg: SUBD(reg,reg) */
3987 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
3988 if (c + 0 < p->cost[_reg_NT]) {
3989 p->cost[_reg_NT] = c + 0;
3990 p->rule._reg = 86;
3991 _closure_reg(a, c + 0);
3993 break;
3994 case 325: /* SUBI */
3995 _label(LEFT_CHILD(a));
3996 _label(RIGHT_CHILD(a));
3997 /* reg: SUBI(reg,rc) */
3998 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
3999 if (c + 0 < p->cost[_reg_NT]) {
4000 p->cost[_reg_NT] = c + 0;
4001 p->rule._reg = 55;
4002 _closure_reg(a, c + 0);
4004 break;
4005 case 326: /* SUBU */
4006 _label(LEFT_CHILD(a));
4007 _label(RIGHT_CHILD(a));
4008 /* reg: SUBU(reg,rc) */
4009 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
4010 if (c + 0 < p->cost[_reg_NT]) {
4011 p->cost[_reg_NT] = c + 0;
4012 p->rule._reg = 57;
4013 _closure_reg(a, c + 0);
4015 break;
4016 case 327: /* SUBP */
4017 _label(LEFT_CHILD(a));
4018 _label(RIGHT_CHILD(a));
4019 /* reg: SUBP(reg,rc) */
4020 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
4021 if (c + 0 < p->cost[_reg_NT]) {
4022 p->cost[_reg_NT] = c + 0;
4023 p->rule._reg = 56;
4024 _closure_reg(a, c + 0);
4026 break;
4027 case 341: /* LSHI */
4028 _label(LEFT_CHILD(a));
4029 _label(RIGHT_CHILD(a));
4030 /* reg: LSHI(reg,rc5) */
4031 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc5_NT] + 1;
4032 if (c + 0 < p->cost[_reg_NT]) {
4033 p->cost[_reg_NT] = c + 0;
4034 p->rule._reg = 58;
4035 _closure_reg(a, c + 0);
4037 break;
4038 case 342: /* LSHU */
4039 _label(LEFT_CHILD(a));
4040 _label(RIGHT_CHILD(a));
4041 /* reg: LSHU(reg,rc5) */
4042 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc5_NT] + 1;
4043 if (c + 0 < p->cost[_reg_NT]) {
4044 p->cost[_reg_NT] = c + 0;
4045 p->rule._reg = 59;
4046 _closure_reg(a, c + 0);
4048 break;
4049 case 357: /* MODI */
4050 _label(LEFT_CHILD(a));
4051 _label(RIGHT_CHILD(a));
4052 /* reg: MODI(reg,reg) */
4053 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
4054 if (c + 0 < p->cost[_reg_NT]) {
4055 p->cost[_reg_NT] = c + 0;
4056 p->rule._reg = 76;
4057 _closure_reg(a, c + 0);
4059 break;
4060 case 358: /* MODU */
4061 _label(LEFT_CHILD(a));
4062 _label(RIGHT_CHILD(a));
4063 /* reg: MODU(reg,reg) */
4064 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
4065 if (c + 0 < p->cost[_reg_NT]) {
4066 p->cost[_reg_NT] = c + 0;
4067 p->rule._reg = 77;
4068 _closure_reg(a, c + 0);
4070 break;
4071 case 373: /* RSHI */
4072 _label(LEFT_CHILD(a));
4073 _label(RIGHT_CHILD(a));
4074 /* reg: RSHI(reg,rc5) */
4075 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc5_NT] + 1;
4076 if (c + 0 < p->cost[_reg_NT]) {
4077 p->cost[_reg_NT] = c + 0;
4078 p->rule._reg = 60;
4079 _closure_reg(a, c + 0);
4081 break;
4082 case 374: /* RSHU */
4083 _label(LEFT_CHILD(a));
4084 _label(RIGHT_CHILD(a));
4085 /* reg: RSHU(reg,rc5) */
4086 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc5_NT] + 1;
4087 if (c + 0 < p->cost[_reg_NT]) {
4088 p->cost[_reg_NT] = c + 0;
4089 p->rule._reg = 61;
4090 _closure_reg(a, c + 0);
4092 break;
4093 case 390: /* BANDU */
4094 _label(LEFT_CHILD(a));
4095 _label(RIGHT_CHILD(a));
4096 /* reg: BANDU(reg,rc) */
4097 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
4098 if (c + 0 < p->cost[_reg_NT]) {
4099 p->cost[_reg_NT] = c + 0;
4100 p->rule._reg = 52;
4101 _closure_reg(a, c + 0);
4103 if ( /* reg: BANDU(reg,BCOMU(rc)) */
4104 RIGHT_CHILD(a)->op == 406 /* BCOMU */
4106 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(LEFT_CHILD(RIGHT_CHILD(a))->x.state))->cost[_rc_NT] + 1;
4107 if (c + 0 < p->cost[_reg_NT]) {
4108 p->cost[_reg_NT] = c + 0;
4109 p->rule._reg = 62;
4110 _closure_reg(a, c + 0);
4113 break;
4114 case 406: /* BCOMU */
4115 _label(LEFT_CHILD(a));
4116 /* reg: BCOMU(reg) */
4117 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
4118 if (c + 0 < p->cost[_reg_NT]) {
4119 p->cost[_reg_NT] = c + 0;
4120 p->rule._reg = 66;
4121 _closure_reg(a, c + 0);
4123 break;
4124 case 422: /* BORU */
4125 _label(LEFT_CHILD(a));
4126 _label(RIGHT_CHILD(a));
4127 /* reg: BORU(reg,rc) */
4128 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
4129 if (c + 0 < p->cost[_reg_NT]) {
4130 p->cost[_reg_NT] = c + 0;
4131 p->rule._reg = 53;
4132 _closure_reg(a, c + 0);
4134 if ( /* reg: BORU(reg,BCOMU(rc)) */
4135 RIGHT_CHILD(a)->op == 406 /* BCOMU */
4137 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(LEFT_CHILD(RIGHT_CHILD(a))->x.state))->cost[_rc_NT] + 1;
4138 if (c + 0 < p->cost[_reg_NT]) {
4139 p->cost[_reg_NT] = c + 0;
4140 p->rule._reg = 63;
4141 _closure_reg(a, c + 0);
4144 break;
4145 case 438: /* BXORU */
4146 _label(LEFT_CHILD(a));
4147 _label(RIGHT_CHILD(a));
4148 /* reg: BXORU(reg,rc) */
4149 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 1;
4150 if (c + 0 < p->cost[_reg_NT]) {
4151 p->cost[_reg_NT] = c + 0;
4152 p->rule._reg = 54;
4153 _closure_reg(a, c + 0);
4155 if ( /* reg: BXORU(reg,BCOMU(rc)) */
4156 RIGHT_CHILD(a)->op == 406 /* BCOMU */
4158 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(LEFT_CHILD(RIGHT_CHILD(a))->x.state))->cost[_rc_NT] + 1;
4159 if (c + 0 < p->cost[_reg_NT]) {
4160 p->cost[_reg_NT] = c + 0;
4161 p->rule._reg = 64;
4162 _closure_reg(a, c + 0);
4165 break;
4166 case 449: /* DIVF */
4167 _label(LEFT_CHILD(a));
4168 _label(RIGHT_CHILD(a));
4169 /* reg: DIVF(reg,reg) */
4170 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
4171 if (c + 0 < p->cost[_reg_NT]) {
4172 p->cost[_reg_NT] = c + 0;
4173 p->rule._reg = 83;
4174 _closure_reg(a, c + 0);
4176 break;
4177 case 450: /* DIVD */
4178 _label(LEFT_CHILD(a));
4179 _label(RIGHT_CHILD(a));
4180 /* reg: DIVD(reg,reg) */
4181 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
4182 if (c + 0 < p->cost[_reg_NT]) {
4183 p->cost[_reg_NT] = c + 0;
4184 p->rule._reg = 82;
4185 _closure_reg(a, c + 0);
4187 break;
4188 case 453: /* DIVI */
4189 _label(LEFT_CHILD(a));
4190 _label(RIGHT_CHILD(a));
4191 /* reg: DIVI(reg,reg) */
4192 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
4193 if (c + 0 < p->cost[_reg_NT]) {
4194 p->cost[_reg_NT] = c + 0;
4195 p->rule._reg = 74;
4196 _closure_reg(a, c + 0);
4198 break;
4199 case 454: /* DIVU */
4200 _label(LEFT_CHILD(a));
4201 _label(RIGHT_CHILD(a));
4202 /* reg: DIVU(reg,reg) */
4203 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
4204 if (c + 0 < p->cost[_reg_NT]) {
4205 p->cost[_reg_NT] = c + 0;
4206 p->rule._reg = 75;
4207 _closure_reg(a, c + 0);
4209 break;
4210 case 465: /* MULF */
4211 _label(LEFT_CHILD(a));
4212 _label(RIGHT_CHILD(a));
4213 /* reg: MULF(reg,reg) */
4214 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
4215 if (c + 0 < p->cost[_reg_NT]) {
4216 p->cost[_reg_NT] = c + 0;
4217 p->rule._reg = 85;
4218 _closure_reg(a, c + 0);
4220 break;
4221 case 466: /* MULD */
4222 _label(LEFT_CHILD(a));
4223 _label(RIGHT_CHILD(a));
4224 /* reg: MULD(reg,reg) */
4225 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 1;
4226 if (c + 0 < p->cost[_reg_NT]) {
4227 p->cost[_reg_NT] = c + 0;
4228 p->rule._reg = 84;
4229 _closure_reg(a, c + 0);
4231 break;
4232 case 469: /* MULI */
4233 _label(LEFT_CHILD(a));
4234 _label(RIGHT_CHILD(a));
4235 /* reg: MULI(reg,reg) */
4236 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
4237 if (c + 0 < p->cost[_reg_NT]) {
4238 p->cost[_reg_NT] = c + 0;
4239 p->rule._reg = 78;
4240 _closure_reg(a, c + 0);
4242 break;
4243 case 470: /* MULU */
4244 _label(LEFT_CHILD(a));
4245 _label(RIGHT_CHILD(a));
4246 /* reg: MULU(reg,reg) */
4247 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 2;
4248 if (c + 0 < p->cost[_reg_NT]) {
4249 p->cost[_reg_NT] = c + 0;
4250 p->rule._reg = 79;
4251 _closure_reg(a, c + 0);
4253 break;
4254 case 481: /* EQF */
4255 _label(LEFT_CHILD(a));
4256 _label(RIGHT_CHILD(a));
4257 /* rel: EQF(reg,reg) */
4258 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4259 if (c + 0 < p->cost[_rel_NT]) {
4260 p->cost[_rel_NT] = c + 0;
4261 p->rule._rel = 2;
4262 _closure_rel(a, c + 0);
4264 break;
4265 case 482: /* EQD */
4266 _label(LEFT_CHILD(a));
4267 _label(RIGHT_CHILD(a));
4268 /* rel: EQD(reg,reg) */
4269 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4270 if (c + 0 < p->cost[_rel_NT]) {
4271 p->cost[_rel_NT] = c + 0;
4272 p->rule._rel = 1;
4273 _closure_rel(a, c + 0);
4275 break;
4276 case 485: /* EQI */
4277 _label(LEFT_CHILD(a));
4278 _label(RIGHT_CHILD(a));
4279 /* stmt: EQI(reg,rc) */
4280 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4281 if (c + 0 < p->cost[_stmt_NT]) {
4282 p->cost[_stmt_NT] = c + 0;
4283 p->rule._stmt = 24;
4285 break;
4286 case 497: /* GEF */
4287 _label(LEFT_CHILD(a));
4288 _label(RIGHT_CHILD(a));
4289 /* rel: GEF(reg,reg) */
4290 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4291 if (c + 0 < p->cost[_rel_NT]) {
4292 p->cost[_rel_NT] = c + 0;
4293 p->rule._rel = 4;
4294 _closure_rel(a, c + 0);
4296 break;
4297 case 498: /* GED */
4298 _label(LEFT_CHILD(a));
4299 _label(RIGHT_CHILD(a));
4300 /* rel: GED(reg,reg) */
4301 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4302 if (c + 0 < p->cost[_rel_NT]) {
4303 p->cost[_rel_NT] = c + 0;
4304 p->rule._rel = 3;
4305 _closure_rel(a, c + 0);
4307 break;
4308 case 501: /* GEI */
4309 _label(LEFT_CHILD(a));
4310 _label(RIGHT_CHILD(a));
4311 /* stmt: GEI(reg,rc) */
4312 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4313 if (c + 0 < p->cost[_stmt_NT]) {
4314 p->cost[_stmt_NT] = c + 0;
4315 p->rule._stmt = 25;
4317 break;
4318 case 502: /* GEU */
4319 _label(LEFT_CHILD(a));
4320 _label(RIGHT_CHILD(a));
4321 /* stmt: GEU(reg,rc) */
4322 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4323 if (c + 0 < p->cost[_stmt_NT]) {
4324 p->cost[_stmt_NT] = c + 0;
4325 p->rule._stmt = 26;
4327 break;
4328 case 513: /* GTF */
4329 _label(LEFT_CHILD(a));
4330 _label(RIGHT_CHILD(a));
4331 /* rel: GTF(reg,reg) */
4332 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4333 if (c + 0 < p->cost[_rel_NT]) {
4334 p->cost[_rel_NT] = c + 0;
4335 p->rule._rel = 6;
4336 _closure_rel(a, c + 0);
4338 break;
4339 case 514: /* GTD */
4340 _label(LEFT_CHILD(a));
4341 _label(RIGHT_CHILD(a));
4342 /* rel: GTD(reg,reg) */
4343 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4344 if (c + 0 < p->cost[_rel_NT]) {
4345 p->cost[_rel_NT] = c + 0;
4346 p->rule._rel = 5;
4347 _closure_rel(a, c + 0);
4349 break;
4350 case 517: /* GTI */
4351 _label(LEFT_CHILD(a));
4352 _label(RIGHT_CHILD(a));
4353 /* stmt: GTI(reg,rc) */
4354 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4355 if (c + 0 < p->cost[_stmt_NT]) {
4356 p->cost[_stmt_NT] = c + 0;
4357 p->rule._stmt = 27;
4359 break;
4360 case 518: /* GTU */
4361 _label(LEFT_CHILD(a));
4362 _label(RIGHT_CHILD(a));
4363 /* stmt: GTU(reg,rc) */
4364 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4365 if (c + 0 < p->cost[_stmt_NT]) {
4366 p->cost[_stmt_NT] = c + 0;
4367 p->rule._stmt = 28;
4369 break;
4370 case 529: /* LEF */
4371 _label(LEFT_CHILD(a));
4372 _label(RIGHT_CHILD(a));
4373 /* rel: LEF(reg,reg) */
4374 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4375 if (c + 0 < p->cost[_rel_NT]) {
4376 p->cost[_rel_NT] = c + 0;
4377 p->rule._rel = 8;
4378 _closure_rel(a, c + 0);
4380 break;
4381 case 530: /* LED */
4382 _label(LEFT_CHILD(a));
4383 _label(RIGHT_CHILD(a));
4384 /* rel: LED(reg,reg) */
4385 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4386 if (c + 0 < p->cost[_rel_NT]) {
4387 p->cost[_rel_NT] = c + 0;
4388 p->rule._rel = 7;
4389 _closure_rel(a, c + 0);
4391 break;
4392 case 533: /* LEI */
4393 _label(LEFT_CHILD(a));
4394 _label(RIGHT_CHILD(a));
4395 /* stmt: LEI(reg,rc) */
4396 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4397 if (c + 0 < p->cost[_stmt_NT]) {
4398 p->cost[_stmt_NT] = c + 0;
4399 p->rule._stmt = 29;
4401 break;
4402 case 534: /* LEU */
4403 _label(LEFT_CHILD(a));
4404 _label(RIGHT_CHILD(a));
4405 /* stmt: LEU(reg,rc) */
4406 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4407 if (c + 0 < p->cost[_stmt_NT]) {
4408 p->cost[_stmt_NT] = c + 0;
4409 p->rule._stmt = 30;
4411 break;
4412 case 545: /* LTF */
4413 _label(LEFT_CHILD(a));
4414 _label(RIGHT_CHILD(a));
4415 /* rel: LTF(reg,reg) */
4416 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4417 if (c + 0 < p->cost[_rel_NT]) {
4418 p->cost[_rel_NT] = c + 0;
4419 p->rule._rel = 10;
4420 _closure_rel(a, c + 0);
4422 break;
4423 case 546: /* LTD */
4424 _label(LEFT_CHILD(a));
4425 _label(RIGHT_CHILD(a));
4426 /* rel: LTD(reg,reg) */
4427 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4428 if (c + 0 < p->cost[_rel_NT]) {
4429 p->cost[_rel_NT] = c + 0;
4430 p->rule._rel = 9;
4431 _closure_rel(a, c + 0);
4433 break;
4434 case 549: /* LTI */
4435 _label(LEFT_CHILD(a));
4436 _label(RIGHT_CHILD(a));
4437 /* stmt: LTI(reg,rc) */
4438 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4439 if (c + 0 < p->cost[_stmt_NT]) {
4440 p->cost[_stmt_NT] = c + 0;
4441 p->rule._stmt = 31;
4443 break;
4444 case 550: /* LTU */
4445 _label(LEFT_CHILD(a));
4446 _label(RIGHT_CHILD(a));
4447 /* stmt: LTU(reg,rc) */
4448 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4449 if (c + 0 < p->cost[_stmt_NT]) {
4450 p->cost[_stmt_NT] = c + 0;
4451 p->rule._stmt = 32;
4453 break;
4454 case 561: /* NEF */
4455 _label(LEFT_CHILD(a));
4456 _label(RIGHT_CHILD(a));
4457 /* rel: NEF(reg,reg) */
4458 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4459 if (c + 0 < p->cost[_rel_NT]) {
4460 p->cost[_rel_NT] = c + 0;
4461 p->rule._rel = 12;
4462 _closure_rel(a, c + 0);
4464 break;
4465 case 562: /* NED */
4466 _label(LEFT_CHILD(a));
4467 _label(RIGHT_CHILD(a));
4468 /* rel: NED(reg,reg) */
4469 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_reg_NT] + 0;
4470 if (c + 0 < p->cost[_rel_NT]) {
4471 p->cost[_rel_NT] = c + 0;
4472 p->rule._rel = 11;
4473 _closure_rel(a, c + 0);
4475 break;
4476 case 565: /* NEI */
4477 _label(LEFT_CHILD(a));
4478 _label(RIGHT_CHILD(a));
4479 /* stmt: NEI(reg,rc) */
4480 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_reg_NT] + ((struct _state *)(RIGHT_CHILD(a)->x.state))->cost[_rc_NT] + 3;
4481 if (c + 0 < p->cost[_stmt_NT]) {
4482 p->cost[_stmt_NT] = c + 0;
4483 p->rule._stmt = 33;
4485 break;
4486 case 584: /* JUMPV */
4487 _label(LEFT_CHILD(a));
4488 /* stmt: JUMPV(addrg) */
4489 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addrg_NT] + 2;
4490 if (c + 0 < p->cost[_stmt_NT]) {
4491 p->cost[_stmt_NT] = c + 0;
4492 p->rule._stmt = 21;
4494 /* stmt: JUMPV(addr) */
4495 c = ((struct _state *)(LEFT_CHILD(a)->x.state))->cost[_addr_NT] + 2;
4496 if (c + 0 < p->cost[_stmt_NT]) {
4497 p->cost[_stmt_NT] = c + 0;
4498 p->rule._stmt = 22;
4500 break;
4501 case 600: /* LABELV */
4502 /* stmt: LABELV */
4503 c = 0;
4504 if (c + 0 < p->cost[_stmt_NT]) {
4505 p->cost[_stmt_NT] = c + 0;
4506 p->rule._stmt = 23;
4508 break;
4509 case 615: /* VREGP */
4510 break;
4511 default:
4512 fatal("_label", "Bad terminal %d\n", OP_LABEL(a));
4516 static void _kids(p, eruleno, kids) NODEPTR_TYPE p, kids[]; int eruleno; {
4517 if (!p)
4518 fatal("_kids", "Null tree\n", 0);
4519 if (!kids)
4520 fatal("_kids", "Null kids\n", 0);
4521 switch (eruleno) {
4522 case 136: /* call: ADDRGP */
4523 case 125: /* stmt: LABELV */
4524 case 122: /* addrg: ADDRGP */
4525 case 107: /* rc5: CNSTI */
4526 case 94: /* reg: CNSTU */
4527 case 93: /* reg: CNSTS */
4528 case 92: /* reg: CNSTP */
4529 case 91: /* reg: CNSTI */
4530 case 90: /* reg: CNSTC */
4531 case 62: /* spill: ADDRLP */
4532 case 57: /* addrl: ADDRLP */
4533 case 35: /* con13: CNSTU */
4534 case 34: /* con13: CNSTS */
4535 case 33: /* con13: CNSTP */
4536 case 32: /* con13: CNSTI */
4537 case 31: /* con13: CNSTC */
4538 case 30: /* reg: ADDRLP */
4539 case 29: /* reg: ADDRFP */
4540 case 28: /* stk: ADDRLP */
4541 case 27: /* stk: ADDRFP */
4542 case 25: /* stk13: ADDRLP */
4543 case 24: /* stk13: ADDRFP */
4544 case 23: /* reg: ADDRGP */
4545 case 17: /* con: CNSTU */
4546 case 16: /* con: CNSTS */
4547 case 15: /* con: CNSTP */
4548 case 14: /* con: CNSTI */
4549 case 13: /* con: CNSTC */
4550 case 6: /* reg: INDIRS(VREGP) */
4551 case 5: /* reg: INDIRP(VREGP) */
4552 case 4: /* reg: INDIRI(VREGP) */
4553 case 3: /* reg: INDIRF(VREGP) */
4554 case 2: /* reg: INDIRD(VREGP) */
4555 case 1: /* reg: INDIRC(VREGP) */
4556 break;
4557 case 12: /* stmt: ASGNS(VREGP,reg) */
4558 case 11: /* stmt: ASGNP(VREGP,reg) */
4559 case 10: /* stmt: ASGNI(VREGP,reg) */
4560 case 9: /* stmt: ASGNF(VREGP,reg) */
4561 case 8: /* stmt: ASGND(VREGP,reg) */
4562 case 7: /* stmt: ASGNC(VREGP,reg) */
4563 kids[0] = RIGHT_CHILD(p);
4564 break;
4565 case 182: /* stmt: rel */
4566 case 137: /* call: addr */
4567 case 108: /* rc5: reg */
4568 case 97: /* rc: reg */
4569 case 96: /* rc: con13 */
4570 case 95: /* reg: con */
4571 case 46: /* addr: stk */
4572 case 42: /* addr: base */
4573 case 41: /* base: stk13 */
4574 case 40: /* base: con13 */
4575 case 39: /* base: reg */
4576 case 26: /* reg: stk13 */
4577 case 18: /* stmt: reg */
4578 kids[0] = p;
4579 break;
4580 case 184: /* reg: NEGD(reg) */
4581 case 183: /* reg: LOADD(reg) */
4582 case 169: /* reg: CVID(reg) */
4583 case 168: /* reg: CVDI(reg) */
4584 case 167: /* reg: CVFD(reg) */
4585 case 166: /* reg: CVDF(reg) */
4586 case 165: /* reg: LOADF(reg) */
4587 case 164: /* reg: NEGF(reg) */
4588 case 149: /* stmt: ARGF(reg) */
4589 case 148: /* stmt: ARGD(reg) */
4590 case 147: /* stmt: ARGP(reg) */
4591 case 146: /* stmt: ARGI(reg) */
4592 case 145: /* stmt: RETI(reg) */
4593 case 144: /* stmt: RETF(reg) */
4594 case 143: /* stmt: RETD(reg) */
4595 case 141: /* stmt: CALLV(call) */
4596 case 140: /* reg: CALLI(call) */
4597 case 139: /* reg: CALLF(call) */
4598 case 138: /* reg: CALLD(call) */
4599 case 124: /* stmt: JUMPV(addr) */
4600 case 123: /* stmt: JUMPV(addrg) */
4601 case 121: /* reg: CVSU(reg) */
4602 case 120: /* reg: CVCU(reg) */
4603 case 119: /* reg: CVSI(reg) */
4604 case 118: /* reg: CVCI(reg) */
4605 case 117: /* reg: BCOMU(reg) */
4606 case 116: /* reg: NEGI(reg) */
4607 case 89: /* reg: LOADU(reg) */
4608 case 88: /* reg: LOADS(reg) */
4609 case 87: /* reg: LOADP(reg) */
4610 case 86: /* reg: LOADI(reg) */
4611 case 85: /* reg: LOADC(reg) */
4612 case 84: /* reg: CVUS(reg) */
4613 case 83: /* reg: CVUC(reg) */
4614 case 82: /* reg: CVIS(reg) */
4615 case 81: /* reg: CVIC(reg) */
4616 case 80: /* reg: CVUS(reg) */
4617 case 79: /* reg: CVUP(reg) */
4618 case 78: /* reg: CVUI(reg) */
4619 case 77: /* reg: CVUC(reg) */
4620 case 76: /* reg: CVPU(reg) */
4621 case 75: /* reg: CVIU(reg) */
4622 case 74: /* reg: CVIS(reg) */
4623 case 73: /* reg: CVIC(reg) */
4624 case 60: /* reg: INDIRD(base) */
4625 case 58: /* reg: INDIRD(addrl) */
4626 case 51: /* reg: INDIRF(addr) */
4627 case 50: /* reg: INDIRP(addr) */
4628 case 49: /* reg: INDIRI(addr) */
4629 case 48: /* reg: INDIRS(addr) */
4630 case 47: /* reg: INDIRC(addr) */
4631 case 22: /* reg: CVUP(reg) */
4632 case 21: /* reg: CVUI(reg) */
4633 case 20: /* reg: CVPU(reg) */
4634 case 19: /* reg: CVIU(reg) */
4635 kids[0] = LEFT_CHILD(p);
4636 break;
4637 case 181: /* rel: NEF(reg,reg) */
4638 case 180: /* rel: NED(reg,reg) */
4639 case 179: /* rel: LTF(reg,reg) */
4640 case 178: /* rel: LTD(reg,reg) */
4641 case 177: /* rel: LEF(reg,reg) */
4642 case 176: /* rel: LED(reg,reg) */
4643 case 175: /* rel: GTF(reg,reg) */
4644 case 174: /* rel: GTD(reg,reg) */
4645 case 173: /* rel: GEF(reg,reg) */
4646 case 172: /* rel: GED(reg,reg) */
4647 case 171: /* rel: EQF(reg,reg) */
4648 case 170: /* rel: EQD(reg,reg) */
4649 case 163: /* reg: SUBF(reg,reg) */
4650 case 162: /* reg: SUBD(reg,reg) */
4651 case 161: /* reg: MULF(reg,reg) */
4652 case 160: /* reg: MULD(reg,reg) */
4653 case 159: /* reg: DIVF(reg,reg) */
4654 case 158: /* reg: DIVD(reg,reg) */
4655 case 157: /* reg: ADDF(reg,reg) */
4656 case 156: /* reg: ADDD(reg,reg) */
4657 case 155: /* reg: MULU(reg,reg) */
4658 case 154: /* reg: MULI(reg,reg) */
4659 case 153: /* reg: MODU(reg,reg) */
4660 case 152: /* reg: MODI(reg,reg) */
4661 case 151: /* reg: DIVU(reg,reg) */
4662 case 150: /* reg: DIVI(reg,reg) */
4663 case 142: /* stmt: CALLB(call,reg) */
4664 case 135: /* stmt: NEI(reg,rc) */
4665 case 134: /* stmt: LTU(reg,rc) */
4666 case 133: /* stmt: LTI(reg,rc) */
4667 case 132: /* stmt: LEU(reg,rc) */
4668 case 131: /* stmt: LEI(reg,rc) */
4669 case 130: /* stmt: GTU(reg,rc) */
4670 case 129: /* stmt: GTI(reg,rc) */
4671 case 128: /* stmt: GEU(reg,rc) */
4672 case 127: /* stmt: GEI(reg,rc) */
4673 case 126: /* stmt: EQI(reg,rc) */
4674 case 112: /* reg: RSHU(reg,rc5) */
4675 case 111: /* reg: RSHI(reg,rc5) */
4676 case 110: /* reg: LSHU(reg,rc5) */
4677 case 109: /* reg: LSHI(reg,rc5) */
4678 case 106: /* reg: SUBU(reg,rc) */
4679 case 105: /* reg: SUBP(reg,rc) */
4680 case 104: /* reg: SUBI(reg,rc) */
4681 case 103: /* reg: BXORU(reg,rc) */
4682 case 102: /* reg: BORU(reg,rc) */
4683 case 101: /* reg: BANDU(reg,rc) */
4684 case 100: /* reg: ADDU(reg,rc) */
4685 case 99: /* reg: ADDP(reg,rc) */
4686 case 98: /* reg: ADDI(reg,rc) */
4687 case 68: /* stmt: ASGND(spill,reg) */
4688 case 67: /* stmt: ASGNF(spill,reg) */
4689 case 66: /* stmt: ASGNP(spill,reg) */
4690 case 65: /* stmt: ASGNI(spill,reg) */
4691 case 64: /* stmt: ASGNS(spill,reg) */
4692 case 63: /* stmt: ASGNC(spill,reg) */
4693 case 61: /* stmt: ASGND(base,reg) */
4694 case 59: /* stmt: ASGND(addrl,reg) */
4695 case 56: /* stmt: ASGNF(addr,reg) */
4696 case 55: /* stmt: ASGNP(addr,reg) */
4697 case 54: /* stmt: ASGNI(addr,reg) */
4698 case 53: /* stmt: ASGNS(addr,reg) */
4699 case 52: /* stmt: ASGNC(addr,reg) */
4700 case 45: /* addr: ADDU(reg,reg) */
4701 case 44: /* addr: ADDP(reg,reg) */
4702 case 43: /* addr: ADDI(reg,reg) */
4703 case 38: /* base: ADDU(reg,con13) */
4704 case 37: /* base: ADDP(reg,con13) */
4705 case 36: /* base: ADDI(reg,con13) */
4706 kids[0] = LEFT_CHILD(p);
4707 kids[1] = RIGHT_CHILD(p);
4708 break;
4709 case 72: /* reg: CVSU(INDIRS(addr)) */
4710 case 71: /* reg: CVCU(INDIRC(addr)) */
4711 case 70: /* reg: CVSI(INDIRS(addr)) */
4712 case 69: /* reg: CVCI(INDIRC(addr)) */
4713 kids[0] = LEFT_CHILD(LEFT_CHILD(p));
4714 break;
4715 case 185: /* stmt: ASGNB(reg,INDIRB(reg)) */
4716 case 115: /* reg: BXORU(reg,BCOMU(rc)) */
4717 case 114: /* reg: BORU(reg,BCOMU(rc)) */
4718 case 113: /* reg: BANDU(reg,BCOMU(rc)) */
4719 kids[0] = LEFT_CHILD(p);
4720 kids[1] = LEFT_CHILD(RIGHT_CHILD(p));
4721 break;
4722 default:
4723 fatal("_kids", "Bad rule number %d\n", eruleno);
4727 static void progend(){}
4728 static void progbeg(argc, argv) int argc; char *argv[]; {
4729 int i;
4732 union {
4733 char c;
4734 int i;
4735 } u;
4736 u.i = 0;
4737 u.c = 1;
4738 swap = (u.i == 1) != IR->little_endian;
4740 parseflags(argc, argv);
4741 for (i = 0; i < argc; i++)
4742 if (strcmp(argv[i], "-p") == 0 || strcmp(argv[i], "-pg") == 0)
4743 pflag = 1;
4744 for (i = 0; i < 8; i++) {
4745 greg[i + 0] = mkreg(stringf("g%d", i), i + 0, 1, IREG);
4746 greg[i + 8] = mkreg(stringf("o%d", i), i + 8, 1, IREG);
4747 greg[i + 16] = mkreg(stringf("l%d", i), i + 16, 1, IREG);
4748 greg[i + 24] = mkreg(stringf("i%d", i), i + 24, 1, IREG);
4750 for (i = 0; i < 32; i++)
4751 freg[i] = mkreg("%d", i, 1, FREG);
4752 for (i = 0; i < 31; i += 2)
4753 freg2[i] = mkreg("%d", i, 3, FREG);
4754 rmap[C] = rmap[S] = rmap[P] = rmap[B] = rmap[U] = rmap[I] =
4755 mkwildcard(greg);
4756 rmap[F] = mkwildcard(freg);
4757 rmap[D] = mkwildcard(freg2);
4758 tmask[IREG] = 0x3fff3e00;
4759 vmask[IREG] = 0x3ff00000;
4760 tmask[FREG] = ~(unsigned)0;
4761 vmask[FREG] = 0;
4763 static void target(p) Node p; {
4764 assert(p);
4765 switch (p->op) {
4766 case CNSTC: case CNSTI: case CNSTS: case CNSTU: case CNSTP:
4767 if (range(p, 0, 0) == 0) {
4768 setreg(p, greg[0]);
4769 p->x.registered = 1;
4771 break;
4772 case CALLD: setreg(p, freg2[0]); break;
4773 case CALLF: setreg(p, freg[0]); break;
4774 case CALLI:
4775 case CALLV: setreg(p, oreg[0]); break;
4776 case RETD: rtarget(p, 0, freg2[0]); break;
4777 case RETF: rtarget(p, 0, freg[0]); break;
4778 case RETI:
4779 rtarget(p, 0, ireg[0]);
4780 p->kids[0]->x.registered = 1;
4781 break;
4782 case ARGI: case ARGP:
4783 if (p->syms[RX]->u.c.v.i < 6) {
4784 rtarget(p, 0, oreg[p->syms[RX]->u.c.v.i]);
4785 p->op = LOAD+optype(p->op);
4786 setreg(p, oreg[p->syms[RX]->u.c.v.i]);
4788 break;
4789 case DIVI: case MODI: case MULI:
4790 case DIVU: case MODU: case MULU:
4791 setreg(p, oreg[0]);
4792 rtarget(p, 0, oreg[0]);
4793 rtarget(p, 1, oreg[1]);
4794 break;
4797 static void clobber(p) Node p; {
4798 assert(p);
4799 switch (p->op) {
4800 case CALLB: case CALLD: case CALLF: case CALLI:
4801 spill(~(unsigned)3, FREG, p);
4802 break;
4803 case CALLV:
4804 spill(oreg[0]->x.regnode->mask, IREG, p);
4805 spill(~(unsigned)3, FREG, p);
4806 break;
4807 case ARGF:
4808 if (p->syms[2]->u.c.v.i <= 6)
4809 spill((1<<(p->syms[2]->u.c.v.i + 8)), IREG, p);
4810 break;
4811 case ARGD:
4812 if (p->syms[2]->u.c.v.i <= 5)
4813 spill((3<<(p->syms[2]->u.c.v.i + 8))&0xff00, IREG, p);
4814 break;
4815 case DIVI: case MODI: case MULI:
4816 case DIVU: case MODU: case MULU:
4817 spill(0x00003e00, IREG, p); break;
4820 static int imm(p) Node p; {
4821 return range(p, -4096, 4095);
4823 static void doarg(p) Node p; {
4824 assert(p && p->syms[0] && p->op != ARG+B);
4825 p->syms[RX] = intconst(mkactual(4,
4826 p->syms[0]->u.c.v.i)/4);
4828 static void emit2(p) Node p; {
4829 switch (p->op) {
4830 case ARGF: {
4831 int n = p->syms[RX]->u.c.v.i;
4832 print("st %%f%d,[%%sp+4*%d+68]\n",
4833 getregnum(p->x.kids[0]), n);
4834 if (n <= 5)
4835 print("ld [%%sp+4*%d+68],%%o%d\n", n, n);
4836 break;
4838 case ARGD: {
4839 int n = p->syms[RX]->u.c.v.i;
4840 int src = getregnum(p->x.kids[0]);
4841 print("st %%f%d,[%%sp+4*%d+68]\n", src, n);
4842 print("st %%f%d,[%%sp+4*%d+68]\n", src+1, n+1);
4843 if (n <= 5)
4844 print("ld [%%sp+4*%d+68],%%o%d\n", n, n);
4845 if (n <= 4)
4846 print("ld [%%sp+4*%d+68],%%o%d\n", n+1, n+1);
4847 break;
4849 case LOADD: {
4850 int dst = getregnum(p);
4851 int src = getregnum(p->x.kids[0]);
4852 print("fmovs %%f%d,%%f%d; ", src, dst);
4853 print("fmovs %%f%d,%%f%d\n", src+1, dst+1);
4854 break;
4856 case NEGD: {
4857 int dst = getregnum(p);
4858 int src = getregnum(p->x.kids[0]);
4859 print("fnegs %%f%d,%%f%d; ", src, dst);
4860 print("fmovs %%f%d,%%f%d\n", src+1, dst+1);
4861 break;
4863 case ASGNB: {
4864 static int tmpregs[] = { 1, 2, 3 };
4865 dalign = salign = p->syms[1]->u.c.v.i;
4866 blkcopy(getregnum(p->x.kids[0]), 0,
4867 getregnum(p->x.kids[1]), 0,
4868 p->syms[0]->u.c.v.i, tmpregs);
4869 break;
4873 static void local(p) Symbol p; {
4874 if (retstruct) {
4875 p->x.name = stringd(4*16);
4876 p->x.offset = 4*16;
4877 retstruct = 0;
4878 return;
4880 if (isscalar(p->type) && !p->addressed && !isfloat(p->type))
4881 p->sclass = REGISTER;
4882 if (glevel && glevel != 3) p->sclass = AUTO; /* glevel!=3 is for Norman's debugger */
4883 if (askregvar(p, rmap[ttob(p->type)]) == 0)
4884 mkauto(p);
4886 static void function(f, caller, callee, ncalls)
4887 Symbol f, callee[], caller[]; int ncalls; {
4888 int autos = 0, i, leaf, reg, varargs;
4890 for (i = 0; callee[i]; i++)
4892 varargs = variadic(f->type)
4893 || i > 0 && strcmp(callee[i-1]->name,
4894 "__builtin_va_alist") == 0;
4895 usedmask[0] = usedmask[1] = 0;
4896 freemask[0] = freemask[1] = ~(unsigned)0;
4897 for (i = 0; i < 8; i++)
4898 ireg[i]->x.regnode->vbl = NULL;
4899 offset = 68;
4900 maxargoffset = 24;
4901 reg = 0;
4902 for (i = 0; callee[i]; i++) {
4903 Symbol p = callee[i], q = caller[i];
4904 int size = roundup(q->type->size, 4);
4905 assert(q);
4906 if (isfloat(p->type) || reg >= 6) {
4907 p->x.offset = q->x.offset = offset;
4908 p->x.name = q->x.name = stringd(offset);
4909 p->sclass = q->sclass = AUTO;
4910 autos++;
4912 else if (p->addressed || varargs)
4914 p->x.offset = offset;
4915 p->x.name = stringd(p->x.offset);
4916 p->sclass = AUTO;
4917 q->sclass = REGISTER;
4918 askregvar(q, ireg[reg]);
4919 assert(q->x.regnode);
4920 autos++;
4922 else if (glevel && glevel != 3) {
4923 p->x.offset = offset;
4924 p->x.name = stringd(p->x.offset);
4925 p->sclass = AUTO;
4926 q->sclass = REGISTER;
4927 askregvar(q, ireg[reg]);
4928 assert(q->x.regnode);
4929 autos++;
4932 else {
4933 p->sclass = q->sclass = REGISTER;
4934 askregvar(p, ireg[reg]);
4935 assert(p->x.regnode);
4936 q->x.name = p->x.name;
4938 offset += size;
4939 reg += isstruct(p->type) ? 1 : size/4;
4941 assert(caller[i] == 0);
4942 offset = maxoffset = 0;
4943 retstruct = isstruct(freturn(f->type));
4944 gencode(caller, callee);
4945 maxargoffset = roundup(maxargoffset, 4);
4946 framesize = roundup(maxoffset + maxargoffset + 4*(16+1), 8);
4947 assert(!varargs || autos);
4948 leaf = (!ncalls
4949 && !maxoffset && !autos
4950 && !isstruct(freturn(f->type))
4951 && !(usedmask[IREG]&0x00ffff01)
4952 && !(usedmask[FREG]&~(unsigned)3)
4953 && !pflag && !glevel);
4954 print(".align 4\n.proc 4\n%s:\n", f->x.name);
4955 if (leaf) {
4956 for (i = 0; caller[i] && callee[i]; i++) {
4957 Symbol p = caller[i], q = callee[i];
4958 if (p->sclass == REGISTER && q->sclass == REGISTER)
4959 assert(q->x.regnode),
4960 assert(q->x.regnode->set == IREG),
4961 assert(q->x.regnode->number >= 24),
4962 assert(q->x.regnode->number <= 31),
4963 p->x.name = greg[q->x.regnode->number - 16]->x.name;
4965 rename();
4966 } else if (framesize <= 4095)
4967 print("save %%sp,%d,%%sp\n", -framesize);
4968 else
4969 print("set %d,%%g1; save %%sp,%%g1,%%sp\n", -framesize);
4970 if (varargs)
4971 for (; reg < 6; reg++)
4972 print("st %%i%d,[%%fp+%d]\n", reg, 4*reg + 68);
4973 else
4974 offset = 4*(16 + 1);
4975 reg = 0;
4976 for (i = 0; caller[i]; i++) {
4977 Symbol p = caller[i];
4978 if (isdouble(p->type) && reg <= 4) {
4979 print("st %%r%d,[%%fp+%d]\n",
4980 ireg[reg++]->x.regnode->number, offset);
4981 print("st %%r%d,[%%fp+%d]\n",
4982 ireg[reg++]->x.regnode->number, offset + 4);
4983 } else if (isfloat(p->type) && reg <= 5)
4984 print("st %%r%d,[%%fp+%d]\n",
4985 ireg[reg++]->x.regnode->number, offset);
4986 else
4987 reg++;
4988 offset += roundup(p->type->size, 4);
4990 if (pflag) {
4991 int lab = genlabel(1);
4992 print("set L%d,%%o0; call mcount; nop\n", lab);
4993 print(".seg \"data\"\n.align 4; L%d:.word 0\n.seg \"text\"\n", lab);
4995 emitcode();
4996 if (!leaf)
4997 print("ret; restore\n");
4998 else {
4999 rename();
5000 print("retl; nop\n");
5003 #define exch(x, y, t) (((t) = x), ((x) = (y)), ((y) = (t)))
5005 static void rename() {
5006 int i;
5008 for (i = 0; i < 8; i++) {
5009 char *ptmp;
5010 int itmp;
5011 if (ireg[i]->x.regnode->vbl)
5012 ireg[i]->x.regnode->vbl->x.name = oreg[i]->x.name;
5013 exch(ireg[i]->x.name, oreg[i]->x.name, ptmp);
5014 exch(ireg[i]->x.regnode->number,
5015 oreg[i]->x.regnode->number, itmp);
5018 static void defconst(ty, v) int ty; Value v; {
5019 switch (ty) {
5020 case C: print(".byte %d\n", v.uc); return;
5021 case S: print(".half %d\n", v.ss); return;
5022 case I: print(".word %d\n", v.i ); return;
5023 case U: print(".word 0x%x\n", v.u ); return;
5024 case P: print(".word 0x%x\n", v.p ); return;
5025 case F:
5026 print(".word 0x%x\n", *(unsigned *)&v.f);
5027 return;
5028 case D: {
5029 unsigned *p = (unsigned *)&v.d;
5030 print(".word 0x%x\n.word 0x%x\n", p[swap], p[!swap]);
5031 return;
5034 assert(0);
5037 static void defaddress(p) Symbol p; {
5038 print(".word %s\n", p->x.name);
5041 static void defstring(n, str) int n; char *str; {
5042 char *s;
5044 for (s = str; s < str + n; s++)
5045 print(".byte %d\n", (*s)&0377);
5048 static void address(q, p, n) Symbol q, p; int n; {
5049 q->x.offset = p->x.offset + n;
5050 if (p->scope == GLOBAL || p->sclass == STATIC || p->sclass == EXTERN)
5051 q->x.name = stringf("%s%s%d", p->x.name, n >= 0 ? "+" : "", n);
5052 else
5053 q->x.name = stringd(q->x.offset);
5055 static void export(p) Symbol p; {
5056 print(".global %s\n", p->x.name);
5058 static void import(p) Symbol p; {}
5059 static void defsymbol(p) Symbol p; {
5060 if (p->scope >= LOCAL && p->sclass == STATIC)
5061 p->x.name = stringf("%d", genlabel(1));
5062 else
5063 assert(p->scope != CONSTANTS || isint(p->type) || isptr(p->type)),
5064 p->x.name = p->name;
5065 if (p->scope >= LABELS)
5066 p->x.name = stringf(p->generated ? "L%s" : "_%s",
5067 p->x.name);
5069 static void segment(n) int n; {
5070 cseg = n;
5071 switch (n) {
5072 case CODE: print(".seg \"text\"\n"); break;
5073 case BSS: print(".seg \"bss\"\n"); break;
5074 case DATA: print(".seg \"data\"\n"); break;
5075 case LIT: print(".seg \"text\"\n"); break;
5078 static void space(n) int n; {
5079 if (cseg != BSS)
5080 print(".skip %d\n", n);
5082 static void global(p) Symbol p; {
5083 print(".align %d\n", p->type->align);
5084 assert(p->u.seg);
5085 if (p->u.seg == BSS
5086 && (p->sclass == STATIC || Aflag >= 2))
5087 print(".reserve %s,%d\n", p->x.name, p->type->size);
5088 else if (p->u.seg == BSS)
5089 print(".common %s,%d\n", p->x.name, p->type->size);
5090 else
5091 print("%s:\n", p->x.name);
5093 static void blkfetch(k, off, reg, tmp)
5094 int k, off, reg, tmp; {
5095 assert(k == 1 || k == 2 || k == 4);
5096 assert(salign >= k);
5097 if (k == 1)
5098 print("ldub [%%r%d+%d],%%r%d\n", reg, off, tmp);
5099 else if (k == 2)
5100 print("lduh [%%r%d+%d],%%r%d\n", reg, off, tmp);
5101 else
5102 print("ld [%%r%d+%d],%%r%d\n", reg, off, tmp);
5104 static void blkstore(k, off, reg, tmp)
5105 int k, off, reg, tmp; {
5106 assert(k == 1 || k == 2 || k == 4);
5107 assert(dalign >= k);
5108 if (k == 1)
5109 print("stb %%r%d,[%%r%d+%d]\n", tmp, reg, off);
5110 else if (k == 2)
5111 print("sth %%r%d,[%%r%d+%d]\n", tmp, reg, off);
5112 else
5113 print("st %%r%d,[%%r%d+%d]\n", tmp, reg, off);
5115 static void blkloop(dreg, doff, sreg, soff, size, tmps)
5116 int dreg, doff, sreg, soff, size, tmps[]; {
5117 if ((size&~7) < 4096) {
5118 print("add %%r%d,%d,%%r%d\n", sreg, size&~7, sreg);
5119 print("add %%r%d,%d,%%r%d\n", dreg, size&~7, tmps[2]);
5120 } else {
5121 print("set %d,%%r%d\n", size&~7, tmps[2]);
5122 print("add %%r%d,%%r%d,%%r%d\n", sreg, tmps[2], sreg);
5123 print("add %%r%d,%%r%d,%%r%d\n", dreg, tmps[2], tmps[2]);
5125 blkcopy(tmps[2], doff, sreg, soff, size&7, tmps);
5126 print("1: dec 8,%%r%d\n", tmps[2]);
5127 blkcopy(tmps[2], doff, sreg, soff - 8, 8, tmps);
5128 print("cmp %%r%d,%%r%d; ", tmps[2], dreg);
5129 print("bgt 1b; ");
5130 print("dec 8,%%r%d\n", sreg);
5132 static void defsymbol2(p) Symbol p; {
5133 if (p->scope >= LOCAL && p->sclass == STATIC)
5134 p->x.name = stringf(".%d", genlabel(1));
5135 else
5136 assert(p->scope != CONSTANTS || isint(p->type) || isptr(p->type)),
5137 p->x.name = p->name;
5138 if (p->scope >= LABELS)
5139 p->x.name = stringf(p->generated ? ".L%s" : "%s",
5140 p->x.name);
5143 static void global2(p) Symbol p; {
5144 assert(p->u.seg);
5145 if (p->sclass != STATIC && !p->generated)
5146 print(".type %s,#%s\n", p->x.name,
5147 isfunc(p->type) ? "function" : "object");
5148 if (p->u.seg == BSS && p->sclass == STATIC)
5149 print(".local %s\n.common %s,%d,%d\n", p->x.name, p->x.name,
5150 p->type->size, p->type->align);
5151 else if (p->u.seg == BSS && Aflag >= 2)
5152 print(".align %d\n%s:.skip %d\n", p->type->align, p->x.name,
5153 p->type->size);
5154 else if (p->u.seg == BSS)
5155 print(".common %s,%d,%d\n", p->x.name, p->type->size, p->type->align);
5156 else
5157 print(".align %d\n%s:\n", p->type->align, p->x.name);
5160 static void segment2(n) int n; {
5161 cseg = n;
5162 switch (n) {
5163 case CODE: print(".section \".text\"\n"); break;
5164 case BSS: print(".section \".bss\"\n"); break;
5165 case DATA: print(".section \".data\"\n"); break;
5166 case LIT: print(".section \".rodata\"\n"); break;
5169 #ifdef sparc
5170 #include <stab.h>
5171 static char *currentfile; /* current file name */
5172 static int ntypes;
5174 static void stabblock ARGS((int, int, Symbol*));
5175 static void stabfend ARGS((Symbol, int));
5176 static void stabinit ARGS((char *, int, char *[]));
5177 static void stabline ARGS((Coordinate *));
5178 static void stabsym ARGS((Symbol));
5179 static void stabtype ARGS((Symbol));
5181 static void asgncode ARGS((Type, int));
5182 static void dbxout ARGS((Type));
5183 static int dbxtype ARGS((Type));
5184 static int emittype ARGS((Type, int, int));
5186 /* asgncode - assign type code to ty */
5187 static void asgncode(ty, lev) Type ty; int lev; {
5188 if (ty->x.marked || ty->x.typeno)
5189 return;
5190 ty->x.marked = 1;
5191 switch (ty->op) {
5192 case VOLATILE: case CONST: case VOLATILE+CONST:
5193 asgncode(ty->type, lev);
5194 ty->x.typeno = ty->type->x.typeno;
5195 break;
5196 case POINTER: case FUNCTION: case ARRAY:
5197 asgncode(ty->type, lev + 1);
5198 /* fall thru */
5199 case VOID: case CHAR: case SHORT: case INT: case UNSIGNED:
5200 case FLOAT: case DOUBLE:
5201 break;
5202 case STRUCT: case UNION: {
5203 Field p;
5204 for (p = fieldlist(ty); p; p = p->link)
5205 asgncode(p->type, lev + 1);
5206 /* fall thru */
5207 case ENUM:
5208 if (ty->x.typeno == 0)
5209 ty->x.typeno = ++ntypes;
5210 if (lev > 0 && (*ty->u.sym->name < '0' || *ty->u.sym->name > '9'))
5211 dbxout(ty);
5212 break;
5214 default:
5215 assert(0);
5219 /* dbxout - output .stabs entry for type ty */
5220 static void dbxout(ty) Type ty; {
5221 ty = unqual(ty);
5222 if (!ty->x.printed) {
5223 int col = 0;
5224 print(".stabs \""), col += 8;
5225 if (ty->u.sym && !(isfunc(ty) || isarray(ty) || isptr(ty)))
5226 print("%s", ty->u.sym->name), col += strlen(ty->u.sym->name);
5227 print(":%c", isstruct(ty) || isenum(ty) ? 'T' : 't'), col += 2;
5228 emittype(ty, 0, col);
5229 print("\",%d,0,0,0\n", N_LSYM);
5233 /* dbxtype - emit a stabs entry for type ty, return type code */
5234 static int dbxtype(ty) Type ty; {
5235 asgncode(ty, 0);
5236 dbxout(ty);
5237 return ty->x.typeno;
5241 * emittype - emit ty's type number, emitting its definition if necessary.
5242 * Returns the output column number after emission; col is the approximate
5243 * output column before emission and is used to emit continuation lines for long
5244 * struct, union, and enum types. Continuations are not emitted for other types,
5245 * even if the definition is long. lev is the depth of calls to emittype.
5247 static int emittype(ty, lev, col) Type ty; int lev, col; {
5248 int tc = ty->x.typeno;
5250 if (isconst(ty) || isvolatile(ty)) {
5251 col = emittype(ty->type, lev, col);
5252 ty->x.typeno = ty->type->x.typeno;
5253 ty->x.printed = 1;
5254 return col;
5256 if (tc == 0) {
5257 ty->x.typeno = tc = ++ntypes;
5258 /* fprint(2,"`%t'=%d\n", ty, tc); */
5260 print("%d", tc), col += 3;
5261 if (ty->x.printed)
5262 return col;
5263 ty->x.printed = 1;
5264 switch (ty->op) {
5265 case VOID: /* void is defined as itself */
5266 print("=%d", tc), col += 1+3;
5267 break;
5268 case CHAR: /* unsigned char is a subrange of int */
5269 if (ty == unsignedchar)
5270 print("=r1;0;255;"), col += 10;
5271 else /* following pcc, char is a subrange of itself */
5272 print("=r%d;-128;127;", tc), col += 2+3+10;
5273 break;
5274 case SHORT: /* short is a subrange of int */
5275 if (ty == unsignedshort)
5276 print("=r1;0;65535;"), col += 12;
5277 else /* signed */
5278 print("=r1;-32768;32767;"), col += 17;
5279 break;
5280 case INT: /* int is a subrange of itself */
5281 print("=r1;%d;%d;", INT_MIN, INT_MAX), col += 4+11+1+10+1;
5282 break;
5283 case UNSIGNED: /* unsigned is a subrange of int */
5284 print("=r1;0;-1;"), col += 9;
5285 break;
5286 case FLOAT: case DOUBLE: /* float, double get sizes instead of ranges */
5287 print("=r1;%d;0;", ty->size), col += 4+1+3;
5288 break;
5289 case POINTER:
5290 print("=*"), col += 2;
5291 col = emittype(ty->type, lev + 1, col);
5292 break;
5293 case FUNCTION:
5294 print("=f"), col += 2;
5295 col = emittype(ty->type, lev + 1, col);
5296 break;
5297 case ARRAY: /* array includes subscript as an int range */
5298 if (ty->size && ty->type->size)
5299 print("=ar1;0;%d;", ty->size/ty->type->size - 1), col += 7+3+1;
5300 else
5301 print("=ar1;0;-1;"), col += 10;
5302 col = emittype(ty->type, lev + 1, col);
5303 break;
5304 case STRUCT: case UNION: {
5305 Field p;
5306 if (!ty->u.sym->defined) {
5307 print("=x%c%s:", ty->op == STRUCT ? 's' : 'u', ty->u.sym->name);
5308 col += 2+1+strlen(ty->u.sym->name)+1;
5309 break;
5311 if (lev > 0 && (*ty->u.sym->name < '0' || *ty->u.sym->name > '9')) {
5312 ty->x.printed = 0;
5313 break;
5315 print("=%c%d", ty->op == STRUCT ? 's' : 'u', ty->size), col += 1+1+3;
5316 for (p = fieldlist(ty); p; p = p->link) {
5317 if (p->name)
5318 print("%s:", p->name), col += strlen(p->name)+1;
5319 else
5320 print(":"), col += 1;
5321 col = emittype(p->type, lev + 1, col);
5322 if (p->lsb)
5323 print(",%d,%d;", 8*p->offset +
5324 (IR->little_endian ? fieldright(p) : fieldleft(p)),
5325 fieldsize(p));
5326 else
5327 print(",%d,%d;", 8*p->offset, 8*p->type->size);
5328 col += 1+3+1+3+1; /* accounts for ,%d,%d; */
5329 if (col >= 80 && p->link) {
5330 print("\\\\\",%d,0,0,0\n.stabs \"", N_LSYM);
5331 col = 8;
5334 print(";"), col += 1;
5335 break;
5337 case ENUM: {
5338 Symbol *p;
5339 if (lev > 0 && (*ty->u.sym->name < '0' || *ty->u.sym->name > '9')) {
5340 ty->x.printed = 0;
5341 break;
5343 print("=e"), col += 2;
5344 for (p = ty->u.sym->u.idlist; *p; p++) {
5345 print("%s:%d,", (*p)->name, (*p)->u.value), col += strlen((*p)->name)+3;
5346 if (col >= 80 && p[1]) {
5347 print("\\\\\",%d,0,0,0\n.stabs \"", N_LSYM);
5348 col = 8;
5351 print(";"), col += 1;
5352 break;
5354 default:
5355 assert(0);
5357 return col;
5360 /* stabblock - output a stab entry for '{' or '}' at level lev */
5361 static void stabblock(brace, lev, p) int brace, lev; Symbol *p; {
5362 if (brace == '{')
5363 while (*p)
5364 stabsym(*p++);
5365 print(".stabd 0x%x,0,%d\n", brace == '{' ? N_LBRAC : N_RBRAC, lev);
5368 /* stabfend - end of function p */
5369 static void stabfend(p, line) Symbol p; int line; {}
5371 /* stabinit - initialize stab output */
5372 static void stabinit(file, argc, argv) int argc; char *file, *argv[]; {
5373 typedef void (*Closure) ARGS((Symbol, void *));
5375 if (file && *file) {
5376 (*IR->segment)(CODE);
5377 print("Ltext:.stabs \"%s\",0x%x,0,0,Ltext\n", file, N_SO);
5378 currentfile = file;
5380 dbxtype(inttype);
5381 dbxtype(chartype);
5382 dbxtype(doubletype);
5383 dbxtype(floattype);
5384 dbxtype(longdouble);
5385 dbxtype(longtype);
5386 dbxtype(shorttype);
5387 dbxtype(signedchar);
5388 dbxtype(unsignedchar);
5389 dbxtype(unsignedlong);
5390 dbxtype(unsignedshort);
5391 dbxtype(unsignedtype);
5392 dbxtype(voidtype);
5393 foreach(types, GLOBAL, (Closure)stabtype, NULL);
5396 /* stabline - emit stab entry for source coordinate *cp */
5397 static void stabline(cp) Coordinate *cp; {
5398 if (cp->file && cp->file != currentfile) {
5399 int lab = genlabel(1);
5400 print("L%d: .stabs \"%s\",0x%x,0,0,L%d\n", lab,
5401 cp->file, N_SOL, lab);
5402 currentfile = cp->file;
5404 print(".stabd 0x%x,0,%d\n", N_SLINE, cp->y);
5407 /* stabsym - output a stab entry for symbol p */
5408 static void stabsym(p) Symbol p; {
5409 int code, tc, sz = p->type->size;
5411 if (p->generated || p->computed)
5412 return;
5413 if (isfunc(p->type)) {
5414 print(".stabs \"%s:%c%d\",%d,0,0,%s\n", p->name,
5415 p->sclass == STATIC ? 'f' : 'F', dbxtype(freturn(p->type)),
5416 N_FUN, p->x.name);
5417 return;
5419 if (!IR->wants_argb && p->scope == PARAM && p->structarg) {
5420 assert(isptr(p->type) && isstruct(p->type->type));
5421 tc = dbxtype(p->type->type);
5422 sz = p->type->type->size;
5423 } else
5424 tc = dbxtype(p->type);
5425 if (p->sclass == AUTO && p->scope == GLOBAL || p->sclass == EXTERN) {
5426 print(".stabs \"%s:G", p->name);
5427 code = N_GSYM;
5428 } else if (p->sclass == STATIC) {
5429 print(".stabs \"%s:%c%d\",%d,0,0,%s\n", p->name, p->scope == GLOBAL ? 'S' : 'V',
5430 tc, p->u.seg == BSS ? N_LCSYM : N_STSYM, p->x.name);
5431 return;
5432 } else if (p->sclass == REGISTER) {
5433 if (p->scope > PARAM) {
5434 int r = p->x.regnode->number;
5435 if (p->x.regnode->set == FREG)
5436 r += 32; /* floating point */
5437 print(".stabs \"%s:r%d\",%d,0,", p->name, tc, N_RSYM);
5438 print("%d,%d\n", sz, r);
5440 return;
5441 } else if (p->scope == PARAM) {
5442 print(".stabs \"%s:p", p->name);
5443 code = N_PSYM;
5444 } else if (p->scope >= LOCAL) {
5445 print(".stabs \"%s:", p->name);
5446 code = N_LSYM;
5447 } else
5448 assert(0);
5449 print("%d\",%d,0,0,%s\n", tc, code,
5450 p->scope >= PARAM && p->sclass != EXTERN ? p->x.name : "0");
5453 /* stabtype - output a stab entry for type *p */
5454 static void stabtype(p) Symbol p; {
5455 if (p->type) {
5456 if (p->sclass == 0)
5457 dbxtype(p->type);
5458 else if (p->sclass == TYPEDEF)
5459 print(".stabs \"%s:t%d\",%d,0,0,0\n", p->name, dbxtype(p->type), N_LSYM);
5462 #else
5463 #define stabblock 0
5464 #define stabinit 0
5465 #define stabline 0
5466 #define stabsym 0
5467 #define stabtype 0
5468 #endif
5469 Interface sparcIR = {
5470 1, 1, 0, /* char */
5471 2, 2, 0, /* short */
5472 4, 4, 0, /* int */
5473 4, 4, 1, /* float */
5474 8, 8, 1, /* double */
5475 4, 4, 0, /* T * */
5476 0, 1, 0, /* struct */
5477 0, /* little_endian */
5478 1, /* mulops_calls */
5479 1, /* wants_callb */
5480 0, /* wants_argb */
5481 1, /* left_to_right */
5482 0, /* wants_dag */
5483 address,
5484 blockbeg,
5485 blockend,
5486 defaddress,
5487 defconst,
5488 defstring,
5489 defsymbol,
5490 emit,
5491 export,
5492 function,
5493 gen,
5494 global,
5495 import,
5496 local,
5497 progbeg,
5498 progend,
5499 segment,
5500 space,
5501 stabblock, 0, 0, stabinit, stabline, stabsym, stabtype,
5503 1, /* max_unaligned_load */
5504 blkfetch, blkstore, blkloop,
5505 _label,
5506 _rule,
5507 _nts,
5508 _kids,
5509 _opname,
5510 _arity,
5511 _string,
5512 _templates,
5513 _isinstruction,
5514 _ntname,
5515 emit2,
5516 doarg,
5517 target,
5518 clobber,
5523 Interface solarisIR = {
5524 1, 1, 0, /* char */
5525 2, 2, 0, /* short */
5526 4, 4, 0, /* int */
5527 4, 4, 1, /* float */
5528 8, 8, 1, /* double */
5529 4, 4, 0, /* T * */
5530 0, 1, 0, /* struct */
5531 0, /* little_endian */
5532 1, /* mulops_calls */
5533 1, /* wants_callb */
5534 0, /* wants_argb */
5535 1, /* left_to_right */
5536 0, /* wants_dag */
5537 address,
5538 blockbeg,
5539 blockend,
5540 defaddress,
5541 defconst,
5542 defstring,
5543 defsymbol2,
5544 emit,
5545 export,
5546 function,
5547 gen,
5548 global2,
5549 import,
5550 local,
5551 progbeg,
5552 progend,
5553 segment2,
5554 space,
5555 stabblock, 0, 0, stabinit, stabline, stabsym, stabtype,
5557 1, /* max_unaligned_load */
5558 blkfetch, blkstore, blkloop,
5559 _label,
5560 _rule,
5561 _nts,
5562 _kids,
5563 _opname,
5564 _arity,
5565 _string,
5566 _templates,
5567 _isinstruction,
5568 _ntname,
5569 emit2,
5570 doarg,
5571 target,
5572 clobber,