86 |
cellkind,oper,region} |
cellkind,oper,region} |
87 |
rtl = |
rtl = |
88 |
let fun word w = word32(Word.toLargeWord w) |
let fun word w = word32(Word.toLargeWord w) |
89 |
fun binOp n (ty,x,y) = app(n,[int ty,rexp x,rexp y]) |
fun ternOp n (x,ty,y,z) = app(n,[x, int ty, rexp y, rexp z]) |
90 |
|
and binOp n (ty,x,y) = app(n,[int ty,rexp x,rexp y]) |
91 |
and unaryOp n (ty,x) = app(n,[int ty,rexp x]) |
and unaryOp n (ty,x) = app(n,[int ty,rexp x]) |
92 |
and rexp(T.LI i) = app("LI",[intinf i]) |
and rexp(T.LI i) = app("LI",[intinf i]) |
93 |
| rexp(T.NEG x) = unaryOp "NEG" x |
| rexp(T.NEG x) = unaryOp "NEG" x |
94 |
| rexp(T.ADD x) = binOp "ADD" x |
| rexp(T.ADD x) = binOp "ADD" x |
95 |
| rexp(T.SUB x) = binOp "SUB" x |
| rexp(T.SUB x) = binOp "SUB" x |
96 |
| rexp(T.MULS x) = binOp "MULS" x |
| rexp(T.MULS x) = binOp "MULS" x |
97 |
| rexp(T.DIVS x) = binOp "DIVS" x |
(* FIXME |
98 |
| rexp(T.REMS x) = binOp "REMS" x |
| rexp(T.DIVS x) = ternOp "DIVS" x |
99 |
| rexp(T.QUOTS x) = binOp "QUOTS" x |
| rexp(T.REMS x) = ternOp "REMS" x |
100 |
|
*) |
101 |
| rexp(T.MULU x) = binOp "MULU" x |
| rexp(T.MULU x) = binOp "MULU" x |
102 |
| rexp(T.DIVU x) = binOp "DIVU" x |
| rexp(T.DIVU x) = binOp "DIVU" x |
103 |
| rexp(T.REMU x) = binOp "REMU" x |
| rexp(T.REMU x) = binOp "REMU" x |
105 |
| rexp(T.ADDT x) = binOp "ADDT" x |
| rexp(T.ADDT x) = binOp "ADDT" x |
106 |
| rexp(T.SUBT x) = binOp "SUBT" x |
| rexp(T.SUBT x) = binOp "SUBT" x |
107 |
| rexp(T.MULT x) = binOp "MULT" x |
| rexp(T.MULT x) = binOp "MULT" x |
108 |
| rexp(T.DIVT x) = binOp "DIVT" x |
(* FIXME |
109 |
| rexp(T.REMT x) = binOp "REMT" x |
| rexp(T.DIVT x) = ternOp "DIVT" x |
110 |
|
*) |
111 |
| rexp(T.NOTB x) = unaryOp "NOTB" x |
| rexp(T.NOTB x) = unaryOp "NOTB" x |
112 |
| rexp(T.ANDB x) = binOp "ANDB" x |
| rexp(T.ANDB x) = binOp "ANDB" x |
113 |
| rexp(T.ORB x) = binOp "ORB" x |
| rexp(T.ORB x) = binOp "ORB" x |