Pristine Ack-5.5
[Ack-5.5.git] / mach / i386 / ce / EM_table
1 #define PUSH_POP_OPT    TRUE
2
3 /******************************************************************************/
4 /*                                                                            */
5 /*              Group 1 : load instructions                                   */
6 /*                                                                            */
7 /******************************************************************************/
8
9 C_loc           ==>     "push $1".
10
11 C_lol           ==>     "push $1(ebp)".
12
13 C_loe..         ==>     "push ($1+$2)".
14
15 C_lil           ==>     "mov eax, $1(ebp)";
16                         "push (eax)".
17
18 C_lof           ==>     "pop eax";
19                         "push $1(eax)".
20
21 C_lal           ==>     "lea eax, $1(ebp)";
22                         "push eax".
23
24 C_lae..         ==>     "push $1+$2".
25
26 C_lxl  
27   $1 == 0       ==>     "push ebp".
28
29   $1 == 1       ==>     "push 8(ebp)".
30
31   default       ==>     "mov ecx, $1-1";
32                         "mov eax, 8(ebp)";
33                         "1: mov eax, 8(eax)";
34                         "loop 1b";
35                         "push eax".
36
37 C_lxa   
38   $1 == 0       ==>     "lea eax, 8(ebp)";
39                         "push eax".
40
41   $1 == 1       ==>     "mov eax, 8(ebp)";
42                         "add eax, 8";
43                         "push eax".
44
45   default       ==>     "mov ecx, $1-1";
46                         "mov eax, 8(ebp)";
47                         "1: mov eax, 8(eax)";
48                         "loop 1b";
49                         "add eax, 8";
50                         "push eax".
51
52 C_loi
53   $1 == 1       ==>     "pop ecx";
54                         "movzxb eax, (ecx)";
55                         "push eax".
56
57   $1 == 2       ==>     "pop ecx";
58                         "movzx eax, (ecx)";
59                         "push eax".
60          
61   $1 == 4       ==>     "pop eax";
62                         "push (eax)".
63           
64   default       ==>     "pop ebx";
65                         "mov ecx, $1";
66                         "call .loi".
67
68 C_los
69   $1 == 4       ==>     "pop ecx";
70                         "pop ebx";
71                         "call .los".
72
73   default       ==>     arg_error( "C_los", $1).
74
75 C_los_narg      ==>     "pop eax";
76                         "cmp eax, 4";
77                         "jne .unknown";
78                         "pop ecx";
79                         "pop ebx";
80                         "call .los".
81
82 C_ldl           ==>     "push $1+4(ebp)";
83                         "push $1(ebp)".
84
85 C_lde..         ==>     "push ($1+$2+4)";
86                         "push ($1+$2)".
87
88 C_ldf           ==>     "pop eax";
89                         "push $1+4(eax)";
90                         "push $1(eax)".
91
92 C_lpi           ==>     "push $1".
93
94 /******************************************************************************/
95 /*                                                                            */
96 /*              Group 2 : store instructions                                  */
97 /*                                                                            */
98 /******************************************************************************/
99
100 C_stl           ==>     "pop $1(ebp)".
101
102 C_ste..         ==>     "pop ($1+$2)".
103
104 C_sil           ==>     "mov eax, $1(ebp)";
105                         "pop (eax)".
106
107 C_stf           ==>     "pop eax";
108                         "pop $1(eax)".
109
110 C_sti
111   $1 == 1       ==>     "pop ecx";
112                         "pop eax";
113                         "movb (ecx), al".
114
115   $1 == 2       ==>     "pop eax";
116                         "pop ecx";
117                         "movw (eax),ecx".
118
119   $1 == 4       ==>     "pop eax";
120                         "pop (eax)".
121
122   default       ==>     "pop ebx";
123                         "mov ecx, $1";
124                         "call .sti".
125
126 C_sts
127   $1 == 4       ==>     "pop ecx";
128                         "pop ebx";
129                         "call .sti".
130
131   default       ==>     arg_error( "C_sts", $1).
132
133 C_sts_narg      ==>     "pop eax";
134                         "cmp eax, 4";
135                         "jne .unknown";
136                         "pop ecx";
137                         "pop ebx";
138                         "call .sti".
139
140 C_sdl           ==>     "pop $1(ebp)";
141                         "pop $1+4(ebp)".
142
143 C_sde..         ==>     "pop ($1+$2)";
144                         "pop ($1+$2+4)".
145
146 C_sdf           ==>     "pop eax";
147                         "pop $1(eax)";
148                         "pop $1+4(eax)".
149
150 /******************************************************************************/
151 /*                                                                            */
152 /*              Group 3 : integer arithmetic                                  */
153 /*                                                                            */
154 /******************************************************************************/
155
156 C_adi
157   $1 == 4       ==>     "pop eax";
158                         "pop ecx";
159                         "add eax, ecx";
160                         "push eax".
161
162   default       ==>     arg_error("C_adi", $1).
163
164 C_adi_narg      ==>     "pop ecx";
165                         "pop eax";
166                         "call .adi";
167                         "push eax".
168
169 C_sbi   
170   $1 == 4       ==>     "pop ecx";
171                         "pop eax";
172                         "sub eax, ecx";
173                         "push eax".
174
175   default       ==>     arg_error("C_sbi", $1).
176
177 C_sbi_narg      ==>     "pop ecx";
178                         "pop eax";
179                         "call .sbi";
180                         "push eax".
181
182 C_mli
183   $1 == 4       ==>     "pop eax";
184                         "pop ecx";
185                         "imul ecx";
186                         "push eax".
187
188   default       ==>     arg_error( "C_mli", $1).
189
190 C_mli_narg      ==>     "pop eax";
191                         "call .mli".
192
193 C_dvi
194   $1 == 4       ==>     "pop ecx";
195                         "pop eax";
196                         "cdq";
197                         "idiv ecx";
198                         "push eax".
199
200   default       ==>     arg_error( "C_dvi", $1).
201
202 C_dvi_narg      ==>     "pop eax";
203                         "call .dvi".
204
205 C_rmi
206   $1 == 4       ==>     "pop ebx";
207                         "pop eax";
208                         "cdq";
209                         "idiv ebx";
210                         "push edx".
211
212   default       ==>     arg_error( "C_rmi", $1).
213
214 C_rmi_narg      ==>     "pop eax";
215                         "call .rmi".
216
217 C_ngi
218   $1 == 4       ==>     "pop eax";
219                         "neg eax";
220                         "push eax".
221
222   default       ==>     "mov eax, $1";
223                         "call .ngi".
224
225 C_ngi_narg      ==>     "pop eax";
226                         "call .ngi".
227
228 C_sli
229   $1 == 4       ==>     "pop ecx";
230                         "pop eax";
231                         "sal eax, cl";
232                         "push eax".
233
234   default       ==>     "mov eax, $1";
235                         "call .sli".
236
237 C_sli_narg      ==>     "pop eax";
238                         "call .sli".
239
240 C_sri
241   $1 == 4       ==>     "pop ecx";
242                         "pop eax";
243                         "sar eax, cl";
244                         "push eax".
245
246   default       ==>     "mov eax, $1";
247                         "call .sri".
248
249 C_sri_narg      ==>     "pop eax";
250                         "call .sri".
251
252 /******************************************************************************/
253 /*                                                                            */
254 /*              Group 4 : Unsigned arithmetic                                 */
255 /*                                                                            */
256 /******************************************************************************/
257
258 C_adu           ==>     C_adi( $1).
259
260 C_adu_narg      ==>     C_adi_narg().
261
262 C_sbu           ==>     C_sbi( $1).
263
264 C_sbu_narg      ==>     C_sbi_narg().
265
266 C_mlu           ==>     C_mli( $1).
267
268 C_mlu_narg      ==>     C_mli_narg().
269
270 C_dvu
271   $1 == 4       ==>     "pop ebx";
272                         "pop eax";
273                         "xor edx, edx";
274                         "div ebx";
275                         "push eax".
276
277   default       ==>     "mov eax, $1";
278                         "call .dvu".
279
280 C_dvu_narg      ==>     "pop eax";
281                         "call .dvu".
282
283 C_rmu
284   $1 == 4       ==>     "pop ebx";
285                         "pop eax";
286                         "xor edx, edx";
287                         "div ebx";
288                         "push edx".
289
290   default       ==>     "mov eax, $1";
291                         "call .rmu".
292
293 C_rmu_narg      ==>     "pop eax";
294                         "call .rmu".
295
296 C_slu           ==>     C_sli( $1).
297
298 C_slu_narg      ==>     C_sli_narg().
299
300 C_sru
301   $1 == 4       ==>     "pop ecx";
302                         "pop eax";
303                         "shr eax, cl";
304                         "push eax".
305
306   default       ==>     arg_error( "C_sru", $1).
307
308 /******************************************************************************/
309 /*                                                                            */
310 /*              Group 5 : Floating point arithmetic                           */
311 /*                                                                            */
312 /******************************************************************************/
313
314 C_adf
315   $1 == 4       ==>     "call .adf4";
316                         "pop ebx".
317   $1 == 8       ==>     "call .adf8";
318                         "add esp,8".
319   default       ==>     arg_error("C_adf", $1).
320
321 C_sbf
322   $1 == 4       ==>     "call .sbf4";
323                         "pop ebx".
324   $1 == 8       ==>     "call .sbf8";
325                         "add esp,8".
326   default       ==>     arg_error("C_sbf", $1).
327
328 C_mlf
329   $1 == 4       ==>     "call .mlf4";
330                         "pop ebx".
331   $1 == 8       ==>     "call .mlf8";
332                         "add esp,8".
333   default       ==>     arg_error("C_mlf", $1).
334
335 C_dvf
336   $1 == 4       ==>     "call .dvf4";
337                         "pop ebx".
338   $1 == 8       ==>     "call .dvf8";
339                         "add esp,8".
340   default       ==>     arg_error("C_dvf", $1).
341
342 C_ngf
343   $1 == 4       ==>     "call .ngf4".
344   $1 == 8       ==>     "call .ngf8".
345   default       ==>     arg_error("C_ngf", $1).
346
347 C_fif
348   $1 == 4       ==>     C_lor((arith)1);
349                         "call .fif4";
350                         "pop ebx".
351   $1 == 8       ==>     C_lor((arith)1);
352                         "call .fif8";
353                         "pop ebx".
354   default       ==>     arg_error("C_fif", $1).
355
356 C_fef
357   $1 == 4       ==>     "mov eax,esp";
358                         "sub eax,4";
359                         "push eax";
360                         "call .fef4".
361   $1 == 8       ==>     "mov eax,esp";
362                         "sub eax,4";
363                         "push eax";
364                         "call .fef8".
365   default       ==>     arg_error("C_fef", $1).
366
367 /******************************************************************************/
368 /*                                                                            */
369 /*              Group 6 : Pointer arithmetic                                  */
370 /*                                                                            */
371 /******************************************************************************/
372
373 C_adp
374
375   $1 == 0       ==>     .
376
377   $1 == 1       ==>     "pop eax";
378                         "inc eax";
379                         "push eax".
380
381   $1 == -1      ==>     "pop eax";
382                         "dec eax";
383                         "push eax".
384
385   default       ==>     "pop eax";
386                         "add eax, $1";
387                         "push eax".
388
389 C_ads
390   $1 == 4       ==>     "pop eax";
391                         "pop ebx";
392                         "add eax, ebx";
393                         "push eax".
394
395   default       ==>     arg_error( "C_ads", $1).
396
397 C_ads_narg      ==>     "pop eax";
398                         "cmp eax, 4";
399                         "jne .unknown";
400                         "pop eax";
401                         "pop ebx";
402                         "add eax, ebx";
403                         "push eax".
404
405 C_sbs
406   $1 == 4       ==>     "pop ebx";
407                         "pop eax";
408                         "sub eax, ebx";
409                         "push eax".
410
411   default       ==>     arg_error( "C_sbs", $1).
412
413 C_sbs_narg      ==>     "pop eax";
414                         "cmp eax, 4";
415                         "jne .unknown";
416                         "pop ebx";
417                         "pop eax";
418                         "sub eax, ebx";
419                         "push eax".
420
421 /******************************************************************************/
422 /*                                                                            */
423 /*              Group 7 : Increment/decrement/zero                            */
424 /*                                                                            */
425 /******************************************************************************/
426
427 C_inc           ==>     "pop eax";
428                         "inc eax";
429                         "push eax".
430
431 C_inl           ==>     "inc $1(ebp)".
432
433 C_ine..         ==>     "inc ($1+$2)".
434
435 C_dec           ==>     "pop eax";
436                         "dec eax";
437                         "push eax".
438
439 C_del           ==>     "dec $1(ebp)".
440
441 C_dee..         ==>     "dec ($1+$2)".
442
443 C_zrl           ==>     "mov $1(ebp), 0".
444
445 C_zre..         ==>     "mov ($1+$2), 0".
446
447 C_zer
448   $1 == 4       ==>     "xor eax, eax";
449                         "push eax".
450
451   $1 == 8       ==>     "xor eax, eax";
452                         "push eax";
453                         "push eax".
454
455   $1 % 4 == 0   ==>     "mov ecx, $1/4";
456                         "xor eax, eax";
457                         "1: push eax";
458                         "loop 1b".
459
460   default       ==>     arg_error( "C_zer", $1).
461
462 C_zrf           ==>     C_zer($1).
463
464 C_zer_narg      ==>     "pop ecx";
465                         "sar ecx, 2";
466                         "xor eax, eax";
467                         "1: push eax";
468                         "loop 1b".
469
470 /******************************************************************************/
471 /*                                                                            */
472 /*              Group 8 : Convert                                             */
473 /*                                                                            */
474 /******************************************************************************/
475
476 C_cii           ==>     "pop ecx";
477                         "pop edx";
478                         "pop eax";
479                         "call .cii";
480                         "push eax".
481
482 C_cui           ==>     C_cuu().
483
484 C_ciu           ==>     C_cuu().
485
486 C_cuu           ==>     "pop ecx";
487                         "pop edx".
488
489 C_cif           ==>     "pop eax";
490                         "cmp eax,4";
491                         "jne 1f";
492                         "call .cif4";
493                         "pop ebx";
494                         "jmp 2f";
495                         "1: call .cif8";
496                         "2:".
497
498 C_cuf           ==>     "pop eax";
499                         "cmp eax,4";
500                         "jne 1f";
501                         "call .cuf4";
502                         "pop ebx";
503                         "jmp 2f";
504                         "1: call .cuf8";
505                         "2:".
506
507 C_cfi           ==>     "call .cfi";
508                         "pop ecx";
509                         "pop ebx";
510                         "cmp ebx,4";
511                         "je 1f";
512                         "pop ebx";
513                         "1:".
514
515 C_cfu           ==>     "call .cfu";
516                         "pop ecx";
517                         "pop ebx";
518                         "cmp ebx,4";
519                         "je 1f";
520                         "pop ebx";
521                         "1:".
522
523 C_cff           ==>     "pop eax";
524                         "pop ebx";
525                         "cmp eax,ebx";
526                         "je 1f";
527                         "cmp eax,4";
528                         "jne 2f";
529                         "call .cff4";
530                         "pop ebx";
531                         "jmp 1f";
532                         "2: pop eax";
533                         "xor ebx,ebx";
534                         "push ebx";
535                         "push eax";
536                         "call .cff8";
537                         "1:".
538
539 /******************************************************************************/
540 /*                                                                            */
541 /*              Group 9 : Logical                                             */
542 /*                                                                            */
543 /******************************************************************************/
544
545 C_and
546   $1 == 4       ==>     "pop eax";
547                         "pop ebx";
548                         "and eax, ebx";
549                         "push eax".
550
551   default       ==>     "mov ecx, $1";
552                         "call .and".
553
554 C_and_narg      ==>     "pop ecx";
555                         "call .and".
556
557 C_ior
558   $1 == 4       ==>     "pop eax";
559                         "pop ebx";
560                         "or eax, ebx";
561                         "push eax".
562
563   default       ==>     "mov ecx, $1";
564                         "call .ior".
565
566 C_ior_narg      ==>     "pop ecx";
567                         "call .ior".
568
569 C_xor
570   $1 == 4       ==>     "pop eax";
571                         "pop ebx";
572                         "xor eax, ebx";
573                         "push eax".
574
575   default       ==>     "mov ecx, $1";
576                         "call .xor".
577
578 C_xor_narg      ==>     "pop ecx";
579                         "call .xor".
580
581 C_com
582   $1 == 4       ==>     "pop eax";
583                         "not eax";
584                         "push eax".
585
586   default       ==>     "mov ecx, $1";
587                         "call .com".
588
589 C_com_narg      ==>     "pop ecx";
590                         "call .com".
591
592 C_rol
593   $1 == 4       ==>     "pop ecx";
594                         "pop eax";
595                         "rol eax, cl";
596                         "push eax".
597                     
598   default       ==>     "mov ecx, $1";
599                         "call .rol".
600
601 C_rol_narg      ==>     "pop ecx";
602                         "call .rol".
603
604 C_ror
605   $1 == 4       ==>     "pop ecx";
606                         "pop eax";
607                         "ror eax, cl";
608                         "push eax".
609                     
610   default       ==>     "mov ecx, $1";
611                         "call .ror".
612
613 C_ror_narg      ==>     "pop ecx";
614                         "call .ror".
615
616 /******************************************************************************/
617 /*                                                                            */
618 /*              Group 10 : Sets                                               */
619 /*                                                                            */
620 /******************************************************************************/
621
622 C_inn
623   $1 == 4       ==>     "pop ecx";
624                         "pop eax";
625                         "shr eax, cl";
626                         "and eax, 1";
627                         "push eax".
628
629   default       ==>     "pop eax";
630                         "mov ecx, $1";
631                         "call .inn";
632                         "push eax".
633   
634 C_inn_narg      ==>     "pop ecx";
635                         "pop eax";
636                         "call .inn";
637                         "push eax".
638
639 C_set
640   $1 == 4       ==>     "pop ecx";
641                         "mov eax, 1";
642                         "shl eax, cl";
643                         "push eax".
644
645   default       ==>     "pop eax";
646                         "mov ecx, $1";
647                         "call .set".
648   
649 C_set_narg      ==>     "pop ecx";
650                         "pop eax";
651                         "call .set".
652
653 /******************************************************************************/
654 /*                                                                            */
655 /*              Group 11 : Array                                              */
656 /*                                                                            */
657 /******************************************************************************/
658
659 C_lar
660   $1 == 4       ==>     "pop ebx";
661                         "pop eax";
662                         "call .lar4".
663
664   default       ==>     arg_error( "C_lar", $1).
665
666 C_lar_narg      ==>     "call .ilar".
667
668 C_sar
669   $1 == 4       ==>     "pop ebx";
670                         "pop eax";
671                         "call .sar4".
672
673   default       ==>     arg_error( "C_sar", $1).
674
675 C_sar_narg      ==>     "call .isar".
676
677 C_aar
678   $1 == 4       ==>     "pop ebx";
679                         "pop eax";
680                         "pop ecx";
681                         "sub eax, (ebx)";
682                         "mul 8(ebx)";
683                         "add eax, ecx";
684                         "push eax".
685
686   default       ==>     arg_error( "C_aar", $1).
687
688 C_aar_narg      ==>     "call .iaar";
689                         "push ebx".
690
691 /******************************************************************************/
692 /*                                                                            */
693 /*              Group 12 : Compare                                            */
694 /*                                                                            */
695 /******************************************************************************/
696
697 C_cmi
698   $1 == 4       ==>     "pop ebx";
699                         "pop ecx";
700                         "xor eax, eax";
701                         "cmp ecx, ebx";
702                         "je 2f";
703                         "jl 1f";
704                         "inc eax";
705                         "jmp 2f";
706                         "1: dec eax";
707                         "2: push eax".
708           
709   default       ==>     arg_error( "C_cmi", $1).
710
711 C_cmu
712   $1 == 4       ==>     C_cmp().
713           
714   default       ==>     arg_error( "C_cmu", $1).
715
716 C_cms
717   $1 == 4       ==>     C_sbi( (arith) 4).
718           
719   default       ==>     "mov ecx, $1";
720                         "call .cms";
721                         "push ecx".
722
723 C_cms_narg      ==>     "pop ecx";
724                         "call .cms";
725                         "push ecx".
726
727 C_cmp           ==>     "pop ebx";
728                         "pop ecx";
729                         "xor eax, eax";
730                         "cmp ecx, ebx";
731                         "je 2f";
732                         "jb 1f";
733                         "inc eax";
734                         "jmp 2f";
735                         "1: dec eax";
736                         "2: push eax".
737
738 C_cmf
739   $1 == 4       ==>     "call .cmf4";
740                         "pop ebx";
741                         "pop ebx";
742                         "push eax".
743   $1 == 8       ==>     "call .cmf8";
744                         "add esp,16";
745                         "push eax".
746   default       ==>     arg_error("C_cmf", $1).
747
748 C_tlt           ==>     "pop eax";
749                         "xor ebx, ebx";
750                         "test eax, eax";
751                         "jge 1f";
752                         "inc ebx";
753                         "1: push ebx".
754
755 C_tle           ==>     "pop eax";
756                         "xor ebx, ebx";
757                         "test eax, eax";
758                         "jg 1f";
759                         "inc ebx";
760                         "1: push ebx".
761
762 C_teq           ==>     "pop eax";
763                         "xor ebx, ebx";
764                         "test eax, eax";
765                         "jne 1f";
766                         "inc ebx";
767                         "1: push ebx".
768
769 C_tne           ==>     "pop eax";
770                         "xor ebx, ebx";
771                         "test eax, eax";
772                         "je 1f";
773                         "inc ebx";
774                         "1: push ebx".
775
776 C_tge           ==>     "pop eax";
777                         "xor ebx, ebx";
778                         "test eax, eax";
779                         "jl 1f";
780                         "inc ebx";
781                         "1: push ebx".
782
783 C_tgt           ==>     "pop eax";
784                         "xor ebx, ebx";
785                         "test eax, eax";
786                         "jle 1f";
787                         "inc ebx";
788                         "1: push ebx".
789
790 /******************************************************************************/
791 /*                                                                            */
792 /*              Group 13 : Branch                                             */
793 /*                                                                            */
794 /******************************************************************************/
795
796 C_bra           ==>     "jmp $1".
797
798 C_blt           ==>     "pop eax";
799                         "pop ebx";
800                         "cmp ebx, eax";
801                         "jl $1".
802
803 C_ble           ==>     "pop eax";
804                         "pop ebx";
805                         "cmp ebx, eax";
806                         "jle $1".
807
808 C_beq           ==>     "pop eax";
809                         "pop ebx";
810                         "cmp ebx, eax";
811                         "je $1".
812
813 C_bne           ==>     "pop eax";
814                         "pop ebx";
815                         "cmp ebx, eax";
816                         "jne $1".
817
818 C_bge           ==>     "pop eax";
819                         "pop ebx";
820                         "cmp ebx, eax";
821                         "jge $1".
822
823 C_bgt           ==>     "pop eax";
824                         "pop ebx";
825                         "cmp ebx, eax";
826                         "jg $1".
827
828 C_zlt           ==>     "pop eax";
829                         "test eax, eax";
830                         "jl $1".
831
832 C_zle           ==>     "pop eax";
833                         "test eax, eax";
834                         "jle $1".
835
836 C_zeq           ==>     "pop eax";
837                         "test eax, eax";
838                         "je $1".
839
840 C_zne           ==>     "pop eax";
841                         "test eax, eax";
842                         "jne $1".
843
844 C_zge           ==>     "pop eax";
845                         "test eax, eax";
846                         "jge $1".
847
848 C_zgt           ==>     "pop eax";
849                         "test eax, eax";
850                         "jg $1".
851
852 /******************************************************************************/
853 /*                                                                            */
854 /*              Group 14 : Procedure call instructions                        */
855 /*                                                                            */
856 /******************************************************************************/
857
858 C_cai           ==>     "pop ebx";
859                         "call ebx".
860
861 C_cal           ==>     "call $1".
862
863 C_lfr
864   $1 == 4       ==>     "push eax".
865
866   $1 == 8       ==>     "push edx";
867                         "push eax".
868
869   default       ==>     arg_error( "C_lfr", $1).
870
871 C_ret
872   $1 == 0       ==>     "leave";
873                         "ret".
874
875   $1 == 4       ==>     "pop eax";
876                         "leave";
877                         "ret".
878
879   $1 == 8       ==>     "pop eax";
880                         "pop edx";
881                         "leave";
882                         "ret".
883
884   default       ==>     arg_error( "C_ret", $1).
885
886 /******************************************************************************/
887 /*                                                                            */
888 /*              Group 15 : Miscellaneous instructions                         */
889 /*                                                                            */
890 /******************************************************************************/
891
892 C_asp
893   $1 == 4       ==>     "pop ebx".
894
895   $1 == 8       ==>     "pop ebx";
896                         "pop ebx".
897
898   $1 == -4      ==>     "push eax".
899
900   $1 == -8      ==>     "push eax";
901                         "push eax".
902
903   default       ==>     "add esp, $1".
904
905 C_ass
906   $1 == 4       ==>     "pop eax";
907                         "add esp, eax".
908
909   default       ==>     arg_error( "C_ass", $1).
910
911 C_ass_narg      ==>     "pop eax";
912                         "cmp eax, 4";
913                         "jne .unknown";
914                         "pop eax";
915                         "add esp, eax".
916
917 C_blm
918   $1 % 4 == 0   ==>     "mov ecx, $1/4";
919                         "call .blm".
920
921   default       ==>     arg_error( "C_blm", $1).
922
923 C_bls
924   $1 == 4       ==>     "pop ecx";
925                         "sar ecx,2";
926                         "call .blm".
927
928   default       ==>     arg_error( "C_bls", $1).
929
930 C_bls_narg      ==>     "pop eax";
931                         "cmp eax, 4";
932                         "jne .unknown";
933                         "pop ecx";
934                         "sar ecx, 2";
935                         "call .blm".
936
937 C_csa
938   $1 == 4       ==>     "pop ebx";
939                         "pop eax";
940                         "jmp .csa4".
941
942   default       ==>     arg_error( "C_csa", $1).
943
944 C_csa_narg      ==>     "pop eax";
945                         "cmp eax, 4";
946                         "jne .unknown";
947                         "pop ebx";
948                         "pop eax";
949                         "jmp .csa4".
950
951 C_csb
952   $1 == 4       ==>     "pop ebx";
953                         "pop eax";
954                         "jmp .csb4".
955
956   default       ==>     arg_error( "C_csb", $1).
957
958 C_csb_narg      ==>     "pop eax";
959                         "cmp eax, 4";
960                         "jne .unknown";
961                         "pop ebx";
962                         "pop eax";
963                         "jmp .csb4".
964
965 C_dch           ==>     "mov ebp, (ebp)".
966
967 C_dup
968   $1 == 4       ==>     "pop eax";
969                         "push eax";
970                         "push eax".
971
972   $1 == 8       ==>     "pop eax";
973                         "pop ebx";
974                         "push ebx";
975                         "push eax";
976                         "push ebx";
977                         "push eax".
978
979   default       ==>     "mov ecx, $1";
980                         "call .dup".
981
982 C_dus
983   $1 == 4       ==>     "pop ecx";
984                         "call .dup".
985
986   default       ==>     arg_error( "C_dus", $1).
987
988 C_dus_narg      ==>     "pop eax";
989                         "cmp eax, 4";
990                         "jne .unknown";
991                         "pop ecx";
992                         "call .dup".
993
994 C_exg           ==>     "mov ecx, $1";
995                         "call .exg".
996
997 C_exg_narg      ==>     "pop ecx";
998                         "call .exg".
999
1000 C_fil..         ==>     "mov (hol0+4), $1+$2".
1001
1002 C_gto..         ==>     "mov ebx, $1+$2";
1003                         "call .gto".
1004
1005 C_lim           ==>     "push (.ignmask)".
1006
1007 C_lin           ==>     "mov (hol0), $1".
1008
1009 C_lni           ==>     "inc (hol0)".
1010
1011 C_lor
1012   $1 == 0       ==>     "push ebp".
1013
1014   $1 == 1       ==>     "mov eax, esp";
1015                         "push eax".
1016
1017   $1 == 2       ==>     "push (.reghp)".
1018
1019   default       ==>     arg_error( "C_lor", $1).
1020
1021 C_lpb           ==>     "pop eax";
1022                         "add eax, 8";
1023                         "push eax".
1024
1025 C_mon           ==>     "pop eax";
1026                         "call .mon".
1027
1028 C_nop           ==>     .
1029
1030 C_rck
1031   $1 == 4       ==>     "pop ebx";
1032                         "pop eax";
1033                         "call .rck";
1034                         "push eax".
1035
1036   default       ==>     arg_error( "C_rck", $1).
1037
1038 C_rck_narg      ==>     "pop eax";
1039                         "cmp eax, 4";
1040                         "jne .unknown";
1041                         "pop ebx";
1042                         "pop eax";
1043                         "call .rck";
1044                         "push eax".
1045
1046
1047 C_rtt           ==>     C_ret( (arith) 0).
1048
1049 C_sig           ==>     "pop eax";
1050                         "xchg (.trppc), eax";
1051                         "push eax".
1052
1053 C_sim           ==>     "pop (.ignmask)".
1054
1055 C_str
1056   $1 == 0       ==>     "pop ebp".
1057
1058   $1 == 1       ==>     "pop esp".
1059
1060   $1 == 2       ==>     "pop (.reghp)".
1061
1062   default       ==>     arg_error( "C_str", $1).
1063
1064 C_trp           ==>     "pop eax";
1065                         "call .trp".
1066
1067 /******************************************************************************/
1068 /*                                                                            */
1069 /*              Storage-routines                                              */
1070 /*                                                                            */
1071 /******************************************************************************/
1072
1073
1074 ..icon
1075   $2 == 1       ==>     gen1( (ONE_BYTE) atoi( $1)).
1076   $2 == 2       ==>     gen2( (TWO_BYTES) atoi( $1)).
1077   $2 == 4       ==>     gen4( (FOUR_BYTES) atol( $1)).
1078   default       ==>     arg_error( "..icon", $1).
1079
1080 ..ucon
1081   $2 == 1       ==>     gen1( (ONE_BYTE) atoi( $1)).
1082   $2 == 2       ==>     gen2( (TWO_BYTES) atoi( $1)).
1083   $2 == 4       ==>     gen4( (FOUR_BYTES) atol( $1)).
1084   default       ==>     arg_error( "..ucon", $1).
1085
1086 ..fcon          ==>     con_float($1, $2).
1087
1088 /******************************************************************************/
1089 /*                                                                            */
1090 /*              Extra-routines                                                */
1091 /*                                                                            */
1092 /******************************************************************************/
1093
1094 #ifdef PUSH_POP_OPT
1095
1096 C_df_ilb        ==>     clean_push_buf();
1097                         symbol_definition( $1);
1098                         set_local_visible( $1).
1099 #endif
1100
1101 C_jump                  ==>     "jmp $1".
1102
1103 C_prolog                ==>     .
1104
1105 C_locals
1106                         ==>     "push ebp";
1107                                 "mov ebp,esp";
1108                                 "sub esp, $1".
1109
1110 C_db_sline              ==>     "call ___u_LiB".