ignore .lib and .exe
[prop.git] / prop-src / sparc3.pC
blobc44f4c78f2269ccd1dbf846963b606aae50618d1
1 datatype Inst :: rewrite =
2    INT int
3  | LOAD (Inst)
4  | ADD  (Inst, Inst)
5  | SUB  (Inst, Inst)
6  | DIV  (Inst, Inst)
7  | MUL  (Inst, Inst)
10 void compile (Inst e)
12 rewrite (e) type (Inst) :: treeparser of
13   reg -> INT i \ 1: 
14 | reg -> LOAD (INT addr) \ 2:
15 | reg -> LOAD (ADD(reg,reg)) \ 3:
16 | reg -> LOAD (reg)     \ cost(reg):
17 | exp -> reg \ 0:
18 | exp -> ADD (exp, exp) \ 1:
19 | exp -> SUB (exp, exp) \ 1:
20 | exp -> MUL (exp, exp) \ 2:
21 | exp -> DIV (exp, exp) \ notarget(a):
22 end rewrite;