| 1 |
(* |
| 2 |
* Generate a linear sequence of instructions |
| 3 |
*) |
| 4 |
signature INSTR_GEN = |
| 5 |
sig |
| 6 |
structure C : CELLS |
| 7 |
structure I : INSTRUCTIONS |
| 8 |
structure S : INSTRUCTION_STREAM |
| 9 |
structure CFG : CONTROL_FLOW_GRAPH |
| 10 |
|
| 11 |
(* sharing I.C = C *) |
| 12 |
(* sharing CFG.P = S.P *) |
| 13 |
where type P.Client.pseudo_op = S.P.Client.pseudo_op |
| 14 |
and type P.T.Basis.cond = S.P.T.Basis.cond |
| 15 |
and type P.T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode |
| 16 |
and type P.T.Basis.ext = S.P.T.Basis.ext |
| 17 |
and type P.T.Basis.fcond = S.P.T.Basis.fcond |
| 18 |
and type P.T.Basis.rounding_mode = S.P.T.Basis.rounding_mode |
| 19 |
and type P.T.Constant.const = S.P.T.Constant.const |
| 20 |
and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx |
| 21 |
and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx |
| 22 |
and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx |
| 23 |
and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx |
| 24 |
and type P.T.I.div_rounding_mode = S.P.T.I.div_rounding_mode |
| 25 |
and type P.T.Region.region = S.P.T.Region.region |
| 26 |
and type P.T.ccexp = S.P.T.ccexp |
| 27 |
and type P.T.fexp = S.P.T.fexp |
| 28 |
(* and type P.T.labexp = S.P.T.labexp *) |
| 29 |
and type P.T.mlrisc = S.P.T.mlrisc |
| 30 |
and type P.T.oper = S.P.T.oper |
| 31 |
and type P.T.rep = S.P.T.rep |
| 32 |
and type P.T.rexp = S.P.T.rexp |
| 33 |
and type P.T.stm = S.P.T.stm |
| 34 |
|
| 35 |
(* |
| 36 |
* This function creates an instruction stream, which can be |
| 37 |
* used to emit instruction into the instruction list. |
| 38 |
*) |
| 39 |
val newStream : I.instruction list ref -> |
| 40 |
(I.instruction, Annotations.annotations, 'a, CFG.cfg) S.stream |
| 41 |
|
| 42 |
end |