Pristine Ack-5.5
[Ack-5.5.git] / mach / m68020 / ce / EM_table
1 #define small(x) ((x)>=1 && (x)<=8)
2
3 /******************************************************************************/
4 /*                                                                            */
5 /*                      Group 1 : Load instructions                           */
6 /*                                                                            */
7 /******************************************************************************/
8
9 /*      a6 : local base.
10  *      sp : stack pointer
11  */
12
13 C_loc           ==>     "pea ($1)".
14
15 C_lol           ==>     "move.l ($1, a6), -(sp)". 
16
17 C_loe..         ==>     "move.l ($1+$2), -(sp)".
18
19 C_lil           ==>     "move.l ([$1,a6]), -(sp)".
20
21 C_lof           ==>     "move.l (sp)+, a0";
22                         "move.l ($1,a0),-(sp)".
23
24 C_lal           ==>     "pea ($1,a6)".
25         
26 C_lae..         ==>     "pea ($1+$2)".
27
28 C_lxl           
29         $1 == 0         ==>     "move.l a6, -(sp)".
30         $1 == 1         ==>     "move.l (8, a6), -(sp)".
31         default         ==>     "move.l (8, a6), a0";
32                                 "move.l #$1-2, d0";
33                                 "1: move.l (8,a0), a0";
34                                 "dbf d0, 1b";
35                                 "move.l a0, -(sp)".
36
37 C_lxa
38         $1 == 0         ==>     "pea (8,a6)".
39         $1 == 1         ==>     "pea ([8,a6],8)".
40         default         ==>     "move.l (8, a6), a0";
41                                 "move.l #$1-2, d0";
42                                 "1: move.l (8,a0), a0";
43                                 "dbf d0, 1b";
44                                 "pea (8,a0)".
45
46 C_loi           
47         $1 == 1         ==>     "move.l (sp)+, a0";
48                                 "clr.l -(sp)";
49                                 "move.b (a0), (3,sp)".
50         $1 == 2         ==>     "move.l (sp)+, a0";
51                                 "clr.l -(sp)";
52                                 "move.w (a0), (2,sp)".
53         $1 == 4         ==>     "move.l (sp)+, a0";
54                                 "move.l (a0),-(sp)".
55         $1 == 8         ==>     "move.l (sp)+, a0";
56                                 "move.l (4,a0),-(sp)";
57                                 "move.l (a0), -(sp)".
58         $1 % 4 == 0     ==>     "move.l (sp)+, a0";
59                                 "move.l #$1/4, d0";
60                                 "add.l #$1, a0";        
61                                 "1:";
62                                 "move.l -(a0), -(sp)";
63                                 "sub.l #1, d0";
64                                 "bne 1b".
65         default         ==>     arg_error( "loi", $1).
66
67
68 C_los           
69         $1 == 4         ==>     "jsr (.los)".
70         default         ==>     arg_error( "los", $1).
71
72 C_ldl           ==>     "move.l ($1+4, a6), -(sp)";
73                         "move.l ($1, a6), -(sp)".
74
75 C_lde..         ==>     "move.l ($1+$2+4), -(sp)";
76                         "move.l ($1+$2), -(sp)".
77
78 C_ldf           ==>     "move.l (sp)+, a0";
79                         "move.l ($1+4,a0),-(sp)";
80                         "move.l ($1,a0), -(sp)".
81
82 C_lpi           ==>     "pea ($1)".
83
84
85 /******************************************************************************/
86 /*                                                                            */
87 /*                      Group 2 : Store instructions                          */
88 /*                                                                            */
89 /******************************************************************************/
90
91 C_stl           ==>     "move.l (sp)+, ($1,a6)".
92
93 C_ste..         ==>     "move.l (sp)+, ($1+$2)".
94
95 C_sil           ==>     "move.l (sp)+, ([$1,a6])".
96
97 C_stf           ==>     "move.l (sp)+, a0";
98                         "move.l (sp)+, ($1,a0)".
99
100 C_sti           
101         $1 == 1         ==>     "move.l (sp)+, a0";     
102                                 "move.l (sp)+, d0";
103                                 "move.b d0, (a0)".
104         $1 == 2         ==>     "move.l (sp)+, a0";
105                                 "move.l (sp)+, d0";
106                                 "move.w d0, (a0)".
107         $1 == 4         ==>     "move.l (sp)+, a0";
108                                 "move.l (sp)+, (a0)".
109         $1 == 8         ==>     "move.l (sp)+, a0";
110                                 "move.l (sp)+, (a0)+";
111                                 "move.l (sp)+, (a0)".
112         $1 % 4 == 0     ==>     "move.l (sp)+, a0";
113                                 "move.l #$1/4, d0";
114                                 "1:move.l (sp)+, (a0)+";
115                                 "sub.l #1, d0";
116                                 "bne 1b".
117         default         ==>     arg_error( "sti", (arith) $1).
118
119
120 C_sts           ==>     "jsr (.sts)".
121
122 C_sdl           ==>     "move.l (sp)+, ($1,a6)";
123                         "move.l (sp)+, ($1+4,a6)".
124
125 C_sde..         ==>     "move.l (sp)+, ($1+$2)";
126                         "move.l (sp)+, ($1+$2+4)".
127
128 C_sdf           ==>     "move.l (sp)+, a0";
129                         "move.l (sp)+, ($1,a0)";
130                         "move.l (sp)+, ($1+4,a0)".
131
132 /******************************************************************************/
133 /*                                                                            */
134 /*              Group 3 : Integer arithmetic                                  */
135 /*                                                                            */
136 /******************************************************************************/
137
138 C_adi           
139         $1 == 4         ==>     "move.l (sp)+, d0";
140                                 "add.l d0, (sp)".
141         default         ==>     arg_error( "adi", $1).
142
143 C_sbi           
144         $1 == 4         ==>     "move.l (sp)+, d0";
145                                 "sub.l d0, (sp)".
146         default         ==>     arg_error( "sbi", $1).
147
148 C_mli
149         $1 == 4         ==>     "move.l (sp)+, d0";
150                                 "muls.l (sp)+, d0";
151                                 "move.l d0,-(sp)".
152         default         ==>     arg_error( "mli", $1).
153
154 C_dvi           
155         $1 == 4         ==>     "move.l (sp)+, d0";
156                                 "move.l (sp)+, d1";
157                                 "divs.l d0, d1";
158                                 "move.l d1,-(sp)".
159         default         ==>     arg_error( "dvi", $1).
160
161 C_rmi   
162         $1 == 4         ==>     "move.l (sp)+, d0";
163                                 "move.l (sp), d1";
164                                 "move.l d0,(sp)";
165                                 "divsl.l (sp)+, d0:d1";
166                                 "move.l d0,-(sp)".
167         default         ==>     arg_error( "rmi", $1).
168
169 C_ngi           
170         $1 == 4         ==>     "neg.l (sp)".
171         default         ==>     arg_error( "ngi", $1).
172
173
174 C_sli           
175         $1 == 4         ==>     "move.l (sp)+, d0";
176                                 "move.l (sp)+, d1";
177                                 "asl.l d0, d1";
178                                 "move.l d1,-(sp)".
179         default         ==>     arg_error( "sli", $1).
180
181 C_sri           
182         $1 == 4         ==>     "move.l (sp)+, d0";
183                                 "move.l (sp)+, d1";
184                                 "asr.l d0, d1";
185                                 "move.l d1,-(sp)".
186         default         ==>     arg_error( "sri", $1).
187
188
189 /******************************************************************************/
190 /*                                                                            */
191 /*              Group 4 : Unsigned arithmetic                                 */
192 /*                                                                            */
193 /******************************************************************************/
194
195
196 C_adu           ==>     C_adi( w).
197
198 C_sbu           ==>     C_sbi( w).
199
200 C_mlu
201         $1 == 4         ==>     "move.l (sp)+, d0";
202                                 "mulu.l (sp)+, d0";
203                                 "move.l d0, -(sp)".
204         default         ==>     arg_error( "mlu", $1).
205
206 C_dvu           
207         $1 == 4         ==>     "move.l (sp)+, d0";
208                                 "move.l (sp)+, d1";
209                                 "divu.l d0, d1";
210                                 "move.l d1, -(sp)".
211         default         ==>     arg_error( "dvu", $1).
212
213 C_rmu           
214         $1 == 4         ==>     "move.l (sp)+, d0";
215                                 "move.l (sp), d1";
216                                 "move.l d0, (sp)";
217                                 "divul.l (sp)+, d0:d1";
218                                 "move.l d0, -(sp)".
219         default         ==>     arg_error( "rmu", $1).
220
221 C_slu           ==>     C_sli( w).
222
223 C_sru
224         $1 == 4         ==>     "move.l (sp)+, d0";
225                                 "move.l (sp)+, d1";
226                                 "lsr.l d0, d1";
227                                 "move.l d1, -(sp)".
228         default         ==>     arg_error( "sru", $1).
229
230
231 /******************************************************************************/
232 /*                                                                            */
233 /*              Group 5 : Floating point arithmetic                           */
234 /*                                                                            */
235 /******************************************************************************/
236
237 C_adf   
238         $1 == 4         ==>     "jsr (.adf4)";
239                                 "tst.l (sp)+".
240         $1 == 8         ==>     "jsr (.adf8)";
241                                 "lea (8, sp), sp".
242         default         ==>     arg_error( "adf", $1).
243
244 C_sbf   
245         $1 == 4         ==>     "jsr (.sbf4)";
246                                 "tst.l (sp)+".
247         $1 == 8         ==>     "jsr (.sbf8)";
248                                 "lea (8, sp), sp".
249         default         ==>     arg_error( "sbf", $1).
250
251 C_mlf   
252         $1 == 4         ==>     "jsr (.mlf4)";
253                                 "tst.l (sp)+".
254         $1 == 8         ==>     "jsr (.mlf8)";
255                                 "lea (8, sp), sp".
256         default         ==>     arg_error( "mlf", $1).
257
258 C_dvf   
259         $1 == 4         ==>     "jsr (.dvf4)";
260                                 "tst.l (sp)+".
261         $1 == 8         ==>     "jsr (.dvf8)";
262                                 "lea (8, sp), sp".
263         default         ==>     arg_error( "dvf", $1).
264
265 C_ngf   
266         $1 == 4         ==>     "jsr (.ngf4)".
267         $1 == 8         ==>     "jsr (.ngf8)".
268         default         ==>     arg_error( "ngf", $1).
269
270 C_fif   
271         $1 == 4         ==>     C_lor((arith)1);
272                                 "jsr (.fif4)";
273                                 "tst.l (sp)+".
274         $1 == 8         ==>     C_lor((arith)1);
275                                 "jsr (.fif8)";
276                                 "tst.l (sp)+".
277         default         ==>     arg_error( "fif", $1).
278
279 C_fef   
280         $1 == 4         ==>     C_lor( (arith) 1);
281                                 "sub.l #4, (sp)";
282                                 "jsr (.fef4)".
283         $1 == 8         ==>     C_lor((arith)1);
284                                 "sub.l #4, (sp)";
285                                 "jsr (.fef8)".
286         default         ==>     arg_error( "fef", $1).
287
288 /******************************************************************************/
289 /*                                                                            */
290 /*              Group 6 : Pointer arithmetic                                  */
291 /*                                                                            */
292 /******************************************************************************/
293
294 C_adp           
295         $1 == 0         ==>     .
296         default         ==>     "add.l #$1, (sp)".
297
298 C_ads
299         $1 == 4         ==>     "move.l (sp)+, d0";
300                                 "add.l d0, (sp)".
301         default         ==>     arg_error( "ads", $1).
302
303 C_sbs           
304         $1 == 4         ==>     "move.l (sp)+, d0";
305                                 "sub.l d0, (sp)".
306         default         ==>     arg_error( "sbs", $1).
307
308 /******************************************************************************/
309 /*                                                                            */
310 /*              Group 7 : Increment/decrement/zero                            */
311 /*                                                                            */
312 /******************************************************************************/
313
314 C_inc           ==>     "add.l #1, (sp)".
315
316 C_inl           ==>     "add.l #1, ($1, a6)".
317
318 C_ine..         ==>     "add.l #1, ($1+$2)".
319
320 C_dec           ==>     "sub.l #1, (sp)".
321
322 C_del           ==>     "sub.l #1, ($1, a6)".
323
324 C_dee..         ==>     "sub.l #1, ($1+$2)".
325
326 C_zrl           ==>     "clr.l ($1, a6)".
327
328 C_zre..         ==>     "clr.l ($1+$2)".
329
330 C_zrf           ==>     C_zer( $1).
331
332 C_zer
333         $1 == 4         ==>     "clr.l -(sp)".
334         $1 == 8         ==>     "clr.l -(sp)";
335                                 "clr.l -(sp)".
336         default         ==>     "move.l #$1/4, d0";
337                                 "1:";
338                                 "clr.l -(sp)";
339                                 "sub.l #1, d0";
340                                 "bne 1b".
341
342 /******************************************************************************/
343 /*                                                                            */
344 /*              Group 8 : Convert                                             */
345 /*                                                                            */
346 /******************************************************************************/
347
348 /* cii, ciu, cuu, cui are assumed to be called with legal arguments only */
349
350 C_cii           ==>     "   move.l (sp)+, d0";
351                         "   move.l (sp)+, d1";
352                         "   cmp.l d1, d0";
353                         "   ble 4f";
354                         "   move.l (sp), d0";
355                         "   cmp.l #1, d1";
356                         "   bne 2f";
357                         "   ext.w d0";
358                         "2: ext.l d0";
359                         "   move.l d0,(sp)";
360                         "4:".
361
362 C_cuu           ==>     "lea    (8,sp),sp".
363
364 C_ciu           ==>     "lea    (8,sp),sp".
365
366 C_cui           ==>     "lea    (8,sp),sp".
367
368 C_cfi           ==>     "jsr (.cfi)";
369                         "move.l (4, sp), d0";
370                         "cmp.l #4, d0";
371                         "beq 1f";
372                         "tst.l (sp)+";
373                         "1:";
374                         "lea (8, sp), sp".
375
376 C_cfu           ==>     "jsr (.cfu)";
377                         "move.l (4, sp), d0";
378                         "cmp.l #4, d0";
379                         "beq 1f";
380                         "tst.l (sp)+";
381                         "1:";
382                         "lea (8, sp), sp".
383
384 C_cff           ==>     "move.l (sp)+, d0";
385                         "move.l (sp)+, d1";
386                         "cmp.l d0, d1";
387                         "beq 1f";
388                         "cmp.l #4, d0";
389                         "bne 2f";
390                         "jsr (.cff4)";
391                         "add.l #4, sp";
392                         "bra 1f";
393                         "2:";
394                         "move.l (sp), d0";
395                         "clr.l (sp)";
396                         "move.l d0,-(sp)";
397                         "jsr (.cff8)";
398                         "1:".
399
400 C_cif           ==>     "move.l (sp)+, d0";
401                         "cmp.l #4, d0";
402                         "bne 1f";
403                         "jsr (.cif4)";
404                         "add.l #4, sp";
405                         "bra 2f";
406                         "1:";
407                         "jsr (.cif8)";
408                         "2:".
409
410 C_cuf           ==>     "move.l (sp)+, d0";
411                         "cmp.l #4, d0";
412                         "bne 1f";
413                         "jsr (.cuf4)";
414                         "add.l #4, sp";
415                         "bra 2f";
416                         "1:";
417                         "jsr (.cuf8)";
418                         "2:".
419
420 /******************************************************************************/
421 /*                                                                            */
422 /*              Group 9 : Logical                                             */
423 /*                                                                            */
424 /******************************************************************************/
425
426 C_and           
427         $1 == 4         ==>     "move.l (sp)+, d0";
428                                 "and.l d0, (sp)".
429         default         ==>     "move.l #$1/4, d0";
430                                 "lea ($1, sp), a0";
431                                 "1:";
432                                 "move.l (sp)+, d1";
433                                 "and.l d1, (a0)+";
434                                 "sub.l #1, d0";
435                                 "bne 1b".
436
437 C_ior           
438         $1 == 4         ==>     "move.l (sp)+, d0";
439                                 "or.l d0, (sp)".
440         default         ==>     "move.l #$1/4, d0";
441                                 "lea ($1, sp), a0";
442                                 "1:";
443                                 "move.l (sp)+, d1";
444                                 "or.l d1, (a0)+";
445                                 "sub.l #1, d0";
446                                 "bne 1b".
447
448 C_xor           
449         $1 == 4         ==>     "move.l (sp)+, d0";
450                                 "eor.l d0, (sp)".
451         default         ==>     "move.l #$1/4, d0";
452                                 "lea ($1, sp), a0";
453                                 "1:";
454                                 "move.l (sp)+, d1";
455                                 "eor.l d1, (a0)+";
456                                 "sub.l #1, d0";
457                                 "bne 1b".
458
459 C_com   
460         $1 == 4         ==>     "not.l (sp)".
461         $1 == 8         ==>     "not.l (sp)";
462                                 "not.l (4, sp)".
463         default         ==>     "move.l #$1/4, d0";
464                                 "move.l sp, a0";
465                                 "1:";
466                                 "not.l (a0)+";
467                                 "sub.l #1, d0";
468                                 "bne 1b".
469
470 C_rol
471         $1 == 4         ==>     "move.l (sp)+, d0";
472                                 "move.l (sp)+, d1";
473                                 "rol.l d0, d1";
474                                 "move.l d1, -(sp)".
475         default         ==>     arg_error( "rol", $1).
476
477 C_ror
478         $1 == 4         ==>     "move.l (sp)+, d0";
479                                 "move.l (sp)+, d1";
480                                 "ror.l d0, d1";
481                                 "move.l d1, -(sp)".
482         default         ==>     arg_error( "ror", $1).
483
484
485 /******************************************************************************/
486 /*                                                                            */
487 /*              Group 10 : Sets                                               */
488 /*                                                                            */
489 /******************************************************************************/
490
491 C_inn
492         $1 == 4         ==>     "move.l (sp)+, d0";
493                                 "move.l (sp)+, d1";
494                                 "btst d0, d1";
495                                 "sne d1";
496                                 "and.l #1, d1";
497                                 "move.l d1, -(sp)".
498         default         ==>     "move.l (sp)+, d0";
499                                 "move.l #$1, d1";
500                                 "jsr (.inn)";
501                                 "move.l d0, -(sp)".
502
503 C_inn_narg      ==>     "move.l (sp)+, d1";
504                         "move.l (sp)+, d0";
505                         "jsr (.inn)";
506                         "move.l d0, -(sp)".
507   
508 C_set
509         $1 == 4         ==>     "move.l (sp)+, d0";
510                                 "clr.l d1";
511                                 "bset d0, d1";
512                                 "move.l d1, -(sp)".
513         default         ==>     "move.l (sp)+, d0";
514                                 "move.l #$1, d1";
515                                 "jsr (.set)".
516
517 C_set_narg      ==>     "move.l (sp)+, d1";
518                         "move.l (sp)+, d0";
519                         "jsr (.set)".
520
521 /******************************************************************************/
522 /*                                                                            */
523 /*              Group 11 : Array                                              */
524 /*                                                                            */
525 /******************************************************************************/
526
527 C_lar           ==>     "move.l #$1, d0";
528                         "jsr (.lar)".
529
530 C_lar_narg      ==>     "move.l (sp)+, d0";
531                         "jsr (.lar)".
532
533 C_sar           ==>     "move.l #$1, d0";
534                         "jsr (.sar)".
535
536 C_sar_narg      ==>     "move.l (sp)+, d0";
537                         "jsr (.sar)".
538
539 C_aar           ==>     "move.l #$1, d0";
540                         "jsr (.aar)";
541                         "move.l a0, -(sp)".
542
543 C_aar_narg      ==>     "move.l (sp)+, d0";
544                         "jsr (.aar)";
545                         "move.l a0, -(sp)".
546
547 /******************************************************************************/
548 /*                                                                            */
549 /*              Group 12 : Compare                                            */
550 /*                                                                            */
551 /******************************************************************************/
552
553 C_cmi           
554         $1 == 4         ==>     "clr.l d0";
555                                 "cmp.l (sp)+, (sp)+";
556                                 "beq 2f";
557                                 "blt 1f";
558                                 "add.l #1, d0";
559                                 "bra 2f";
560                                 "1 : sub.l #1, d0";
561                                 "2 : move.l d0, -(sp)".
562         default         ==>     "move.l #$1, d0";
563                                 "jsr (.cmi)";
564                                 "move.l d0, -(sp)".
565
566
567 C_cmu           
568         $1 == 4         ==>     "clr.l d0";
569                                 "cmp.l (sp)+, (sp)+";
570                                 "beq 2f";
571                                 "bcs 1f";
572                                 "add.l #1, d0";
573                                 "bra 2f";
574                                 "1 : sub.l #1, d0";
575                                 "2 : move.l d0, -(sp)".
576
577         default         ==>     "move.l #$1, d0";
578                                 "jsr (.cmu)";
579                                 "move.l d0, -(sp)".
580
581 C_cmu_narg      ==>     "move.l (sp)+, d0";
582                         "jsr (.cmu)";
583                         "move.l d0, -(sp)".
584
585 C_cms           ==>     "move.l #$1, d0";
586                         "jsr (.cms)";
587                         "move.l d0, -(sp)".
588
589 C_cms_narg      ==>     "move.l (sp)+, d0";
590                         "jsr (.cms)";
591                         "move.l d0, -(sp)".
592
593 C_cmp           ==>     C_cmu( (arith)4).
594
595 C_tlt           ==>     "move.l (sp), d0";
596                         "move.l #1, (sp)";
597                         "tst.l d0";
598                         "blt 1f";
599                         "clr.l (sp)";
600                         "1:".
601
602 C_tle           ==>     "move.l (sp), d0";
603                         "move.l #1, (sp)";
604                         "tst.l d0";
605                         "ble 1f";
606                         "clr.l (sp)";
607                         "1:".
608
609 C_teq           ==>     "move.l (sp), d0";
610                         "move.l #1, (sp)";
611                         "tst.l d0";
612                         "beq 1f";
613                         "clr.l (sp)";
614                         "1:".
615
616 C_tne           ==>     "move.l (sp), d0";
617                         "move.l #1, (sp)";
618                         "tst.l d0";
619                         "bne 1f";
620                         "clr.l (sp)";
621                         "1:".
622
623 C_tge           ==>     "move.l (sp), d0";
624                         "move.l #1, (sp)";
625                         "tst.l d0";
626                         "bge 1f";
627                         "clr.l (sp)";
628                         "1:".
629
630 C_tgt           ==>     "move.l (sp), d0";
631                         "move.l #1, (sp)";
632                         "tst.l d0";
633                         "bgt 1f";
634                         "clr.l (sp)";
635                         "1:".
636
637 C_cmf
638         $1 == 4 ==>     "jsr (.cmf4)";
639                         "tst.l (sp)+";
640                         "move.l d0,(sp)".
641         $1 == 8 ==>     "jsr (.cmf8)";
642                         "lea (12,sp), sp";
643                         "move.l d0,(sp)".
644         default ==>     arg_error("cmf", $1).
645
646 /******************************************************************************/
647 /*                                                                            */
648 /*              Group 13 : Branch                                             */
649 /*                                                                            */
650 /******************************************************************************/
651
652 C_bra           ==>     "bra $1".
653
654 C_blt           ==>     "move.l (sp)+, d0";
655                         "cmp.l (sp)+, d0";
656                         "bgt $1".
657
658 C_ble           ==>     "move.l (sp)+, d0";
659                         "cmp.l (sp)+, d0";
660                         "bge $1".
661
662 C_beq           ==>     "move.l (sp)+, d0";
663                         "cmp.l (sp)+, d0";
664                         "beq $1".       
665
666 C_bne           ==>     "move.l (sp)+, d0";
667                         "cmp.l (sp)+, d0";
668                         "bne $1".
669
670 C_bge           ==>     "move.l (sp)+, d0";
671                         "cmp.l (sp)+, d0";
672                         "ble $1".
673
674 C_bgt           ==>     "move.l (sp)+, d0";
675                         "cmp.l (sp)+, d0";
676                         "blt $1".
677
678 C_zlt           ==>     "tst.l (sp)+";
679                         "blt $1".
680
681 C_zle           ==>     "tst.l (sp)+";
682                         "ble $1".
683
684 C_zeq           ==>     "tst.l (sp)+";
685                         "beq $1".
686
687 C_zne           ==>     "tst.l (sp)+";
688                         "bne $1".
689
690 C_zge           ==>     "tst.l (sp)+";
691                         "bge $1".
692
693 C_zgt           ==>     "tst.l (sp)+";
694                         "bgt $1".
695
696
697 /******************************************************************************/
698 /*                                                                            */
699 /*                      Group 14 : Procedure call instructions                */
700 /*                                                                            */
701 /******************************************************************************/
702
703 C_cai           ==>     "move.l (sp)+, a0";
704                         "jsr (a0)".
705
706 C_cal           ==>     "jsr ($1)".
707
708 C_lfr           
709         $1 == 4         ==>     "move.l d0, -(sp)".
710         $1 == 8         ==>     "move.l d1, -(sp)";
711                                 "move.l d0, -(sp)".
712         default         ==>     arg_error( "lfr", $1).
713
714 C_ret           
715         $1 == 0         ==>     "unlk a6";
716                                 "rts".
717         $1 == 4         ==>     "move.l (sp)+, d0";
718                                 "unlk a6";
719                                 "rts".
720         $1 == 8         ==>     "move.l (sp)+, d0";
721                                 "move.l (sp)+, d1";
722                                 "unlk a6";
723                                 "rts".
724         default         ==>     arg_error( "ret", $1).
725
726 /******************************************************************************/
727 /*                                                                            */
728 /*                      Group 15 : Miscellaneous instructions                 */
729 /*                                                                            */
730 /******************************************************************************/
731
732 C_asp           
733         small( $1)      ==>     "add.l #$1, sp".
734         default         ==>     "lea ($1, sp), sp".
735
736 C_ass           
737         $1 == 4         ==>     "add.l (sp)+, sp".
738         default         ==>     arg_error( "ass", $1).
739
740 C_blm           
741         $1 == 4         ==>     "move.l (sp)+, a0";
742                                 "move.l (sp)+, a1";
743                                 "move.l (a1), (a0)".
744         $1 == 8         ==>     "move.l (sp)+, a0";
745                                 "move.l (sp)+, a1";
746                                 "move.l (a1), (a0)";
747                                 "move.l (4, a1), (4, a0)".
748         default         ==>     "move.l (sp)+, a0";
749                                 "move.l (sp)+, a1";
750                                 "move.l #$1/4, d0";
751                                 "1:";
752                                 "move.l (a1)+, (a0)+";
753                                 "sub.l #1, d0";
754                                 "bne 1b".
755
756 C_bls           
757         $1 == 4         ==>     "move.l (sp)+, d0";
758                                 "move.l (sp)+, a0";
759                                 "move.l (sp)+, a1";
760                                 "asr.l #2, d0";
761                                 "beq 2f";
762                                 "1:";
763                                 "move.l (a1)+, (a0)+";
764                                 "sub.l #1, d0";
765                                 "bne 1b";
766                                 "2:".
767         default         ==>     arg_error( "bls", $1).
768
769
770 C_csa           
771         $1 == 4         ==>     "move.l (sp)+,a0";
772                                 "move.l (sp)+,d0";
773                                 "jmp (.csa)".
774         default         ==>     arg_error( "csa", $1).
775
776 C_csb           
777         $1 == 4         ==>     "move.l (sp)+,a0";
778                                 "move.l (sp)+,d0";
779                                 "jmp (.csb)".
780         default         ==>     arg_error( "csb", $1).
781
782 C_dch           ==>     C_loi( (arith)4).
783
784 C_dup           
785         $1 == 4         ==>     "move.l (sp), -(sp)".
786         $1 == 8         ==>     "move.l (4, sp), -(sp)";
787                                 "move.l (4, sp), -(sp)".
788         default         ==>     "move.l #$1/4, d0";
789                                 "lea ($1, sp), a0";
790                                 "1:";
791                                 "move.l -(a0), -(sp)";
792                                 "sub.l #1, d0";
793                                 "bne 1b".
794
795 C_dus           
796         $1 == 4         ==>     "move.l (sp)+, d0";
797                                 "lea (0, sp, d0.l*1), a0";
798                                 "asr.l #2, d0";
799                                 "beq 2f";
800                                 "1:";
801                                 "move.l -(a0), -(sp)";
802                                 "sub.l #1, d0";
803                                 "bne 1b";
804                                 "2:".
805         default         ==>     arg_error( "dus", $1).
806
807 C_exg           ==>     "move.l #$1, d0";
808                         "jsr (.exg)".
809
810 C_fil..         ==>     "move.l #$1+$2, (.filn)".
811
812 C_gto..         ==>     "move.l #$1+$2, a0";
813                         "move.l (8, a0), a6";
814                         "move.l (4, a0), sp";
815                         "jmp ([0,a0], 0)".
816
817 C_lim           ==>     "move.l (.trpim), -(sp)".
818
819 C_lin           ==>     "move.l #$1, (.lino)".
820
821 C_lni           ==>     "add.l #1, (.lino)".
822
823 C_lor
824         $1 == 0         ==>     "move.l a6, -(sp)".
825         $1 == 1         ==>     "move.l sp, -(sp)".
826         $1 == 2         ==>     "move.l (.reghp), -(sp)".
827         default         ==>     arg_error( "lor", $1).
828
829 C_lpb           ==>     C_adp( (arith)8).
830
831 C_mon           ==>     "jsr (.mon)".
832
833 C_nop           ==>     .
834
835 C_rck           
836         $1 == 4         ==>     "move.l (sp)+, a0";
837                                 "move.l (sp)+, d0";
838                                 "cmp2.l (a0), d0";
839                                 "bcc 1f";
840                                 "pea (1)";      /* push constant 1 == ERANGE */
841                                 "jsr (.trp)";
842                                 "1: move.l d0, -(sp)".
843         default         ==>     arg_error( "rck", $1).
844
845 C_rtt           ==>     C_ret( (arith)0).
846
847 C_sig           ==>     "move.l (.trppc), a0";
848                         "move.l (sp)+, (.trppc)";
849                         "move.l a0, -(sp)".
850
851 C_sim           ==>     "move.l (sp)+, (.trpim)".
852
853 C_str
854         $1 == 0         ==>     "move.l (sp)+, a6".
855         $1 == 1         ==>     "move.l (sp)+, sp".
856         $1 == 2         ==>     "jsr (.strhp)".
857         default         ==>     arg_error( "str", $1).
858
859 C_trp           ==>     "jsr (.trp)".
860
861 /*****************************************************************************/
862
863 ..icon  
864         $2 == 1         ==>     gen1( (ONE_BYTE) atoi( $1)).
865         $2 == 2         ==>     gen2( (TWO_BYTES) atoi( $1)).
866         $2 == 4         ==>     gen4( (FOUR_BYTES) atol( $1)).
867         default         ==>     arg_error( "icon", $2).
868
869 ..ucon  
870         $2 == 1         ==>     gen1( (ONE_BYTE) atoi( $1)).
871         $2 == 2         ==>     gen2( (TWO_BYTES) atoi( $1)).
872         $2 == 4         ==>     gen4( (FOUR_BYTES) atol( $1)).
873         default         ==>     arg_error( "icon", $2).
874
875 ..fcon                  ==>     con_float($1, $2).
876
877 /*****************************************************************************/
878
879 C_prolog                ==>     .
880
881 C_jump                  ==>     "bra $1".
882
883 C_locals                ==>     "link a6, #-$1".
884
885 C_db_sline              ==>     "jsr (___u_LiB)".