123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885 |
- #define small(x) ((x)>=1 && (x)<=8)
- /******************************************************************************/
- /* */
- /* Group 1 : Load instructions */
- /* */
- /******************************************************************************/
- /* a6 : local base.
- * sp : stack pointer
- */
- C_loc ==> "pea ($1)".
- C_lol ==> "move.l ($1, a6), -(sp)".
- C_loe.. ==> "move.l ($1+$2), -(sp)".
- C_lil ==> "move.l ([$1,a6]), -(sp)".
- C_lof ==> "move.l (sp)+, a0";
- "move.l ($1,a0),-(sp)".
- C_lal ==> "pea ($1,a6)".
-
- C_lae.. ==> "pea ($1+$2)".
- C_lxl
- $1 == 0 ==> "move.l a6, -(sp)".
- $1 == 1 ==> "move.l (8, a6), -(sp)".
- default ==> "move.l (8, a6), a0";
- "move.l #$1-2, d0";
- "1: move.l (8,a0), a0";
- "dbf d0, 1b";
- "move.l a0, -(sp)".
- C_lxa
- $1 == 0 ==> "pea (8,a6)".
- $1 == 1 ==> "pea ([8,a6],8)".
- default ==> "move.l (8, a6), a0";
- "move.l #$1-2, d0";
- "1: move.l (8,a0), a0";
- "dbf d0, 1b";
- "pea (8,a0)".
- C_loi
- $1 == 1 ==> "move.l (sp)+, a0";
- "clr.l -(sp)";
- "move.b (a0), (3,sp)".
- $1 == 2 ==> "move.l (sp)+, a0";
- "clr.l -(sp)";
- "move.w (a0), (2,sp)".
- $1 == 4 ==> "move.l (sp)+, a0";
- "move.l (a0),-(sp)".
- $1 == 8 ==> "move.l (sp)+, a0";
- "move.l (4,a0),-(sp)";
- "move.l (a0), -(sp)".
- $1 % 4 == 0 ==> "move.l (sp)+, a0";
- "move.l #$1/4, d0";
- "add.l #$1, a0";
- "1:";
- "move.l -(a0), -(sp)";
- "sub.l #1, d0";
- "bne 1b".
- default ==> arg_error( "loi", $1).
- C_los
- $1 == 4 ==> "jsr (.los)".
- default ==> arg_error( "los", $1).
- C_ldl ==> "move.l ($1+4, a6), -(sp)";
- "move.l ($1, a6), -(sp)".
- C_lde.. ==> "move.l ($1+$2+4), -(sp)";
- "move.l ($1+$2), -(sp)".
- C_ldf ==> "move.l (sp)+, a0";
- "move.l ($1+4,a0),-(sp)";
- "move.l ($1,a0), -(sp)".
- C_lpi ==> "pea ($1)".
- /******************************************************************************/
- /* */
- /* Group 2 : Store instructions */
- /* */
- /******************************************************************************/
- C_stl ==> "move.l (sp)+, ($1,a6)".
- C_ste.. ==> "move.l (sp)+, ($1+$2)".
- C_sil ==> "move.l (sp)+, ([$1,a6])".
- C_stf ==> "move.l (sp)+, a0";
- "move.l (sp)+, ($1,a0)".
- C_sti
- $1 == 1 ==> "move.l (sp)+, a0";
- "move.l (sp)+, d0";
- "move.b d0, (a0)".
- $1 == 2 ==> "move.l (sp)+, a0";
- "move.l (sp)+, d0";
- "move.w d0, (a0)".
- $1 == 4 ==> "move.l (sp)+, a0";
- "move.l (sp)+, (a0)".
- $1 == 8 ==> "move.l (sp)+, a0";
- "move.l (sp)+, (a0)+";
- "move.l (sp)+, (a0)".
- $1 % 4 == 0 ==> "move.l (sp)+, a0";
- "move.l #$1/4, d0";
- "1:move.l (sp)+, (a0)+";
- "sub.l #1, d0";
- "bne 1b".
- default ==> arg_error( "sti", (arith) $1).
- C_sts ==> "jsr (.sts)".
- C_sdl ==> "move.l (sp)+, ($1,a6)";
- "move.l (sp)+, ($1+4,a6)".
- C_sde.. ==> "move.l (sp)+, ($1+$2)";
- "move.l (sp)+, ($1+$2+4)".
- C_sdf ==> "move.l (sp)+, a0";
- "move.l (sp)+, ($1,a0)";
- "move.l (sp)+, ($1+4,a0)".
- /******************************************************************************/
- /* */
- /* Group 3 : Integer arithmetic */
- /* */
- /******************************************************************************/
- C_adi
- $1 == 4 ==> "move.l (sp)+, d0";
- "add.l d0, (sp)".
- default ==> arg_error( "adi", $1).
- C_sbi
- $1 == 4 ==> "move.l (sp)+, d0";
- "sub.l d0, (sp)".
- default ==> arg_error( "sbi", $1).
- C_mli
- $1 == 4 ==> "move.l (sp)+, d0";
- "muls.l (sp)+, d0";
- "move.l d0,-(sp)".
- default ==> arg_error( "mli", $1).
- C_dvi
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "divs.l d0, d1";
- "move.l d1,-(sp)".
- default ==> arg_error( "dvi", $1).
- C_rmi
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp), d1";
- "move.l d0,(sp)";
- "divsl.l (sp)+, d0:d1";
- "move.l d0,-(sp)".
- default ==> arg_error( "rmi", $1).
- C_ngi
- $1 == 4 ==> "neg.l (sp)".
- default ==> arg_error( "ngi", $1).
- C_sli
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "asl.l d0, d1";
- "move.l d1,-(sp)".
- default ==> arg_error( "sli", $1).
- C_sri
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "asr.l d0, d1";
- "move.l d1,-(sp)".
- default ==> arg_error( "sri", $1).
- /******************************************************************************/
- /* */
- /* Group 4 : Unsigned arithmetic */
- /* */
- /******************************************************************************/
- C_adu ==> C_adi( w).
- C_sbu ==> C_sbi( w).
- C_mlu
- $1 == 4 ==> "move.l (sp)+, d0";
- "mulu.l (sp)+, d0";
- "move.l d0, -(sp)".
- default ==> arg_error( "mlu", $1).
- C_dvu
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "divu.l d0, d1";
- "move.l d1, -(sp)".
- default ==> arg_error( "dvu", $1).
- C_rmu
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp), d1";
- "move.l d0, (sp)";
- "divul.l (sp)+, d0:d1";
- "move.l d0, -(sp)".
- default ==> arg_error( "rmu", $1).
- C_slu ==> C_sli( w).
- C_sru
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "lsr.l d0, d1";
- "move.l d1, -(sp)".
- default ==> arg_error( "sru", $1).
- /******************************************************************************/
- /* */
- /* Group 5 : Floating point arithmetic */
- /* */
- /******************************************************************************/
- C_adf
- $1 == 4 ==> "jsr (.adf4)";
- "tst.l (sp)+".
- $1 == 8 ==> "jsr (.adf8)";
- "lea (8, sp), sp".
- default ==> arg_error( "adf", $1).
- C_sbf
- $1 == 4 ==> "jsr (.sbf4)";
- "tst.l (sp)+".
- $1 == 8 ==> "jsr (.sbf8)";
- "lea (8, sp), sp".
- default ==> arg_error( "sbf", $1).
- C_mlf
- $1 == 4 ==> "jsr (.mlf4)";
- "tst.l (sp)+".
- $1 == 8 ==> "jsr (.mlf8)";
- "lea (8, sp), sp".
- default ==> arg_error( "mlf", $1).
- C_dvf
- $1 == 4 ==> "jsr (.dvf4)";
- "tst.l (sp)+".
- $1 == 8 ==> "jsr (.dvf8)";
- "lea (8, sp), sp".
- default ==> arg_error( "dvf", $1).
- C_ngf
- $1 == 4 ==> "jsr (.ngf4)".
- $1 == 8 ==> "jsr (.ngf8)".
- default ==> arg_error( "ngf", $1).
- C_fif
- $1 == 4 ==> C_lor((arith)1);
- "jsr (.fif4)";
- "tst.l (sp)+".
- $1 == 8 ==> C_lor((arith)1);
- "jsr (.fif8)";
- "tst.l (sp)+".
- default ==> arg_error( "fif", $1).
- C_fef
- $1 == 4 ==> C_lor( (arith) 1);
- "sub.l #4, (sp)";
- "jsr (.fef4)".
- $1 == 8 ==> C_lor((arith)1);
- "sub.l #4, (sp)";
- "jsr (.fef8)".
- default ==> arg_error( "fef", $1).
- /******************************************************************************/
- /* */
- /* Group 6 : Pointer arithmetic */
- /* */
- /******************************************************************************/
- C_adp
- $1 == 0 ==> .
- default ==> "add.l #$1, (sp)".
- C_ads
- $1 == 4 ==> "move.l (sp)+, d0";
- "add.l d0, (sp)".
- default ==> arg_error( "ads", $1).
- C_sbs
- $1 == 4 ==> "move.l (sp)+, d0";
- "sub.l d0, (sp)".
- default ==> arg_error( "sbs", $1).
- /******************************************************************************/
- /* */
- /* Group 7 : Increment/decrement/zero */
- /* */
- /******************************************************************************/
- C_inc ==> "add.l #1, (sp)".
- C_inl ==> "add.l #1, ($1, a6)".
- C_ine.. ==> "add.l #1, ($1+$2)".
- C_dec ==> "sub.l #1, (sp)".
- C_del ==> "sub.l #1, ($1, a6)".
- C_dee.. ==> "sub.l #1, ($1+$2)".
- C_zrl ==> "clr.l ($1, a6)".
- C_zre.. ==> "clr.l ($1+$2)".
- C_zrf ==> C_zer( $1).
- C_zer
- $1 == 4 ==> "clr.l -(sp)".
- $1 == 8 ==> "clr.l -(sp)";
- "clr.l -(sp)".
- default ==> "move.l #$1/4, d0";
- "1:";
- "clr.l -(sp)";
- "sub.l #1, d0";
- "bne 1b".
- /******************************************************************************/
- /* */
- /* Group 8 : Convert */
- /* */
- /******************************************************************************/
- /* cii, ciu, cuu, cui are assumed to be called with legal arguments only */
- C_cii ==> " move.l (sp)+, d0";
- " move.l (sp)+, d1";
- " cmp.l d1, d0";
- " ble 4f";
- " move.l (sp), d0";
- " cmp.l #1, d1";
- " bne 2f";
- " ext.w d0";
- "2: ext.l d0";
- " move.l d0,(sp)";
- "4:".
- C_cuu ==> "lea (8,sp),sp".
- C_ciu ==> "lea (8,sp),sp".
- C_cui ==> "lea (8,sp),sp".
- C_cfi ==> "jsr (.cfi)";
- "move.l (4, sp), d0";
- "cmp.l #4, d0";
- "beq 1f";
- "tst.l (sp)+";
- "1:";
- "lea (8, sp), sp".
- C_cfu ==> "jsr (.cfu)";
- "move.l (4, sp), d0";
- "cmp.l #4, d0";
- "beq 1f";
- "tst.l (sp)+";
- "1:";
- "lea (8, sp), sp".
- C_cff ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "cmp.l d0, d1";
- "beq 1f";
- "cmp.l #4, d0";
- "bne 2f";
- "jsr (.cff4)";
- "add.l #4, sp";
- "bra 1f";
- "2:";
- "move.l (sp), d0";
- "clr.l (sp)";
- "move.l d0,-(sp)";
- "jsr (.cff8)";
- "1:".
- C_cif ==> "move.l (sp)+, d0";
- "cmp.l #4, d0";
- "bne 1f";
- "jsr (.cif4)";
- "add.l #4, sp";
- "bra 2f";
- "1:";
- "jsr (.cif8)";
- "2:".
- C_cuf ==> "move.l (sp)+, d0";
- "cmp.l #4, d0";
- "bne 1f";
- "jsr (.cuf4)";
- "add.l #4, sp";
- "bra 2f";
- "1:";
- "jsr (.cuf8)";
- "2:".
- /******************************************************************************/
- /* */
- /* Group 9 : Logical */
- /* */
- /******************************************************************************/
- C_and
- $1 == 4 ==> "move.l (sp)+, d0";
- "and.l d0, (sp)".
- default ==> "move.l #$1/4, d0";
- "lea ($1, sp), a0";
- "1:";
- "move.l (sp)+, d1";
- "and.l d1, (a0)+";
- "sub.l #1, d0";
- "bne 1b".
- C_ior
- $1 == 4 ==> "move.l (sp)+, d0";
- "or.l d0, (sp)".
- default ==> "move.l #$1/4, d0";
- "lea ($1, sp), a0";
- "1:";
- "move.l (sp)+, d1";
- "or.l d1, (a0)+";
- "sub.l #1, d0";
- "bne 1b".
- C_xor
- $1 == 4 ==> "move.l (sp)+, d0";
- "eor.l d0, (sp)".
- default ==> "move.l #$1/4, d0";
- "lea ($1, sp), a0";
- "1:";
- "move.l (sp)+, d1";
- "eor.l d1, (a0)+";
- "sub.l #1, d0";
- "bne 1b".
- C_com
- $1 == 4 ==> "not.l (sp)".
- $1 == 8 ==> "not.l (sp)";
- "not.l (4, sp)".
- default ==> "move.l #$1/4, d0";
- "move.l sp, a0";
- "1:";
- "not.l (a0)+";
- "sub.l #1, d0";
- "bne 1b".
- C_rol
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "rol.l d0, d1";
- "move.l d1, -(sp)".
- default ==> arg_error( "rol", $1).
- C_ror
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "ror.l d0, d1";
- "move.l d1, -(sp)".
- default ==> arg_error( "ror", $1).
- /******************************************************************************/
- /* */
- /* Group 10 : Sets */
- /* */
- /******************************************************************************/
- C_inn
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "btst d0, d1";
- "sne d1";
- "and.l #1, d1";
- "move.l d1, -(sp)".
- default ==> "move.l (sp)+, d0";
- "move.l #$1, d1";
- "jsr (.inn)";
- "move.l d0, -(sp)".
- C_inn_narg ==> "move.l (sp)+, d1";
- "move.l (sp)+, d0";
- "jsr (.inn)";
- "move.l d0, -(sp)".
-
- C_set
- $1 == 4 ==> "move.l (sp)+, d0";
- "clr.l d1";
- "bset d0, d1";
- "move.l d1, -(sp)".
- default ==> "move.l (sp)+, d0";
- "move.l #$1, d1";
- "jsr (.set)".
- C_set_narg ==> "move.l (sp)+, d1";
- "move.l (sp)+, d0";
- "jsr (.set)".
- /******************************************************************************/
- /* */
- /* Group 11 : Array */
- /* */
- /******************************************************************************/
- C_lar ==> "move.l #$1, d0";
- "jsr (.lar)".
- C_lar_narg ==> "move.l (sp)+, d0";
- "jsr (.lar)".
- C_sar ==> "move.l #$1, d0";
- "jsr (.sar)".
- C_sar_narg ==> "move.l (sp)+, d0";
- "jsr (.sar)".
- C_aar ==> "move.l #$1, d0";
- "jsr (.aar)";
- "move.l a0, -(sp)".
- C_aar_narg ==> "move.l (sp)+, d0";
- "jsr (.aar)";
- "move.l a0, -(sp)".
- /******************************************************************************/
- /* */
- /* Group 12 : Compare */
- /* */
- /******************************************************************************/
- C_cmi
- $1 == 4 ==> "clr.l d0";
- "cmp.l (sp)+, (sp)+";
- "beq 2f";
- "blt 1f";
- "add.l #1, d0";
- "bra 2f";
- "1 : sub.l #1, d0";
- "2 : move.l d0, -(sp)".
- default ==> "move.l #$1, d0";
- "jsr (.cmi)";
- "move.l d0, -(sp)".
- C_cmu
- $1 == 4 ==> "clr.l d0";
- "cmp.l (sp)+, (sp)+";
- "beq 2f";
- "bcs 1f";
- "add.l #1, d0";
- "bra 2f";
- "1 : sub.l #1, d0";
- "2 : move.l d0, -(sp)".
- default ==> "move.l #$1, d0";
- "jsr (.cmu)";
- "move.l d0, -(sp)".
- C_cmu_narg ==> "move.l (sp)+, d0";
- "jsr (.cmu)";
- "move.l d0, -(sp)".
- C_cms ==> "move.l #$1, d0";
- "jsr (.cms)";
- "move.l d0, -(sp)".
- C_cms_narg ==> "move.l (sp)+, d0";
- "jsr (.cms)";
- "move.l d0, -(sp)".
- C_cmp ==> C_cmu( (arith)4).
- C_tlt ==> "move.l (sp), d0";
- "move.l #1, (sp)";
- "tst.l d0";
- "blt 1f";
- "clr.l (sp)";
- "1:".
- C_tle ==> "move.l (sp), d0";
- "move.l #1, (sp)";
- "tst.l d0";
- "ble 1f";
- "clr.l (sp)";
- "1:".
- C_teq ==> "move.l (sp), d0";
- "move.l #1, (sp)";
- "tst.l d0";
- "beq 1f";
- "clr.l (sp)";
- "1:".
- C_tne ==> "move.l (sp), d0";
- "move.l #1, (sp)";
- "tst.l d0";
- "bne 1f";
- "clr.l (sp)";
- "1:".
- C_tge ==> "move.l (sp), d0";
- "move.l #1, (sp)";
- "tst.l d0";
- "bge 1f";
- "clr.l (sp)";
- "1:".
- C_tgt ==> "move.l (sp), d0";
- "move.l #1, (sp)";
- "tst.l d0";
- "bgt 1f";
- "clr.l (sp)";
- "1:".
- C_cmf
- $1 == 4 ==> "jsr (.cmf4)";
- "tst.l (sp)+";
- "move.l d0,(sp)".
- $1 == 8 ==> "jsr (.cmf8)";
- "lea (12,sp), sp";
- "move.l d0,(sp)".
- default ==> arg_error("cmf", $1).
- /******************************************************************************/
- /* */
- /* Group 13 : Branch */
- /* */
- /******************************************************************************/
- C_bra ==> "bra $1".
- C_blt ==> "move.l (sp)+, d0";
- "cmp.l (sp)+, d0";
- "bgt $1".
- C_ble ==> "move.l (sp)+, d0";
- "cmp.l (sp)+, d0";
- "bge $1".
- C_beq ==> "move.l (sp)+, d0";
- "cmp.l (sp)+, d0";
- "beq $1".
- C_bne ==> "move.l (sp)+, d0";
- "cmp.l (sp)+, d0";
- "bne $1".
- C_bge ==> "move.l (sp)+, d0";
- "cmp.l (sp)+, d0";
- "ble $1".
- C_bgt ==> "move.l (sp)+, d0";
- "cmp.l (sp)+, d0";
- "blt $1".
- C_zlt ==> "tst.l (sp)+";
- "blt $1".
- C_zle ==> "tst.l (sp)+";
- "ble $1".
- C_zeq ==> "tst.l (sp)+";
- "beq $1".
- C_zne ==> "tst.l (sp)+";
- "bne $1".
- C_zge ==> "tst.l (sp)+";
- "bge $1".
- C_zgt ==> "tst.l (sp)+";
- "bgt $1".
- /******************************************************************************/
- /* */
- /* Group 14 : Procedure call instructions */
- /* */
- /******************************************************************************/
- C_cai ==> "move.l (sp)+, a0";
- "jsr (a0)".
- C_cal ==> "jsr ($1)".
- C_lfr
- $1 == 4 ==> "move.l d0, -(sp)".
- $1 == 8 ==> "move.l d1, -(sp)";
- "move.l d0, -(sp)".
- default ==> arg_error( "lfr", $1).
- C_ret
- $1 == 0 ==> "unlk a6";
- "rts".
- $1 == 4 ==> "move.l (sp)+, d0";
- "unlk a6";
- "rts".
- $1 == 8 ==> "move.l (sp)+, d0";
- "move.l (sp)+, d1";
- "unlk a6";
- "rts".
- default ==> arg_error( "ret", $1).
- /******************************************************************************/
- /* */
- /* Group 15 : Miscellaneous instructions */
- /* */
- /******************************************************************************/
- C_asp
- small( $1) ==> "add.l #$1, sp".
- default ==> "lea ($1, sp), sp".
- C_ass
- $1 == 4 ==> "add.l (sp)+, sp".
- default ==> arg_error( "ass", $1).
- C_blm
- $1 == 4 ==> "move.l (sp)+, a0";
- "move.l (sp)+, a1";
- "move.l (a1), (a0)".
- $1 == 8 ==> "move.l (sp)+, a0";
- "move.l (sp)+, a1";
- "move.l (a1), (a0)";
- "move.l (4, a1), (4, a0)".
- default ==> "move.l (sp)+, a0";
- "move.l (sp)+, a1";
- "move.l #$1/4, d0";
- "1:";
- "move.l (a1)+, (a0)+";
- "sub.l #1, d0";
- "bne 1b".
- C_bls
- $1 == 4 ==> "move.l (sp)+, d0";
- "move.l (sp)+, a0";
- "move.l (sp)+, a1";
- "asr.l #2, d0";
- "beq 2f";
- "1:";
- "move.l (a1)+, (a0)+";
- "sub.l #1, d0";
- "bne 1b";
- "2:".
- default ==> arg_error( "bls", $1).
- C_csa
- $1 == 4 ==> "move.l (sp)+,a0";
- "move.l (sp)+,d0";
- "jmp (.csa)".
- default ==> arg_error( "csa", $1).
- C_csb
- $1 == 4 ==> "move.l (sp)+,a0";
- "move.l (sp)+,d0";
- "jmp (.csb)".
- default ==> arg_error( "csb", $1).
- C_dch ==> C_loi( (arith)4).
- C_dup
- $1 == 4 ==> "move.l (sp), -(sp)".
- $1 == 8 ==> "move.l (4, sp), -(sp)";
- "move.l (4, sp), -(sp)".
- default ==> "move.l #$1/4, d0";
- "lea ($1, sp), a0";
- "1:";
- "move.l -(a0), -(sp)";
- "sub.l #1, d0";
- "bne 1b".
- C_dus
- $1 == 4 ==> "move.l (sp)+, d0";
- "lea (0, sp, d0.l*1), a0";
- "asr.l #2, d0";
- "beq 2f";
- "1:";
- "move.l -(a0), -(sp)";
- "sub.l #1, d0";
- "bne 1b";
- "2:".
- default ==> arg_error( "dus", $1).
- C_exg ==> "move.l #$1, d0";
- "jsr (.exg)".
- C_fil.. ==> "move.l #$1+$2, (.filn)".
- C_gto.. ==> "move.l #$1+$2, a0";
- "move.l (8, a0), a6";
- "move.l (4, a0), sp";
- "jmp ([0,a0], 0)".
- C_lim ==> "move.l (.trpim), -(sp)".
- C_lin ==> "move.l #$1, (.lino)".
- C_lni ==> "add.l #1, (.lino)".
- C_lor
- $1 == 0 ==> "move.l a6, -(sp)".
- $1 == 1 ==> "move.l sp, -(sp)".
- $1 == 2 ==> "move.l (.reghp), -(sp)".
- default ==> arg_error( "lor", $1).
- C_lpb ==> C_adp( (arith)8).
- C_mon ==> "jsr (.mon)".
- C_nop ==> .
- C_rck
- $1 == 4 ==> "move.l (sp)+, a0";
- "move.l (sp)+, d0";
- "cmp2.l (a0), d0";
- "bcc 1f";
- "pea (1)"; /* push constant 1 == ERANGE */
- "jsr (.trp)";
- "1: move.l d0, -(sp)".
- default ==> arg_error( "rck", $1).
- C_rtt ==> C_ret( (arith)0).
- C_sig ==> "move.l (.trppc), a0";
- "move.l (sp)+, (.trppc)";
- "move.l a0, -(sp)".
- C_sim ==> "move.l (sp)+, (.trpim)".
- C_str
- $1 == 0 ==> "move.l (sp)+, a6".
- $1 == 1 ==> "move.l (sp)+, sp".
- $1 == 2 ==> "jsr (.strhp)".
- default ==> arg_error( "str", $1).
- C_trp ==> "jsr (.trp)".
- /*****************************************************************************/
- ..icon
- $2 == 1 ==> gen1( (ONE_BYTE) atoi( $1)).
- $2 == 2 ==> gen2( (TWO_BYTES) atoi( $1)).
- $2 == 4 ==> gen4( (FOUR_BYTES) atol( $1)).
- default ==> arg_error( "icon", $2).
- ..ucon
- $2 == 1 ==> gen1( (ONE_BYTE) atoi( $1)).
- $2 == 2 ==> gen2( (TWO_BYTES) atoi( $1)).
- $2 == 4 ==> gen4( (FOUR_BYTES) atol( $1)).
- default ==> arg_error( "icon", $2).
- ..fcon ==> con_float($1, $2).
- /*****************************************************************************/
- C_prolog ==> .
- C_jump ==> "bra $1".
- C_locals ==> "link a6, #-$1".
- C_db_sline ==> "jsr (___u_LiB)".
|