1 datatype Inst :: rewrite =
2 ADDD(Inst,Inst) | ADDF(Inst,Inst) | ADDI(Inst,Inst)
3 | ADDP(Inst,Inst) | ADDU(Inst,Inst) |
7 ARGB(Inst) | ARGD(Inst) | ARGF(Inst) | ARGI(Inst) | ARGP(Inst) |
8 ASGNB(Inst,Inst) | ASGNC(Inst,Inst) | ASGND(Inst,Inst)
9 | ASGNF(Inst,Inst) | ASGNI(Inst,Inst) | ASGNP(Inst,Inst) | ASGNS(Inst,Inst) |
14 CALLB(Inst,Inst) | CALLD(Inst) | CALLF(Inst) | CALLI(Inst) | CALLV(Inst) |
15 CNSTC | CNSTD | CNSTF | CNSTI | CNSTP | CNSTS | CNSTU |
16 CVCI(Inst) | CVCU(Inst) |
17 CVDF(Inst) | CVDI(Inst) |
19 CVIC(Inst) | CVID(Inst) | CVIS(Inst) | CVIU(Inst) |
21 CVSI(Inst) | CVSU(Inst) |
22 CVUC(Inst) | CVUI(Inst) | CVUP(Inst) | CVUS(Inst) |
23 DIVD(Inst,Inst) | DIVF(Inst,Inst) | DIVI(Inst,Inst) | DIVU(Inst,Inst) |
24 EQD(Inst,Inst) | EQF(Inst,Inst) | EQI(Inst,Inst) |
25 GED(Inst,Inst) | GEF(Inst,Inst) | GEI(Inst,Inst) | GEU(Inst,Inst) |
26 GTD(Inst,Inst) | GTF(Inst,Inst) | GTI(Inst,Inst) | GTU(Inst,Inst) |
27 INDIRB(Inst) | INDIRC(Inst) | INDIRD(Inst) | INDIRF(Inst) |
28 INDIRI(Inst) | INDIRP(Inst) | INDIRS(Inst) |
31 LED(Inst,Inst) | LEF(Inst,Inst) | LEI(Inst,Inst) | LEU(Inst,Inst) |
32 LOADB(Inst) | LOADC(Inst) | LOADD(Inst) | LOADF(Inst) |
33 LOADI(Inst) | LOADP(Inst) | LOADS(Inst) | LOADU(Inst) |
34 LSHI(Inst,Inst) | LSHU(Inst,Inst) |
35 LTD(Inst,Inst) | LTF(Inst,Inst) | LTI(Inst,Inst) | LTU(Inst,Inst) |
36 MODI(Inst,Inst) | MODU(Inst,Inst) |
37 MULD(Inst,Inst) | MULF(Inst,Inst) | MULI(Inst,Inst) | MULU(Inst,Inst) |
38 NED(Inst,Inst) | NEF(Inst,Inst) | NEI(Inst,Inst) |
39 NEGD(Inst) | NEGF(Inst) | NEGI(Inst) |
40 RETD(Inst) | RETF(Inst) | RETI(Inst) |
41 RSHI(Inst,Inst) | RSHU(Inst,Inst) |
42 SUBD(Inst,Inst) | SUBF(Inst,Inst) | SUBI(Inst,Inst)
43 | SUBP(Inst,Inst) | SUBU(Inst,Inst) |
49 rewrite (e) type (Inst) :: treeparser of
50 reg -> INDIRC(VREGP): "# read register\n";
51 | reg -> INDIRD(VREGP): "# read register\n";
52 | reg -> INDIRF(VREGP): "# read register\n";
53 | reg -> INDIRI(VREGP): "# read register\n";
54 | reg -> INDIRP(VREGP): "# read register\n";
55 | reg -> INDIRS(VREGP): "# read register\n";
56 | stmt -> ASGNC(VREGP,reg): "# write register\n";
57 | stmt -> ASGND(VREGP,reg): "# write register\n";
58 | stmt -> ASGNF(VREGP,reg): "# write register\n";
59 | stmt -> ASGNI(VREGP,reg): "# write register\n";
60 | stmt -> ASGNP(VREGP,reg): "# write register\n";
61 | stmt -> ASGNS(VREGP,reg): "# write register\n";
68 | reg -> CVIU(reg) \ notarget(redex): { "%0" notarget(a); }
69 | reg -> CVPU(reg) \ notarget(redex): { "%0" notarget(a); }
70 | reg -> CVUI(reg) \ notarget(redex): { "%0" notarget(a); }
71 | reg -> CVUP(reg) \ notarget(redex): { "%0" notarget(a); }
72 | reg -> ADDRGP: { "set %a,%%%c\n" 1; }