1 diff --git a/Doc/html/mltex2html b/Doc/html/mltex2html
2 index 24d393f..6e58ea0 100755
3 --- a/Doc/html/mltex2html
4 +++ b/Doc/html/mltex2html
9 # This tool generates HTML pages in my own format given a stylized Latex file.
11 diff --git a/README.mlton b/README.mlton
13 index 0000000..8d31e04
17 +The following changes were made to the MLRISC Library, in addition to
18 +deriving the `.mlb` files from the `.cm` files:
20 +* eliminate sequential `withtype` expansions: Most could be rewritten as a sequence of type definitions and datatype definitions.
21 +* eliminate higher-order functors: Every higher-order functor definition and application could be uncurried in the obvious way.
22 +* eliminate `where <str> = <str>`: Quite painful to expand out all the flexible types in the respective structures. Furthermore, many of the implied type equalities aren't needed, but it's too hard to pick out the right ones.
23 +* `library/array-noneq.sml` (added, not exported): Implements `signature ARRAY_NONEQ`, similar to `signature ARRAY` from the Basis Library, but replacing the latter's `eqtype 'a array = 'a array` and `type 'a vector = 'a Vector.vector` with `type 'a array` and `type 'a vector`. Thus, array-like containers may match `ARRAY_NONEQ`, whereas only the pervasive `'a array` container may math `ARRAY`. (SML/NJ's implementation of `signature ARRAY` omits the type realizations.)
24 +* `library/dynamic-array.sml` and `library/hash-array.sml` (modifed): Replace `include ARRAY` with `include ARRAY_NONEQ`; see above.
25 diff --git a/aliasing/pointsTo.sig b/aliasing/pointsTo.sig
26 index 9abcd4b..35655ef 100644
27 --- a/aliasing/pointsTo.sig
28 +++ b/aliasing/pointsTo.sig
29 @@ -7,18 +7,27 @@ signature POINTS_TO =
33 - structure C : CELLS_BASIS = CellsBasis
34 + structure C : CELLS_BASIS (* = CellsBasis *)
35 + where type CellSet.cellset = CellsBasis.CellSet.cellset
36 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
37 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
38 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
39 + and type cell = CellsBasis.cell
40 + and type cellColor = CellsBasis.cellColor
41 + and type cellkind = CellsBasis.cellkind
42 + and type cellkindDesc = CellsBasis.cellkindDesc
43 + and type cellkindInfo = CellsBasis.cellkindInfo
47 - | SREF of C.cell * edges ref
48 - | WREF of C.cell * edges ref
49 - | SCELL of C.cell * edges ref
50 - | WCELL of C.cell * edges ref
52 + | SREF of C.cell * (edgekind * int * cell ref) list ref
53 + | WREF of C.cell * (edgekind * int * cell ref) list ref
54 + | SCELL of C.cell * (edgekind * int * cell ref) list ref
55 + | WCELL of C.cell * (edgekind * int * cell ref) list ref
56 | TOP of {mutable:bool, id:C.cell, name:string}
57 (* a collapsed node *)
58 - withtype region = cell ref
59 - and edges = (edgekind * int * region) list
60 + type region = cell ref
61 + type edges = (edgekind * int * region) list
63 val reset : (unit -> C.cell) -> unit
65 diff --git a/aliasing/pointsTo.sml b/aliasing/pointsTo.sml
66 index 5e6c79f..95821f0 100644
67 --- a/aliasing/pointsTo.sml
68 +++ b/aliasing/pointsTo.sml
69 @@ -10,16 +10,15 @@ struct
70 structure C = CellsBasis
74 - | SREF of C.cell * edges ref
75 - | WREF of C.cell * edges ref
76 - | SCELL of C.cell * edges ref
77 - | WCELL of C.cell * edges ref
79 + | SREF of C.cell * (edgekind * int * cell ref) list ref
80 + | WREF of C.cell * (edgekind * int * cell ref) list ref
81 + | SCELL of C.cell * (edgekind * int * cell ref) list ref
82 + | WCELL of C.cell * (edgekind * int * cell ref) list ref
83 | TOP of {mutable:bool, id:C.cell, name:string}
84 (* a collapsed node *)
86 - withtype region = cell ref
87 - and edges = (edgekind * int * region) list
88 + type region = cell ref
89 + type edges = (edgekind * int * region) list
91 fun error msg = MLRiscErrorMsg.error("PointsTo",msg)
93 diff --git a/alpha/backpatch/alphaJumps.sml b/alpha/backpatch/alphaJumps.sml
94 index df1d5ff..5636e24 100644
95 --- a/alpha/backpatch/alphaJumps.sml
96 +++ b/alpha/backpatch/alphaJumps.sml
100 (structure Instr : ALPHAINSTR
101 - structure Shuffle : ALPHASHUFFLE
103 - structure MLTreeEval : MLTREE_EVAL
105 + structure Shuffle : ALPHASHUFFLE (* where I = Instr *)
106 + where type I.Constant.const = Instr.Constant.const
107 + and type I.Region.region = Instr.Region.region
108 + and type I.T.Basis.cond = Instr.T.Basis.cond
109 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
110 + and type I.T.Basis.ext = Instr.T.Basis.ext
111 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
112 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
113 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
114 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
115 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
116 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
117 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
118 + and type I.T.ccexp = Instr.T.ccexp
119 + and type I.T.fexp = Instr.T.fexp
120 + (* and type I.T.labexp = Instr.T.labexp *)
121 + and type I.T.mlrisc = Instr.T.mlrisc
122 + and type I.T.oper = Instr.T.oper
123 + and type I.T.rep = Instr.T.rep
124 + and type I.T.rexp = Instr.T.rexp
125 + and type I.T.stm = Instr.T.stm
126 + and type I.branch = Instr.branch
127 + and type I.cmove = Instr.cmove
128 + and type I.ea = Instr.ea
129 + and type I.fbranch = Instr.fbranch
130 + and type I.fcmove = Instr.fcmove
131 + and type I.fload = Instr.fload
132 + and type I.foperate = Instr.foperate
133 + and type I.foperateV = Instr.foperateV
134 + and type I.fstore = Instr.fstore
135 + and type I.funary = Instr.funary
136 + and type I.instr = Instr.instr
137 + and type I.instruction = Instr.instruction
138 + and type I.load = Instr.load
139 + and type I.operand = Instr.operand
140 + and type I.operate = Instr.operate
141 + and type I.operateV = Instr.operateV
142 + and type I.osf_user_palcode = Instr.osf_user_palcode
143 + and type I.pseudo_op = Instr.pseudo_op
144 + and type I.store = Instr.store
145 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
146 + where type T.Basis.cond = Instr.T.Basis.cond
147 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
148 + and type T.Basis.ext = Instr.T.Basis.ext
149 + and type T.Basis.fcond = Instr.T.Basis.fcond
150 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
151 + and type T.Constant.const = Instr.T.Constant.const
152 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
153 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
154 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
155 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
156 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
157 + and type T.Region.region = Instr.T.Region.region
158 + and type T.ccexp = Instr.T.ccexp
159 + and type T.fexp = Instr.T.fexp
160 + (* and type T.labexp = Instr.T.labexp *)
161 + and type T.mlrisc = Instr.T.mlrisc
162 + and type T.oper = Instr.T.oper
163 + and type T.rep = Instr.T.rep
164 + and type T.rexp = Instr.T.rexp
165 + and type T.stm = Instr.T.stm
169 diff --git a/alpha/emit/alphaAsm.sml b/alpha/emit/alphaAsm.sml
170 index e4a7e47..b9671b0 100644
171 --- a/alpha/emit/alphaAsm.sml
172 +++ b/alpha/emit/alphaAsm.sml
176 functor AlphaAsmEmitter(structure S : INSTRUCTION_STREAM
177 - structure Instr : ALPHAINSTR
179 - structure Shuffle : ALPHASHUFFLE
181 - structure MLTreeEval : MLTREE_EVAL
183 + structure Instr : ALPHAINSTR (* where T = S.P.T *)
184 + where type T.Basis.cond = S.P.T.Basis.cond
185 + and type T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
186 + and type T.Basis.ext = S.P.T.Basis.ext
187 + and type T.Basis.fcond = S.P.T.Basis.fcond
188 + and type T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
189 + and type T.Constant.const = S.P.T.Constant.const
190 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
191 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
192 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
193 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
194 + and type T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
195 + and type T.Region.region = S.P.T.Region.region
196 + and type T.ccexp = S.P.T.ccexp
197 + and type T.fexp = S.P.T.fexp
198 + (* and type T.labexp = S.P.T.labexp *)
199 + and type T.mlrisc = S.P.T.mlrisc
200 + and type T.oper = S.P.T.oper
201 + and type T.rep = S.P.T.rep
202 + and type T.rexp = S.P.T.rexp
203 + and type T.stm = S.P.T.stm
204 + structure Shuffle : ALPHASHUFFLE (* where I = Instr *)
205 + where type I.Constant.const = Instr.Constant.const
206 + and type I.Region.region = Instr.Region.region
207 + and type I.T.Basis.cond = Instr.T.Basis.cond
208 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
209 + and type I.T.Basis.ext = Instr.T.Basis.ext
210 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
211 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
212 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
213 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
214 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
215 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
216 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
217 + and type I.T.ccexp = Instr.T.ccexp
218 + and type I.T.fexp = Instr.T.fexp
219 + (* and type I.T.labexp = Instr.T.labexp *)
220 + and type I.T.mlrisc = Instr.T.mlrisc
221 + and type I.T.oper = Instr.T.oper
222 + and type I.T.rep = Instr.T.rep
223 + and type I.T.rexp = Instr.T.rexp
224 + and type I.T.stm = Instr.T.stm
225 + and type I.branch = Instr.branch
226 + and type I.cmove = Instr.cmove
227 + and type I.ea = Instr.ea
228 + and type I.fbranch = Instr.fbranch
229 + and type I.fcmove = Instr.fcmove
230 + and type I.fload = Instr.fload
231 + and type I.foperate = Instr.foperate
232 + and type I.foperateV = Instr.foperateV
233 + and type I.fstore = Instr.fstore
234 + and type I.funary = Instr.funary
235 + and type I.instr = Instr.instr
236 + and type I.instruction = Instr.instruction
237 + and type I.load = Instr.load
238 + and type I.operand = Instr.operand
239 + and type I.operate = Instr.operate
240 + and type I.operateV = Instr.operateV
241 + and type I.osf_user_palcode = Instr.osf_user_palcode
242 + and type I.pseudo_op = Instr.pseudo_op
243 + and type I.store = Instr.store
244 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
245 + where type T.Basis.cond = Instr.T.Basis.cond
246 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
247 + and type T.Basis.ext = Instr.T.Basis.ext
248 + and type T.Basis.fcond = Instr.T.Basis.fcond
249 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
250 + and type T.Constant.const = Instr.T.Constant.const
251 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
252 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
253 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
254 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
255 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
256 + and type T.Region.region = Instr.T.Region.region
257 + and type T.ccexp = Instr.T.ccexp
258 + and type T.fexp = Instr.T.fexp
259 + (* and type T.labexp = Instr.T.labexp *)
260 + and type T.mlrisc = Instr.T.mlrisc
261 + and type T.oper = Instr.T.oper
262 + and type T.rep = Instr.T.rep
263 + and type T.rexp = Instr.T.rexp
264 + and type T.stm = Instr.T.stm
265 ) : INSTRUCTION_EMITTER =
268 diff --git a/alpha/emit/alphaMC.sml b/alpha/emit/alphaMC.sml
269 index e9f2444..fe10caf 100644
270 --- a/alpha/emit/alphaMC.sml
271 +++ b/alpha/emit/alphaMC.sml
275 functor AlphaMCEmitter(structure Instr : ALPHAINSTR
276 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
277 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
278 + where type T.Basis.cond = Instr.T.Basis.cond
279 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
280 + and type T.Basis.ext = Instr.T.Basis.ext
281 + and type T.Basis.fcond = Instr.T.Basis.fcond
282 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
283 + and type T.Constant.const = Instr.T.Constant.const
284 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
285 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
286 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
287 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
288 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
289 + and type T.Region.region = Instr.T.Region.region
290 + and type T.ccexp = Instr.T.ccexp
291 + and type T.fexp = Instr.T.fexp
292 + (* and type T.labexp = Instr.T.labexp *)
293 + and type T.mlrisc = Instr.T.mlrisc
294 + and type T.oper = Instr.T.oper
295 + and type T.rep = Instr.T.rep
296 + and type T.rexp = Instr.T.rexp
297 + and type T.stm = Instr.T.stm
298 structure Stream : INSTRUCTION_STREAM
299 structure CodeString : CODE_STRING
300 ) : INSTRUCTION_EMITTER =
301 @@ -47,6 +67,7 @@ struct
302 (* note: fromLargeWord strips the high order bits! *)
305 + val w = W.toLargeWord w
306 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
309 diff --git a/alpha/flowgraph/alphaGasPseudoOps.sml b/alpha/flowgraph/alphaGasPseudoOps.sml
310 index 5f6a34c..d715a2b 100644
311 --- a/alpha/flowgraph/alphaGasPseudoOps.sml
312 +++ b/alpha/flowgraph/alphaGasPseudoOps.sml
314 functor AlphaGasPseudoOps
315 ( structure T : MLTREE
316 - structure MLTreeEval : MLTREE_EVAL where T = T
317 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
318 + where type T.Basis.cond = T.Basis.cond
319 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
320 + and type T.Basis.ext = T.Basis.ext
321 + and type T.Basis.fcond = T.Basis.fcond
322 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
323 + and type T.Constant.const = T.Constant.const
324 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
325 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
326 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
327 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
328 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
329 + and type T.Region.region = T.Region.region
330 + and type T.ccexp = T.ccexp
331 + and type T.fexp = T.fexp
332 + (* and type T.labexp = T.labexp *)
333 + and type T.mlrisc = T.mlrisc
334 + and type T.oper = T.oper
335 + and type T.rep = T.rep
336 + and type T.rexp = T.rexp
337 + and type T.stm = T.stm
338 ) : PSEUDO_OPS_BASIS =
341 diff --git a/alpha/instructions/alphaInstr.sml b/alpha/instructions/alphaInstr.sml
342 index af0fb93..9c40c19 100644
343 --- a/alpha/instructions/alphaInstr.sml
344 +++ b/alpha/instructions/alphaInstr.sml
346 signature ALPHAINSTR =
348 structure C : ALPHACELLS
349 - structure CB : CELLS_BASIS = CellsBasis
350 + structure CB : CELLS_BASIS (* = CellsBasis *)
351 + where type CellSet.cellset = CellsBasis.CellSet.cellset
352 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
353 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
354 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
355 + and type cell = CellsBasis.cell
356 + and type cellColor = CellsBasis.cellColor
357 + and type cellkind = CellsBasis.cellkind
358 + and type cellkindDesc = CellsBasis.cellkindDesc
359 + and type cellkindInfo = CellsBasis.cellkindInfo
361 structure Constant: CONSTANT
362 structure Region : REGION
363 diff --git a/alpha/instructions/alphaProps.sml b/alpha/instructions/alphaProps.sml
364 index 8b6771e..6c39fa7 100644
365 --- a/alpha/instructions/alphaProps.sml
366 +++ b/alpha/instructions/alphaProps.sml
370 (structure Instr : ALPHAINSTR
371 - structure MLTreeHash : MLTREE_HASH where T = Instr.T
372 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
373 + structure MLTreeHash : MLTREE_HASH (* where T = Instr.T *)
374 + where type T.Basis.cond = Instr.T.Basis.cond
375 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
376 + and type T.Basis.ext = Instr.T.Basis.ext
377 + and type T.Basis.fcond = Instr.T.Basis.fcond
378 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
379 + and type T.Constant.const = Instr.T.Constant.const
380 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
381 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
382 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
383 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
384 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
385 + and type T.Region.region = Instr.T.Region.region
386 + and type T.ccexp = Instr.T.ccexp
387 + and type T.fexp = Instr.T.fexp
388 + (* and type T.labexp = Instr.T.labexp *)
389 + and type T.mlrisc = Instr.T.mlrisc
390 + and type T.oper = Instr.T.oper
391 + and type T.rep = Instr.T.rep
392 + and type T.rexp = Instr.T.rexp
393 + and type T.stm = Instr.T.stm
394 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
395 + where type T.Basis.cond = Instr.T.Basis.cond
396 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
397 + and type T.Basis.ext = Instr.T.Basis.ext
398 + and type T.Basis.fcond = Instr.T.Basis.fcond
399 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
400 + and type T.Constant.const = Instr.T.Constant.const
401 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
402 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
403 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
404 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
405 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
406 + and type T.Region.region = Instr.T.Region.region
407 + and type T.ccexp = Instr.T.ccexp
408 + and type T.fexp = Instr.T.fexp
409 + (* and type T.labexp = Instr.T.labexp *)
410 + and type T.mlrisc = Instr.T.mlrisc
411 + and type T.oper = Instr.T.oper
412 + and type T.rep = Instr.T.rep
413 + and type T.rexp = Instr.T.rexp
414 + and type T.stm = Instr.T.stm
418 diff --git a/alpha/mltree/alpha.sml b/alpha/mltree/alpha.sml
419 index c7b22a3..47c2f3b 100644
420 --- a/alpha/mltree/alpha.sml
421 +++ b/alpha/mltree/alpha.sml
425 (structure AlphaInstr : ALPHAINSTR
426 - structure PseudoInstrs : ALPHA_PSEUDO_INSTR
427 - where I = AlphaInstr
428 - structure ExtensionComp : MLTREE_EXTENSION_COMP
429 - where I = AlphaInstr
430 - and T = AlphaInstr.T
431 + structure PseudoInstrs : ALPHA_PSEUDO_INSTR (* where I = AlphaInstr *)
432 + where type I.Constant.const = AlphaInstr.Constant.const
433 + and type I.Region.region = AlphaInstr.Region.region
434 + and type I.T.Basis.cond = AlphaInstr.T.Basis.cond
435 + and type I.T.Basis.div_rounding_mode = AlphaInstr.T.Basis.div_rounding_mode
436 + and type I.T.Basis.ext = AlphaInstr.T.Basis.ext
437 + and type I.T.Basis.fcond = AlphaInstr.T.Basis.fcond
438 + and type I.T.Basis.rounding_mode = AlphaInstr.T.Basis.rounding_mode
439 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) AlphaInstr.T.Extension.ccx
440 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) AlphaInstr.T.Extension.fx
441 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) AlphaInstr.T.Extension.rx
442 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) AlphaInstr.T.Extension.sx
443 + and type I.T.I.div_rounding_mode = AlphaInstr.T.I.div_rounding_mode
444 + and type I.T.ccexp = AlphaInstr.T.ccexp
445 + and type I.T.fexp = AlphaInstr.T.fexp
446 + (* and type I.T.labexp = AlphaInstr.T.labexp *)
447 + and type I.T.mlrisc = AlphaInstr.T.mlrisc
448 + and type I.T.oper = AlphaInstr.T.oper
449 + and type I.T.rep = AlphaInstr.T.rep
450 + and type I.T.rexp = AlphaInstr.T.rexp
451 + and type I.T.stm = AlphaInstr.T.stm
452 + and type I.branch = AlphaInstr.branch
453 + and type I.cmove = AlphaInstr.cmove
454 + and type I.ea = AlphaInstr.ea
455 + and type I.fbranch = AlphaInstr.fbranch
456 + and type I.fcmove = AlphaInstr.fcmove
457 + and type I.fload = AlphaInstr.fload
458 + and type I.foperate = AlphaInstr.foperate
459 + and type I.foperateV = AlphaInstr.foperateV
460 + and type I.fstore = AlphaInstr.fstore
461 + and type I.funary = AlphaInstr.funary
462 + and type I.instr = AlphaInstr.instr
463 + and type I.instruction = AlphaInstr.instruction
464 + and type I.load = AlphaInstr.load
465 + and type I.operand = AlphaInstr.operand
466 + and type I.operate = AlphaInstr.operate
467 + and type I.operateV = AlphaInstr.operateV
468 + and type I.osf_user_palcode = AlphaInstr.osf_user_palcode
469 + and type I.pseudo_op = AlphaInstr.pseudo_op
470 + and type I.store = AlphaInstr.store
471 + structure ExtensionComp : MLTREE_EXTENSION_COMP (* where I = AlphaInstr and T = AlphaInstr.T *)
472 + where type I.addressing_mode = AlphaInstr.addressing_mode
473 + and type I.ea = AlphaInstr.ea
474 + and type I.instr = AlphaInstr.instr
475 + and type I.instruction = AlphaInstr.instruction
476 + and type I.operand = AlphaInstr.operand
477 + where type T.Basis.cond = AlphaInstr.T.Basis.cond
478 + and type T.Basis.div_rounding_mode = AlphaInstr.T.Basis.div_rounding_mode
479 + and type T.Basis.ext = AlphaInstr.T.Basis.ext
480 + and type T.Basis.fcond = AlphaInstr.T.Basis.fcond
481 + and type T.Basis.rounding_mode = AlphaInstr.T.Basis.rounding_mode
482 + and type T.Constant.const = AlphaInstr.T.Constant.const
483 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) AlphaInstr.T.Extension.ccx
484 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) AlphaInstr.T.Extension.fx
485 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) AlphaInstr.T.Extension.rx
486 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) AlphaInstr.T.Extension.sx
487 + and type T.I.div_rounding_mode = AlphaInstr.T.I.div_rounding_mode
488 + and type T.Region.region = AlphaInstr.T.Region.region
489 + and type T.ccexp = AlphaInstr.T.ccexp
490 + and type T.fexp = AlphaInstr.T.fexp
491 + (* and type T.labexp = AlphaInstr.T.labexp *)
492 + and type T.mlrisc = AlphaInstr.T.mlrisc
493 + and type T.oper = AlphaInstr.T.oper
494 + and type T.rep = AlphaInstr.T.rep
495 + and type T.rexp = AlphaInstr.T.rexp
496 + and type T.stm = AlphaInstr.T.stm
498 (* Cost of multiplication in cycles *)
499 val multCost : int ref
500 @@ -215,8 +276,10 @@ struct
501 * Specialize the modules for multiplication/division
502 * by constant optimizations.
504 - functor Multiply32 = MLTreeMult
507 + (* signed, trapping version of multiply and divide *)
508 + structure Multiply32 = struct
511 structure CB = CellsBasis
513 @@ -256,10 +319,10 @@ struct
514 in [I.operate{oper=I.ADDL,ra=r,rb=zeroOpn,rc=tmp},
515 I.operate{oper=I.SRA,ra=tmp,rb=I.IMMop i,rc=d}]
520 - functor Multiply64 = MLTreeMult
522 + structure Multiply64 = struct
525 structure CB = CellsBasis
527 @@ -273,23 +336,25 @@ struct
528 fun slli{r,i,d} = [I.operate{oper=I.SLL,ra=r,rb=I.IMMop i,rc=d}]
529 fun srli{r,i,d} = [I.operate{oper=I.SRL,ra=r,rb=I.IMMop i,rc=d}]
530 fun srai{r,i,d} = [I.operate{oper=I.SRA,ra=r,rb=I.IMMop i,rc=d}]
534 (* signed, trapping version of multiply and divide *)
535 - structure Mult32 = Multiply32
536 - (val trapping = true
537 + structure Mult32 = MLTreeMult
539 + val trapping = true
540 val multCost = multCost
541 fun addv{r1,r2,d} = [I.operatev{oper=I.ADDLV,ra=r1,rb=I.REGop r2,rc=d}]
542 fun subv{r1,r2,d} = [I.operatev{oper=I.SUBLV,ra=r1,rb=I.REGop r2,rc=d}]
547 - (val signed = true)
551 (* non-trapping version of multiply and divide *)
552 - functor Mul32 = Multiply32
553 - (val trapping = false
554 + structure Mul32 = struct
556 + val trapping = false
557 val multCost = multCost
558 fun addv{r1,r2,d} = [I.operate{oper=I.ADDL,ra=r1,rb=I.REGop r2,rc=d}]
559 fun subv{r1,r2,d} = [I.operate{oper=I.SUBL,ra=r1,rb=I.REGop r2,rc=d}]
560 @@ -298,25 +363,27 @@ struct
561 [I.operate{oper=I.S4ADDL,ra=r1,rb=I.REGop r2,rc=d}])
562 val sh3addv = SOME(fn {r1,r2,d} =>
563 [I.operate{oper=I.S8ADDL,ra=r1,rb=I.REGop r2,rc=d}])
565 - structure Mulu32 = Mul32(val signed = false)
566 - structure Muls32 = Mul32(val signed = true)
568 + structure Mulu32 = MLTreeMult(open Mul32 val signed = false)
569 + structure Muls32 = MLTreeMult(open Mul32 val signed = true)
571 (* signed, trapping version of multiply and divide *)
572 - structure Mult64 = Multiply64
573 - (val trapping = true
574 + structure Mult64 = MLTreeMult
576 + val trapping = true
577 val multCost = multCost
578 fun addv{r1,r2,d} = [I.operatev{oper=I.ADDQV,ra=r1,rb=I.REGop r2,rc=d}]
579 fun subv{r1,r2,d} = [I.operatev{oper=I.SUBQV,ra=r1,rb=I.REGop r2,rc=d}]
584 - (val signed = true)
588 (* unsigned, non-trapping version of multiply and divide *)
589 - functor Mul64 = Multiply64
590 - (val trapping = false
591 + structure Mul64 = struct
593 + val trapping = false
594 val multCost = multCost
595 fun addv{r1,r2,d} = [I.operate{oper=I.ADDQ,ra=r1,rb=I.REGop r2,rc=d}]
596 fun subv{r1,r2,d} = [I.operate{oper=I.SUBQ,ra=r1,rb=I.REGop r2,rc=d}]
597 @@ -325,9 +392,9 @@ struct
598 [I.operate{oper=I.S4ADDQ,ra=r1,rb=I.REGop r2,rc=d}])
599 val sh3addv = SOME(fn {r1,r2,d} =>
600 [I.operate{oper=I.S8ADDQ,ra=r1,rb=I.REGop r2,rc=d}])
602 - structure Mulu64 = Mul64(val signed = false)
603 - structure Muls64 = Mul64(val signed = true)
605 + structure Mulu64 = MLTreeMult(open Mul64 val signed = false)
606 + structure Muls64 = MLTreeMult(open Mul64 val signed = true)
610 diff --git a/alpha/mltree/alphaPseudoInstr.sig b/alpha/mltree/alphaPseudoInstr.sig
611 index a22feeb..f9c584e 100644
612 --- a/alpha/mltree/alphaPseudoInstr.sig
613 +++ b/alpha/mltree/alphaPseudoInstr.sig
614 @@ -4,10 +4,39 @@ signature ALPHA_PSEUDO_INSTR =
616 structure I : ALPHAINSTR
618 + where type Basis.cond = I.T.Basis.cond
619 + and type Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
620 + and type Basis.ext = I.T.Basis.ext
621 + and type Basis.fcond = I.T.Basis.fcond
622 + and type Basis.rounding_mode = I.T.Basis.rounding_mode
623 + and type Constant.const = I.T.Constant.const
624 + and type ('s,'r,'f,'c) Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
625 + and type ('s,'r,'f,'c) Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
626 + and type ('s,'r,'f,'c) Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
627 + and type ('s,'r,'f,'c) Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
628 + and type I.div_rounding_mode = I.T.I.div_rounding_mode
629 + and type Region.region = I.T.Region.region
630 + and type ccexp = I.T.ccexp
631 + and type fexp = I.T.fexp
632 + (* and type labexp = I.T.labexp *)
633 + and type mlrisc = I.T.mlrisc
634 + and type oper = I.T.oper
635 + and type rep = I.T.rep
636 + and type rexp = I.T.rexp
637 + and type stm = I.T.stm
638 structure C : ALPHACELLS
641 - structure CB: CELLS_BASIS = CellsBasis
642 + (* sharing C = I.C *)
643 + (* sharing I.T = T *)
644 + structure CB: CELLS_BASIS (* = CellsBasis *)
645 + where type CellSet.cellset = CellsBasis.CellSet.cellset
646 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
647 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
648 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
649 + and type cell = CellsBasis.cell
650 + and type cellColor = CellsBasis.cellColor
651 + and type cellkind = CellsBasis.cellkind
652 + and type cellkindDesc = CellsBasis.cellkindDesc
653 + and type cellkindInfo = CellsBasis.cellkindInfo
655 type reduceOpnd = I.operand -> CB.cell
657 diff --git a/amd64/amd64MC.sml b/amd64/amd64MC.sml
658 index 35efcdb..9c6b8f7 100644
659 --- a/amd64/amd64MC.sml
660 +++ b/amd64/amd64MC.sml
662 functor AMD64MCEmitter
663 (structure Instr : AMD64INSTR
664 - structure Shuffle : AMD64SHUFFLE where I = Instr
665 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
666 - structure AsmEmitter : INSTRUCTION_EMITTER where I = Instr) : MC_EMIT =
667 + structure Shuffle : AMD64SHUFFLE (* where I = Instr *)
668 + where type I.Constant.const = Instr.Constant.const
669 + and type I.Region.region = Instr.Region.region
670 + and type I.T.Basis.cond = Instr.T.Basis.cond
671 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
672 + and type I.T.Basis.ext = Instr.T.Basis.ext
673 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
674 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
675 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
676 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
677 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
678 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
679 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
680 + and type I.T.ccexp = Instr.T.ccexp
681 + and type I.T.fexp = Instr.T.fexp
682 + (* and type I.T.labexp = Instr.T.labexp *)
683 + and type I.T.mlrisc = Instr.T.mlrisc
684 + and type I.T.oper = Instr.T.oper
685 + and type I.T.rep = Instr.T.rep
686 + and type I.T.rexp = Instr.T.rexp
687 + and type I.T.stm = Instr.T.stm
688 + (* and type I.addressing_mode = Instr.addressing_mode *)
689 + and type I.binaryOp = Instr.binaryOp
690 + and type I.bitOp = Instr.bitOp
691 + and type I.cond = Instr.cond
692 + and type I.fbin_op = Instr.fbin_op
693 + and type I.fcom_op = Instr.fcom_op
694 + and type I.fmove_op = Instr.fmove_op
695 + and type I.fsize = Instr.fsize
696 + and type I.instr = Instr.instr
697 + and type I.instruction = Instr.instruction
698 + and type I.isize = Instr.isize
699 + and type I.move = Instr.move
700 + and type I.multDivOp = Instr.multDivOp
701 + and type I.operand = Instr.operand
702 + and type I.shiftOp = Instr.shiftOp
703 + and type I.unaryOp = Instr.unaryOp
704 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
705 + where type T.Basis.cond = Instr.T.Basis.cond
706 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
707 + and type T.Basis.ext = Instr.T.Basis.ext
708 + and type T.Basis.fcond = Instr.T.Basis.fcond
709 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
710 + and type T.Constant.const = Instr.T.Constant.const
711 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
712 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
713 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
714 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
715 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
716 + and type T.Region.region = Instr.T.Region.region
717 + and type T.ccexp = Instr.T.ccexp
718 + and type T.fexp = Instr.T.fexp
719 + (* and type T.labexp = Instr.T.labexp *)
720 + and type T.mlrisc = Instr.T.mlrisc
721 + and type T.oper = Instr.T.oper
722 + and type T.rep = Instr.T.rep
723 + and type T.rexp = Instr.T.rexp
724 + and type T.stm = Instr.T.stm
725 + structure AsmEmitter : INSTRUCTION_EMITTER (* where I = Instr *)
726 + where type I.addressing_mode = Instr.addressing_mode
727 + and type I.ea = Instr.ea
728 + and type I.instr = Instr.instr
729 + and type I.instruction = Instr.instruction
730 + and type I.operand = Instr.operand) : MC_EMIT =
734 diff --git a/amd64/amd64MCFn.sml b/amd64/amd64MCFn.sml
735 index 4499744..a8ba3a2 100644
736 --- a/amd64/amd64MCFn.sml
737 +++ b/amd64/amd64MCFn.sml
741 structure Instr : AMD64INSTR
742 - structure Shuffle : AMD64SHUFFLE where I = Instr
743 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
744 + structure Shuffle : AMD64SHUFFLE (* where I = Instr *)
745 + where type I.Constant.const = Instr.Constant.const
746 + and type I.Region.region = Instr.Region.region
747 + and type I.T.Basis.cond = Instr.T.Basis.cond
748 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
749 + and type I.T.Basis.ext = Instr.T.Basis.ext
750 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
751 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
752 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
753 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
754 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
755 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
756 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
757 + and type I.T.ccexp = Instr.T.ccexp
758 + and type I.T.fexp = Instr.T.fexp
759 + (* and type I.T.labexp = Instr.T.labexp *)
760 + and type I.T.mlrisc = Instr.T.mlrisc
761 + and type I.T.oper = Instr.T.oper
762 + and type I.T.rep = Instr.T.rep
763 + and type I.T.rexp = Instr.T.rexp
764 + and type I.T.stm = Instr.T.stm
765 + (* and type I.addressing_mode = Instr.addressing_mode *)
766 + and type I.binaryOp = Instr.binaryOp
767 + and type I.bitOp = Instr.bitOp
768 + and type I.cond = Instr.cond
769 + and type I.fsize = Instr.fsize
770 + and type I.instr = Instr.instr
771 + and type I.instruction = Instr.instruction
772 + and type I.isize = Instr.isize
773 + and type I.move = Instr.move
774 + and type I.multDivOp = Instr.multDivOp
775 + and type I.operand = Instr.operand
776 + and type I.shiftOp = Instr.shiftOp
777 + and type I.unaryOp = Instr.unaryOp
778 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
779 + where type T.Basis.cond = Instr.T.Basis.cond
780 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
781 + and type T.Basis.ext = Instr.T.Basis.ext
782 + and type T.Basis.fcond = Instr.T.Basis.fcond
783 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
784 + and type T.Constant.const = Instr.T.Constant.const
785 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
786 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
787 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
788 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
789 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
790 + and type T.Region.region = Instr.T.Region.region
791 + and type T.ccexp = Instr.T.ccexp
792 + and type T.fexp = Instr.T.fexp
793 + (* and type T.labexp = Instr.T.labexp *)
794 + and type T.mlrisc = Instr.T.mlrisc
795 + and type T.oper = Instr.T.oper
796 + and type T.rep = Instr.T.rep
797 + and type T.rexp = Instr.T.rexp
798 + and type T.stm = Instr.T.stm
799 (* structure AsmEmitter : INSTRUCTION_EMITTER where I = Instr*)
802 diff --git a/amd64/backpatch/amd64Jumps.sml b/amd64/backpatch/amd64Jumps.sml
803 index 539bf54..0958cf8 100644
804 --- a/amd64/backpatch/amd64Jumps.sml
805 +++ b/amd64/backpatch/amd64Jumps.sml
809 (structure Instr : AMD64INSTR
810 - structure Eval : MLTREE_EVAL where T = Instr.T
811 - structure Shuffle : AMD64SHUFFLE where I = Instr
812 - structure MCEmitter : MC_EMIT where I = Instr) : SDI_JUMPS =
813 + structure Eval : MLTREE_EVAL (* where T = Instr.T *)
814 + where type T.Basis.cond = Instr.T.Basis.cond
815 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
816 + and type T.Basis.ext = Instr.T.Basis.ext
817 + and type T.Basis.fcond = Instr.T.Basis.fcond
818 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
819 + and type T.Constant.const = Instr.T.Constant.const
820 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
821 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
822 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
823 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
824 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
825 + and type T.Region.region = Instr.T.Region.region
826 + and type T.ccexp = Instr.T.ccexp
827 + and type T.fexp = Instr.T.fexp
828 + (* and type T.labexp = Instr.T.labexp *)
829 + and type T.mlrisc = Instr.T.mlrisc
830 + and type T.oper = Instr.T.oper
831 + and type T.rep = Instr.T.rep
832 + and type T.rexp = Instr.T.rexp
833 + and type T.stm = Instr.T.stm
834 + structure Shuffle : AMD64SHUFFLE (* where I = Instr *)
835 + where type I.Constant.const = Instr.Constant.const
836 + and type I.Region.region = Instr.Region.region
837 + and type I.T.Basis.cond = Instr.T.Basis.cond
838 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
839 + and type I.T.Basis.ext = Instr.T.Basis.ext
840 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
841 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
842 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
843 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
844 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
845 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
846 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
847 + and type I.T.ccexp = Instr.T.ccexp
848 + and type I.T.fexp = Instr.T.fexp
849 + (* and type I.T.labexp = Instr.T.labexp *)
850 + and type I.T.mlrisc = Instr.T.mlrisc
851 + and type I.T.oper = Instr.T.oper
852 + and type I.T.rep = Instr.T.rep
853 + and type I.T.rexp = Instr.T.rexp
854 + and type I.T.stm = Instr.T.stm
855 + (* and type I.addressing_mode = Instr.addressing_mode *)
856 + and type I.binaryOp = Instr.binaryOp
857 + and type I.bitOp = Instr.bitOp
858 + and type I.cond = Instr.cond
859 + and type I.fbin_op = Instr.fbin_op
860 + and type I.fcom_op = Instr.fcom_op
861 + and type I.fmove_op = Instr.fmove_op
862 + and type I.fsize = Instr.fsize
863 + and type I.instr = Instr.instr
864 + and type I.instruction = Instr.instruction
865 + and type I.isize = Instr.isize
866 + and type I.move = Instr.move
867 + and type I.multDivOp = Instr.multDivOp
868 + and type I.operand = Instr.operand
869 + and type I.shiftOp = Instr.shiftOp
870 + and type I.unaryOp = Instr.unaryOp
871 + structure MCEmitter : MC_EMIT (* where I = Instr *)
872 + where type I.addressing_mode = Instr.addressing_mode
873 + and type I.ea = Instr.ea
874 + and type I.instr = Instr.instr
875 + and type I.instruction = Instr.instruction
876 + and type I.operand = Instr.operand
881 diff --git a/amd64/emit/amd64Asm.sml b/amd64/emit/amd64Asm.sml
882 index b732ca4..ed7d10a 100644
883 --- a/amd64/emit/amd64Asm.sml
884 +++ b/amd64/emit/amd64Asm.sml
888 functor AMD64AsmEmitter(structure S : INSTRUCTION_STREAM
889 - structure Instr : AMD64INSTR
891 - structure Shuffle : AMD64SHUFFLE
893 - structure MLTreeEval : MLTREE_EVAL
895 + structure Instr : AMD64INSTR (* where T = S.P.T *)
896 + where type T.Basis.cond = S.P.T.Basis.cond
897 + and type T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
898 + and type T.Basis.ext = S.P.T.Basis.ext
899 + and type T.Basis.fcond = S.P.T.Basis.fcond
900 + and type T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
901 + and type T.Constant.const = S.P.T.Constant.const
902 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
903 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
904 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
905 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
906 + and type T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
907 + and type T.Region.region = S.P.T.Region.region
908 + and type T.ccexp = S.P.T.ccexp
909 + and type T.fexp = S.P.T.fexp
910 + (* and type T.labexp = S.P.T.labexp *)
911 + and type T.mlrisc = S.P.T.mlrisc
912 + and type T.oper = S.P.T.oper
913 + and type T.rep = S.P.T.rep
914 + and type T.rexp = S.P.T.rexp
915 + and type T.stm = S.P.T.stm
916 + structure Shuffle : AMD64SHUFFLE (* where I = Instr *)
917 + where type I.Constant.const = Instr.Constant.const
918 + and type I.Region.region = Instr.Region.region
919 + and type I.T.Basis.cond = Instr.T.Basis.cond
920 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
921 + and type I.T.Basis.ext = Instr.T.Basis.ext
922 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
923 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
924 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
925 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
926 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
927 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
928 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
929 + and type I.T.ccexp = Instr.T.ccexp
930 + and type I.T.fexp = Instr.T.fexp
931 + (* and type I.T.labexp = Instr.T.labexp *)
932 + and type I.T.mlrisc = Instr.T.mlrisc
933 + and type I.T.oper = Instr.T.oper
934 + and type I.T.rep = Instr.T.rep
935 + and type I.T.rexp = Instr.T.rexp
936 + and type I.T.stm = Instr.T.stm
937 + (* and type I.addressing_mode = Instr.addressing_mode *)
938 + and type I.binaryOp = Instr.binaryOp
939 + and type I.bitOp = Instr.bitOp
940 + and type I.cond = Instr.cond
941 + and type I.fbin_op = Instr.fbin_op
942 + and type I.fcom_op = Instr.fcom_op
943 + and type I.fmove_op = Instr.fmove_op
944 + and type I.fsize = Instr.fsize
945 + and type I.instr = Instr.instr
946 + and type I.instruction = Instr.instruction
947 + and type I.isize = Instr.isize
948 + and type I.move = Instr.move
949 + and type I.multDivOp = Instr.multDivOp
950 + and type I.operand = Instr.operand
951 + and type I.shiftOp = Instr.shiftOp
952 + and type I.unaryOp = Instr.unaryOp
953 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
954 + where type T.Basis.cond = Instr.T.Basis.cond
955 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
956 + and type T.Basis.ext = Instr.T.Basis.ext
957 + and type T.Basis.fcond = Instr.T.Basis.fcond
958 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
959 + and type T.Constant.const = Instr.T.Constant.const
960 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
961 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
962 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
963 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
964 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
965 + and type T.Region.region = Instr.T.Region.region
966 + and type T.ccexp = Instr.T.ccexp
967 + and type T.fexp = Instr.T.fexp
968 + (* and type T.labexp = Instr.T.labexp *)
969 + and type T.mlrisc = Instr.T.mlrisc
970 + and type T.oper = Instr.T.oper
971 + and type T.rep = Instr.T.rep
972 + and type T.rexp = Instr.T.rexp
973 + and type T.stm = Instr.T.stm
974 ) : INSTRUCTION_EMITTER =
977 diff --git a/amd64/flowgraph/amd64-darwin-pseudo-ops.sml b/amd64/flowgraph/amd64-darwin-pseudo-ops.sml
978 index de9238f..c60550a 100644
979 --- a/amd64/flowgraph/amd64-darwin-pseudo-ops.sml
980 +++ b/amd64/flowgraph/amd64-darwin-pseudo-ops.sml
982 functor AMD64DarwinPseudoOps (
985 - structure MLTreeEval : MLTREE_EVAL where T = T
986 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
987 + where type T.Basis.cond = T.Basis.cond
988 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
989 + and type T.Basis.ext = T.Basis.ext
990 + and type T.Basis.fcond = T.Basis.fcond
991 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
992 + and type T.Constant.const = T.Constant.const
993 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
994 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
995 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
996 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
997 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
998 + and type T.Region.region = T.Region.region
999 + and type T.ccexp = T.ccexp
1000 + and type T.fexp = T.fexp
1001 + (* and type T.labexp = T.labexp *)
1002 + and type T.mlrisc = T.mlrisc
1003 + and type T.oper = T.oper
1004 + and type T.rep = T.rep
1005 + and type T.rexp = T.rexp
1006 + and type T.stm = T.stm
1008 ) : PSEUDO_OPS_BASIS = struct
1010 diff --git a/amd64/flowgraph/amd64GasPseudoOps.sml b/amd64/flowgraph/amd64GasPseudoOps.sml
1011 index f9adca4..8addf5d 100644
1012 --- a/amd64/flowgraph/amd64GasPseudoOps.sml
1013 +++ b/amd64/flowgraph/amd64GasPseudoOps.sml
1016 functor AMD64GasPseudoOps (
1017 structure T : MLTREE
1018 - structure MLTreeEval : MLTREE_EVAL where T = T
1019 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
1020 + where type T.Basis.cond = T.Basis.cond
1021 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
1022 + and type T.Basis.ext = T.Basis.ext
1023 + and type T.Basis.fcond = T.Basis.fcond
1024 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
1025 + and type T.Constant.const = T.Constant.const
1026 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
1027 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
1028 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
1029 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
1030 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
1031 + and type T.Region.region = T.Region.region
1032 + and type T.ccexp = T.ccexp
1033 + and type T.fexp = T.fexp
1034 + (* and type T.labexp = T.labexp *)
1035 + and type T.mlrisc = T.mlrisc
1036 + and type T.oper = T.oper
1037 + and type T.rep = T.rep
1038 + and type T.rexp = T.rexp
1039 + and type T.stm = T.stm
1040 ) : PSEUDO_OPS_BASIS = struct
1042 structure PB = PseudoOpsBasisTyp
1043 diff --git a/amd64/instructions/amd64CompInstrExt.sml b/amd64/instructions/amd64CompInstrExt.sml
1044 index 981d4de..9afe8d7 100644
1045 --- a/amd64/instructions/amd64CompInstrExt.sml
1046 +++ b/amd64/instructions/amd64CompInstrExt.sml
1049 signature AMD64COMP_INSTR_EXT = sig
1050 structure I : AMD64INSTR
1051 - structure TS : MLTREE_STREAM
1053 - structure CFG : CONTROL_FLOW_GRAPH
1056 + structure TS : MLTREE_STREAM (* where T = I.T *)
1057 + where type T.Basis.cond = I.T.Basis.cond
1058 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
1059 + and type T.Basis.ext = I.T.Basis.ext
1060 + and type T.Basis.fcond = I.T.Basis.fcond
1061 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
1062 + and type T.Constant.const = I.T.Constant.const
1063 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
1064 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
1065 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
1066 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
1067 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
1068 + and type T.Region.region = I.T.Region.region
1069 + and type T.ccexp = I.T.ccexp
1070 + and type T.fexp = I.T.fexp
1071 + (* and type T.labexp = I.T.labexp *)
1072 + and type T.mlrisc = I.T.mlrisc
1073 + and type T.oper = I.T.oper
1074 + and type T.rep = I.T.rep
1075 + and type T.rexp = I.T.rexp
1076 + and type T.stm = I.T.stm
1077 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = TS.S.P *)
1078 + where type I.addressing_mode = I.addressing_mode
1079 + and type I.ea = I.ea
1080 + and type I.instr = I.instr
1081 + and type I.instruction = I.instruction
1082 + and type I.operand = I.operand
1083 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
1084 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
1085 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
1086 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
1087 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
1088 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
1089 + and type P.T.Constant.const = TS.S.P.T.Constant.const
1090 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
1091 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
1092 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
1093 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
1094 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
1095 + and type P.T.Region.region = TS.S.P.T.Region.region
1096 + and type P.T.ccexp = TS.S.P.T.ccexp
1097 + and type P.T.fexp = TS.S.P.T.fexp
1098 + (* and type P.T.labexp = TS.S.P.T.labexp *)
1099 + and type P.T.mlrisc = TS.S.P.T.mlrisc
1100 + and type P.T.oper = TS.S.P.T.oper
1101 + and type P.T.rep = TS.S.P.T.rep
1102 + and type P.T.rexp = TS.S.P.T.rexp
1103 + and type P.T.stm = TS.S.P.T.stm
1106 (I.instruction, I.C.cellset, I.operand, I.addressing_mode, CFG.cfg) TS.reducer
1107 @@ -26,11 +69,54 @@ end
1109 functor AMD64CompInstrExt
1110 ( structure I : AMD64INSTR
1111 - structure TS : MLTREE_STREAM
1113 - structure CFG : CONTROL_FLOW_GRAPH
1116 + structure TS : MLTREE_STREAM (* where T = I.T *)
1117 + where type T.Basis.cond = I.T.Basis.cond
1118 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
1119 + and type T.Basis.ext = I.T.Basis.ext
1120 + and type T.Basis.fcond = I.T.Basis.fcond
1121 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
1122 + and type T.Constant.const = I.T.Constant.const
1123 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
1124 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
1125 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
1126 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
1127 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
1128 + and type T.Region.region = I.T.Region.region
1129 + and type T.ccexp = I.T.ccexp
1130 + and type T.fexp = I.T.fexp
1131 + (* and type T.labexp = I.T.labexp *)
1132 + and type T.mlrisc = I.T.mlrisc
1133 + and type T.oper = I.T.oper
1134 + and type T.rep = I.T.rep
1135 + and type T.rexp = I.T.rexp
1136 + and type T.stm = I.T.stm
1137 + structure CFG : CONTROL_FLOW_GRAPH (* where P = TS.S.P and I = I *)
1138 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
1139 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
1140 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
1141 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
1142 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
1143 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
1144 + and type P.T.Constant.const = TS.S.P.T.Constant.const
1145 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
1146 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
1147 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
1148 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
1149 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
1150 + and type P.T.Region.region = TS.S.P.T.Region.region
1151 + and type P.T.ccexp = TS.S.P.T.ccexp
1152 + and type P.T.fexp = TS.S.P.T.fexp
1153 + (* and type P.T.labexp = TS.S.P.T.labexp *)
1154 + and type P.T.mlrisc = TS.S.P.T.mlrisc
1155 + and type P.T.oper = TS.S.P.T.oper
1156 + and type P.T.rep = TS.S.P.T.rep
1157 + and type P.T.rexp = TS.S.P.T.rexp
1158 + and type P.T.stm = TS.S.P.T.stm
1159 + where type I.addressing_mode = I.addressing_mode
1160 + and type I.ea = I.ea
1161 + and type I.instr = I.instr
1162 + and type I.instruction = I.instruction
1163 + and type I.operand = I.operand
1164 ) : AMD64COMP_INSTR_EXT =
1167 diff --git a/amd64/instructions/amd64Instr.sml b/amd64/instructions/amd64Instr.sml
1168 index ee0f136..a7ebf05 100644
1169 --- a/amd64/instructions/amd64Instr.sml
1170 +++ b/amd64/instructions/amd64Instr.sml
1172 signature AMD64INSTR =
1174 structure C : AMD64CELLS
1175 - structure CB : CELLS_BASIS = CellsBasis
1176 + structure CB : CELLS_BASIS (* = CellsBasis *)
1177 + where type CellSet.cellset = CellsBasis.CellSet.cellset
1178 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
1179 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
1180 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
1181 + and type cell = CellsBasis.cell
1182 + and type cellColor = CellsBasis.cellColor
1183 + and type cellkind = CellsBasis.cellkind
1184 + and type cellkindDesc = CellsBasis.cellkindDesc
1185 + and type cellkindInfo = CellsBasis.cellkindInfo
1186 structure T : MLTREE
1187 structure Constant: CONSTANT
1188 structure Region : REGION
1189 diff --git a/amd64/instructions/amd64Peephole.peep b/amd64/instructions/amd64Peephole.peep
1190 index c12b8ad..3a37542 100644
1191 --- a/amd64/instructions/amd64Peephole.peep
1192 +++ b/amd64/instructions/amd64Peephole.peep
1193 @@ -20,7 +20,27 @@ in
1194 functor AMD64Peephole
1195 (structure Instr : AMD64INSTR
1196 structure Eval : MLTREE_EVAL
1197 - sharing Instr.T = Eval.T
1198 + (* sharing Instr.T = Eval.T *)
1199 + where type T.Basis.cond = Instr.T.Basis.cond
1200 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
1201 + and type T.Basis.ext = Instr.T.Basis.ext
1202 + and type T.Basis.fcond = Instr.T.Basis.fcond
1203 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
1204 + and type T.Constant.const = Instr.T.Constant.const
1205 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
1206 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
1207 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
1208 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
1209 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
1210 + and type T.Region.region = Instr.T.Region.region
1211 + and type T.ccexp = Instr.T.ccexp
1212 + and type T.fexp = Instr.T.fexp
1213 + (* and type T.labexp = Instr.T.labexp *)
1214 + and type T.mlrisc = Instr.T.mlrisc
1215 + and type T.oper = Instr.T.oper
1216 + and type T.rep = Instr.T.rep
1217 + and type T.rexp = Instr.T.rexp
1218 + and type T.stm = Instr.T.stm
1222 diff --git a/amd64/instructions/amd64Peephole.sml b/amd64/instructions/amd64Peephole.sml
1223 index b561a67..a235b50 100644
1224 --- a/amd64/instructions/amd64Peephole.sml
1225 +++ b/amd64/instructions/amd64Peephole.sml
1226 @@ -12,7 +12,27 @@ functor AMD64Peephole(
1227 structure Eval : MLTREE_EVAL
1229 (*#line 23.7 "amd64Peephole.peep"*)
1230 - sharing Instr.T = Eval.T
1231 + (* sharing Instr.T = Eval.T *)
1232 + where type T.Basis.cond = Instr.T.Basis.cond
1233 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
1234 + and type T.Basis.ext = Instr.T.Basis.ext
1235 + and type T.Basis.fcond = Instr.T.Basis.fcond
1236 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
1237 + and type T.Constant.const = Instr.T.Constant.const
1238 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
1239 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
1240 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
1241 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
1242 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
1243 + and type T.Region.region = Instr.T.Region.region
1244 + and type T.ccexp = Instr.T.ccexp
1245 + and type T.fexp = Instr.T.fexp
1246 + (* and type T.labexp = Instr.T.labexp *)
1247 + and type T.mlrisc = Instr.T.mlrisc
1248 + and type T.oper = Instr.T.oper
1249 + and type T.rep = Instr.T.rep
1250 + and type T.rexp = Instr.T.rexp
1251 + and type T.stm = Instr.T.stm
1255 diff --git a/amd64/instructions/amd64Props.sml b/amd64/instructions/amd64Props.sml
1256 index 5ff322a..427c8f2 100644
1257 --- a/amd64/instructions/amd64Props.sml
1258 +++ b/amd64/instructions/amd64Props.sml
1259 @@ -15,10 +15,48 @@ signature AMD64INSN_PROPERTIES =
1261 functor AMD64Props (
1262 structure Instr : AMD64INSTR
1263 - structure MLTreeHash : MLTREE_HASH
1265 - structure MLTreeEval : MLTREE_EVAL
1267 + structure MLTreeHash : MLTREE_HASH (* where T = Instr.T *)
1268 + where type T.Basis.cond = Instr.T.Basis.cond
1269 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
1270 + and type T.Basis.ext = Instr.T.Basis.ext
1271 + and type T.Basis.fcond = Instr.T.Basis.fcond
1272 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
1273 + and type T.Constant.const = Instr.T.Constant.const
1274 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
1275 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
1276 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
1277 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
1278 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
1279 + and type T.Region.region = Instr.T.Region.region
1280 + and type T.ccexp = Instr.T.ccexp
1281 + and type T.fexp = Instr.T.fexp
1282 + (* and type T.labexp = Instr.T.labexp *)
1283 + and type T.mlrisc = Instr.T.mlrisc
1284 + and type T.oper = Instr.T.oper
1285 + and type T.rep = Instr.T.rep
1286 + and type T.rexp = Instr.T.rexp
1287 + and type T.stm = Instr.T.stm
1288 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
1289 + where type T.Basis.cond = Instr.T.Basis.cond
1290 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
1291 + and type T.Basis.ext = Instr.T.Basis.ext
1292 + and type T.Basis.fcond = Instr.T.Basis.fcond
1293 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
1294 + and type T.Constant.const = Instr.T.Constant.const
1295 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
1296 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
1297 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
1298 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
1299 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
1300 + and type T.Region.region = Instr.T.Region.region
1301 + and type T.ccexp = Instr.T.ccexp
1302 + and type T.fexp = Instr.T.fexp
1303 + (* and type T.labexp = Instr.T.labexp *)
1304 + and type T.mlrisc = Instr.T.mlrisc
1305 + and type T.oper = Instr.T.oper
1306 + and type T.rep = Instr.T.rep
1307 + and type T.rexp = Instr.T.rexp
1308 + and type T.stm = Instr.T.stm
1309 ) : AMD64INSN_PROPERTIES =
1312 @@ -42,7 +80,7 @@ functor AMD64Props (
1313 | ( I.CALL {cutsTo=_::_, ...} | I.CALLQ {cutsTo=_::_, ...} ) =>
1315 | ( I.JMP _ | I.JCC _ | I.RET _ | I.INTO ) => IK_JUMP
1316 - | ( I.CALL _ | I. CALLQ _ ) => IK_CALL
1317 + | ( I.CALL _ | I.CALLQ _ ) => IK_CALL
1318 | I.PHI {} => IK_PHI
1319 | I.SOURCE {} => IK_SOURCE
1320 | I.SINK {} => IK_SINK
1321 diff --git a/amd64/mltree/amd64-gen.sml b/amd64/mltree/amd64-gen.sml
1322 index 881f16a..d14a94e 100644
1323 --- a/amd64/mltree/amd64-gen.sml
1324 +++ b/amd64/mltree/amd64-gen.sml
1328 structure I : AMD64INSTR
1329 - structure MLTreeUtils : MLTREE_UTILS
1331 - structure ExtensionComp : MLTREE_EXTENSION_COMP
1332 - where I = I and T = I.T
1333 + structure MLTreeUtils : MLTREE_UTILS (* where T = I.T *)
1334 + where type T.Basis.cond = I.T.Basis.cond
1335 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
1336 + and type T.Basis.ext = I.T.Basis.ext
1337 + and type T.Basis.fcond = I.T.Basis.fcond
1338 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
1339 + and type T.Constant.const = I.T.Constant.const
1340 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
1341 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
1342 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
1343 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
1344 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
1345 + and type T.Region.region = I.T.Region.region
1346 + and type T.ccexp = I.T.ccexp
1347 + and type T.fexp = I.T.fexp
1348 + (* and type T.labexp = I.T.labexp *)
1349 + and type T.mlrisc = I.T.mlrisc
1350 + and type T.oper = I.T.oper
1351 + and type T.rep = I.T.rep
1352 + and type T.rexp = I.T.rexp
1353 + and type T.stm = I.T.stm
1354 + structure ExtensionComp : MLTREE_EXTENSION_COMP (* where I = I and T = I.T *)
1355 + where type I.addressing_mode = I.addressing_mode
1356 + and type I.ea = I.ea
1357 + and type I.instr = I.instr
1358 + and type I.instruction = I.instruction
1359 + and type I.operand = I.operand
1360 + where type T.Basis.cond = I.T.Basis.cond
1361 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
1362 + and type T.Basis.ext = I.T.Basis.ext
1363 + and type T.Basis.fcond = I.T.Basis.fcond
1364 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
1365 + and type T.Constant.const = I.T.Constant.const
1366 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
1367 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
1368 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
1369 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
1370 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
1371 + and type T.Region.region = I.T.Region.region
1372 + and type T.ccexp = I.T.ccexp
1373 + and type T.fexp = I.T.fexp
1374 + (* and type T.labexp = I.T.labexp *)
1375 + and type T.mlrisc = I.T.mlrisc
1376 + and type T.oper = I.T.oper
1377 + and type T.rep = I.T.rep
1378 + and type T.rexp = I.T.rexp
1379 + and type T.stm = I.T.stm
1381 (* Take a number of bits and returns an rexp that points to a literal with the high bit set.
1382 * We need this literal value for floating-point negation and absolute value (at least
1383 diff --git a/amd64/omit-frameptr/amd64omit-frameptr.sml b/amd64/omit-frameptr/amd64omit-frameptr.sml
1384 index 5c122da..b079909 100644
1385 --- a/amd64/omit-frameptr/amd64omit-frameptr.sml
1386 +++ b/amd64/omit-frameptr/amd64omit-frameptr.sml
1389 functor AMD64OmitFramePointer (
1390 structure I : AMD64INSTR
1391 - structure CFG : CONTROL_FLOW_GRAPH where I = I): OMIT_FRAME_POINTER =
1392 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I *)
1393 + where type I.addressing_mode = I.addressing_mode
1394 + and type I.ea = I.ea
1395 + and type I.instr = I.instr
1396 + and type I.instruction = I.instruction
1397 + and type I.operand = I.operand): OMIT_FRAME_POINTER =
1399 - structure MemRegs : MEMORY_REGISTERS where I=I
1400 + structure MemRegs : MEMORY_REGISTERS (* where I = I *)
1401 + where type I.Constant.const = I.Constant.const
1402 + and type I.Region.region = I.Region.region
1403 + and type I.T.Basis.cond = I.T.Basis.cond
1404 + and type I.T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
1405 + and type I.T.Basis.ext = I.T.Basis.ext
1406 + and type I.T.Basis.fcond = I.T.Basis.fcond
1407 + and type I.T.Basis.rounding_mode = I.T.Basis.rounding_mode
1408 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
1409 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
1410 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
1411 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
1412 + and type I.T.I.div_rounding_mode = I.T.I.div_rounding_mode
1413 + and type I.T.ccexp = I.T.ccexp
1414 + and type I.T.fexp = I.T.fexp
1415 + (* and type I.T.labexp = I.T.labexp *)
1416 + and type I.T.mlrisc = I.T.mlrisc
1417 + and type I.T.oper = I.T.oper
1418 + and type I.T.rep = I.T.rep
1419 + and type I.T.rexp = I.T.rexp
1420 + and type I.T.stm = I.T.stm
1421 + (* and type I.addressing_mode = I.addressing_mode *)
1422 + and type I.binaryOp = I.binaryOp
1423 + and type I.bitOp = I.bitOp
1424 + and type I.cond = I.cond
1425 + and type I.fbinOp = I.fbinOp
1426 + and type I.fenvOp = I.fenvOp
1427 + and type I.fibinOp = I.fibinOp
1428 + and type I.fsize = I.fsize
1429 + and type I.funOp = I.funOp
1430 + and type I.instr = I.instr
1431 + and type I.instruction = I.instruction
1432 + and type I.isize = I.isize
1433 + and type I.move = I.move
1434 + and type I.multDivOp = I.multDivOp
1435 + and type I.operand = I.operand
1436 + and type I.shiftOp = I.shiftOp
1437 + and type I.unaryOp = I.unaryOp
1438 val memRegBase : CellsBasis.cell option
1441 diff --git a/amd64/ra/amd64RegAlloc.sml b/amd64/ra/amd64RegAlloc.sml
1442 index cf1b6f2..ef4fdd9 100644
1443 --- a/amd64/ra/amd64RegAlloc.sml
1444 +++ b/amd64/ra/amd64RegAlloc.sml
1446 functor AMD64RegAlloc (
1447 structure I : AMD64INSTR
1448 structure SpillHeur : RA_SPILL_HEURISTICS
1449 - structure Props : AMD64INSN_PROPERTIES
1451 - structure CFG : CONTROL_FLOW_GRAPH
1453 - structure Spill : RA_SPILL
1455 - structure Asm : INSTRUCTION_EMITTER
1458 + structure Props : AMD64INSN_PROPERTIES (* where I = I *)
1459 + where type I.addressing_mode = I.addressing_mode
1460 + and type I.ea = I.ea
1461 + and type I.instr = I.instr
1462 + and type I.instruction = I.instruction
1463 + and type I.operand = I.operand
1464 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I *)
1465 + where type I.addressing_mode = I.addressing_mode
1466 + and type I.ea = I.ea
1467 + and type I.instr = I.instr
1468 + and type I.instruction = I.instruction
1469 + and type I.operand = I.operand
1470 + structure Spill : RA_SPILL (* where I = I *)
1471 + where type I.addressing_mode = I.addressing_mode
1472 + and type I.ea = I.ea
1473 + and type I.instr = I.instr
1474 + and type I.instruction = I.instruction
1475 + and type I.operand = I.operand
1476 + structure Asm : INSTRUCTION_EMITTER (* where I = I and S.P = CFG.P *)
1477 + where type I.addressing_mode = I.addressing_mode
1478 + and type I.ea = I.ea
1479 + and type I.instr = I.instr
1480 + and type I.instruction = I.instruction
1481 + and type I.operand = I.operand
1482 + where type S.P.Client.pseudo_op = CFG.P.Client.pseudo_op
1483 + and type S.P.T.Basis.cond = CFG.P.T.Basis.cond
1484 + and type S.P.T.Basis.div_rounding_mode = CFG.P.T.Basis.div_rounding_mode
1485 + and type S.P.T.Basis.ext = CFG.P.T.Basis.ext
1486 + and type S.P.T.Basis.fcond = CFG.P.T.Basis.fcond
1487 + and type S.P.T.Basis.rounding_mode = CFG.P.T.Basis.rounding_mode
1488 + and type S.P.T.Constant.const = CFG.P.T.Constant.const
1489 + and type ('s,'r,'f,'c) S.P.T.Extension.ccx = ('s,'r,'f,'c) CFG.P.T.Extension.ccx
1490 + and type ('s,'r,'f,'c) S.P.T.Extension.fx = ('s,'r,'f,'c) CFG.P.T.Extension.fx
1491 + and type ('s,'r,'f,'c) S.P.T.Extension.rx = ('s,'r,'f,'c) CFG.P.T.Extension.rx
1492 + and type ('s,'r,'f,'c) S.P.T.Extension.sx = ('s,'r,'f,'c) CFG.P.T.Extension.sx
1493 + and type S.P.T.I.div_rounding_mode = CFG.P.T.I.div_rounding_mode
1494 + and type S.P.T.Region.region = CFG.P.T.Region.region
1495 + and type S.P.T.ccexp = CFG.P.T.ccexp
1496 + and type S.P.T.fexp = CFG.P.T.fexp
1497 + (* and type S.P.T.labexp = CFG.P.T.labexp *)
1498 + and type S.P.T.mlrisc = CFG.P.T.mlrisc
1499 + and type S.P.T.oper = CFG.P.T.oper
1500 + and type S.P.T.rep = CFG.P.T.rep
1501 + and type S.P.T.rexp = CFG.P.T.rexp
1502 + and type S.P.T.stm = CFG.P.T.stm
1505 datatype spill_operand_kind = SPILL_LOC
1506 @@ -138,17 +174,16 @@ functor AMD64RegAlloc (
1507 (* use the standard register allocator *)
1512 + (structure SpillHeuristics = SpillHeur
1513 + structure Flowgraph = MemoryRA
1516 + (structure Flowgraph = ClusterRA
1517 (structure Flowgraph = CFG
1519 structure InsnProps = Props
1520 structure Spill = Spill
1523 - (fun cellkind CB.GP = true
1524 + fun cellkind CB.GP = true
1525 | cellkind CB.FP = true
1526 | cellkind _ = false
1527 val deadRegs = deadRegs
1528 diff --git a/amd64/ra/amd64SpillInstr.sml b/amd64/ra/amd64SpillInstr.sml
1529 index 2be8cfd..3a66fc0 100644
1530 --- a/amd64/ra/amd64SpillInstr.sml
1531 +++ b/amd64/ra/amd64SpillInstr.sml
1534 functor AMD64SpillInstr (
1535 structure I : AMD64INSTR
1536 - structure Props : AMD64INSN_PROPERTIES
1538 + structure Props : AMD64INSN_PROPERTIES (* where I = I *)
1539 + where type I.addressing_mode = I.addressing_mode
1540 + and type I.ea = I.ea
1541 + and type I.instr = I.instr
1542 + and type I.instruction = I.instruction
1543 + and type I.operand = I.operand
1545 (* guaranteeing that floats are stored at 16-byte aligned addresses reduces the number of instructions *)
1546 val floats16ByteAligned : bool
1547 diff --git a/backpatch/backpatch.sml b/backpatch/backpatch.sml
1548 index 962bbf9..dceed1f 100644
1549 --- a/backpatch/backpatch.sml
1550 +++ b/backpatch/backpatch.sml
1554 (structure Emitter : INSTRUCTION_EMITTER
1555 - structure CFG : CONTROL_FLOW_GRAPH
1556 - where I = Emitter.I
1557 - and P = Emitter.S.P
1558 - structure Jumps : SDI_JUMPS
1560 - structure Props : INSN_PROPERTIES
1562 + structure CFG : CONTROL_FLOW_GRAPH (* where I = Emitter.I and P = Emitter.S.P *)
1563 + where type I.addressing_mode = Emitter.I.addressing_mode
1564 + and type I.ea = Emitter.I.ea
1565 + and type I.instr = Emitter.I.instr
1566 + and type I.instruction = Emitter.I.instruction
1567 + and type I.operand = Emitter.I.operand
1568 + where type P.Client.pseudo_op = Emitter.S.P.Client.pseudo_op
1569 + and type P.T.Basis.cond = Emitter.S.P.T.Basis.cond
1570 + and type P.T.Basis.div_rounding_mode = Emitter.S.P.T.Basis.div_rounding_mode
1571 + and type P.T.Basis.ext = Emitter.S.P.T.Basis.ext
1572 + and type P.T.Basis.fcond = Emitter.S.P.T.Basis.fcond
1573 + and type P.T.Basis.rounding_mode = Emitter.S.P.T.Basis.rounding_mode
1574 + and type P.T.Constant.const = Emitter.S.P.T.Constant.const
1575 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.ccx
1576 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.fx
1577 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.rx
1578 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.sx
1579 + and type P.T.I.div_rounding_mode = Emitter.S.P.T.I.div_rounding_mode
1580 + and type P.T.Region.region = Emitter.S.P.T.Region.region
1581 + and type P.T.ccexp = Emitter.S.P.T.ccexp
1582 + and type P.T.fexp = Emitter.S.P.T.fexp
1583 + (* and type P.T.labexp = Emitter.S.P.T.labexp *)
1584 + and type P.T.mlrisc = Emitter.S.P.T.mlrisc
1585 + and type P.T.oper = Emitter.S.P.T.oper
1586 + and type P.T.rep = Emitter.S.P.T.rep
1587 + and type P.T.rexp = Emitter.S.P.T.rexp
1588 + and type P.T.stm = Emitter.S.P.T.stm
1589 + structure Jumps : SDI_JUMPS (* where I = CFG.I *)
1590 + where type I.addressing_mode = CFG.I.addressing_mode
1591 + and type I.ea = CFG.I.ea
1592 + and type I.instr = CFG.I.instr
1593 + and type I.instruction = CFG.I.instruction
1594 + and type I.operand = CFG.I.operand
1595 + structure Props : INSN_PROPERTIES (* where I = CFG.I *)
1596 + where type I.addressing_mode = CFG.I.addressing_mode
1597 + and type I.ea = CFG.I.ea
1598 + and type I.instr = CFG.I.instr
1599 + and type I.instruction = CFG.I.instruction
1600 + and type I.operand = CFG.I.operand
1604 diff --git a/backpatch/sdi-jumps.sig b/backpatch/sdi-jumps.sig
1605 index d06e456..f63b5b7 100644
1606 --- a/backpatch/sdi-jumps.sig
1607 +++ b/backpatch/sdi-jumps.sig
1609 signature SDI_JUMPS = sig
1610 structure I : INSTRUCTIONS
1613 + (* sharing I.C = C *)
1615 val branchDelayedArch : bool
1617 diff --git a/backpatch/spanDep.sml b/backpatch/spanDep.sml
1618 index c26b29a..b2240c3 100644
1619 --- a/backpatch/spanDep.sml
1620 +++ b/backpatch/spanDep.sml
1623 functor SpanDependencyResolution
1624 (structure Emitter : INSTRUCTION_EMITTER
1625 - structure CFG : CONTROL_FLOW_GRAPH
1626 - where I = Emitter.I
1627 - and P = Emitter.S.P
1628 - structure Jumps : SDI_JUMPS
1630 - structure DelaySlot : DELAY_SLOT_PROPERTIES
1632 - structure Props : INSN_PROPERTIES
1634 - structure Asm : INSTRUCTION_EMITTER
1637 + structure CFG : CONTROL_FLOW_GRAPH (* where I = Emitter.I and P = Emitter.S.P *)
1638 + where type I.addressing_mode = Emitter.I.addressing_mode
1639 + and type I.ea = Emitter.I.ea
1640 + and type I.instr = Emitter.I.instr
1641 + and type I.instruction = Emitter.I.instruction
1642 + and type I.operand = Emitter.I.operand
1643 + where type P.Client.pseudo_op = Emitter.S.P.Client.pseudo_op
1644 + and type P.T.Basis.cond = Emitter.S.P.T.Basis.cond
1645 + and type P.T.Basis.div_rounding_mode = Emitter.S.P.T.Basis.div_rounding_mode
1646 + and type P.T.Basis.ext = Emitter.S.P.T.Basis.ext
1647 + and type P.T.Basis.fcond = Emitter.S.P.T.Basis.fcond
1648 + and type P.T.Basis.rounding_mode = Emitter.S.P.T.Basis.rounding_mode
1649 + and type P.T.Constant.const = Emitter.S.P.T.Constant.const
1650 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.ccx
1651 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.fx
1652 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.rx
1653 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.sx
1654 + and type P.T.I.div_rounding_mode = Emitter.S.P.T.I.div_rounding_mode
1655 + and type P.T.Region.region = Emitter.S.P.T.Region.region
1656 + and type P.T.ccexp = Emitter.S.P.T.ccexp
1657 + and type P.T.fexp = Emitter.S.P.T.fexp
1658 + (* and type P.T.labexp = Emitter.S.P.T.labexp *)
1659 + and type P.T.mlrisc = Emitter.S.P.T.mlrisc
1660 + and type P.T.oper = Emitter.S.P.T.oper
1661 + and type P.T.rep = Emitter.S.P.T.rep
1662 + and type P.T.rexp = Emitter.S.P.T.rexp
1663 + and type P.T.stm = Emitter.S.P.T.stm
1664 + structure Jumps : SDI_JUMPS (* where I = CFG.I *)
1665 + where type I.addressing_mode = CFG.I.addressing_mode
1666 + and type I.ea = CFG.I.ea
1667 + and type I.instr = CFG.I.instr
1668 + and type I.instruction = CFG.I.instruction
1669 + and type I.operand = CFG.I.operand
1670 + structure DelaySlot : DELAY_SLOT_PROPERTIES (* where I = CFG.I *)
1671 + where type I.addressing_mode = CFG.I.addressing_mode
1672 + and type I.ea = CFG.I.ea
1673 + and type I.instr = CFG.I.instr
1674 + and type I.instruction = CFG.I.instruction
1675 + and type I.operand = CFG.I.operand
1676 + structure Props : INSN_PROPERTIES (* where I = CFG.I *)
1677 + where type I.addressing_mode = CFG.I.addressing_mode
1678 + and type I.ea = CFG.I.ea
1679 + and type I.instr = CFG.I.instr
1680 + and type I.instruction = CFG.I.instruction
1681 + and type I.operand = CFG.I.operand
1682 + structure Asm : INSTRUCTION_EMITTER (* where I = CFG.I and S = Emitter.S *)
1683 + where type I.addressing_mode = CFG.I.addressing_mode
1684 + and type I.ea = CFG.I.ea
1685 + and type I.instr = CFG.I.instr
1686 + and type I.instruction = CFG.I.instruction
1687 + and type I.operand = CFG.I.operand
1688 + where type S.P.Client.pseudo_op = Emitter.S.P.Client.pseudo_op
1689 + and type S.P.T.Basis.cond = Emitter.S.P.T.Basis.cond
1690 + and type S.P.T.Basis.div_rounding_mode = Emitter.S.P.T.Basis.div_rounding_mode
1691 + and type S.P.T.Basis.ext = Emitter.S.P.T.Basis.ext
1692 + and type S.P.T.Basis.fcond = Emitter.S.P.T.Basis.fcond
1693 + and type S.P.T.Basis.rounding_mode = Emitter.S.P.T.Basis.rounding_mode
1694 + and type S.P.T.Constant.const = Emitter.S.P.T.Constant.const
1695 + and type ('s,'r,'f,'c) S.P.T.Extension.ccx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.ccx
1696 + and type ('s,'r,'f,'c) S.P.T.Extension.fx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.fx
1697 + and type ('s,'r,'f,'c) S.P.T.Extension.rx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.rx
1698 + and type ('s,'r,'f,'c) S.P.T.Extension.sx = ('s,'r,'f,'c) Emitter.S.P.T.Extension.sx
1699 + and type S.P.T.I.div_rounding_mode = Emitter.S.P.T.I.div_rounding_mode
1700 + and type S.P.T.Region.region = Emitter.S.P.T.Region.region
1701 + and type S.P.T.ccexp = Emitter.S.P.T.ccexp
1702 + and type S.P.T.fexp = Emitter.S.P.T.fexp
1703 + (* and type S.P.T.labexp = Emitter.S.P.T.labexp *)
1704 + and type S.P.T.mlrisc = Emitter.S.P.T.mlrisc
1705 + and type S.P.T.oper = Emitter.S.P.T.oper
1706 + and type S.P.T.rep = Emitter.S.P.T.rep
1707 + and type S.P.T.rexp = Emitter.S.P.T.rexp
1708 + and type S.P.T.stm = Emitter.S.P.T.stm
1709 + and type ('a,'b,'c,'d) S.stream = ('a,'b,'c,'d) Emitter.S.stream
1713 diff --git a/backpatch/vlBackPatch.sml b/backpatch/vlBackPatch.sml
1714 index 78f639a..3366e4c 100644
1715 --- a/backpatch/vlBackPatch.sml
1716 +++ b/backpatch/vlBackPatch.sml
1719 (structure CodeString : CODE_STRING
1720 structure Jumps : SDI_JUMPS
1721 - structure Props : INSN_PROPERTIES
1723 - structure Emitter : MC_EMIT
1725 - structure CFG : CONTROL_FLOW_GRAPH
1726 - where I = Emitter.I
1727 - structure Asm : INSTRUCTION_EMITTER
1728 - where I = CFG.I) =
1729 + structure Props : INSN_PROPERTIES (* where I = Jumps.I *)
1730 + where type I.addressing_mode = Jumps.I.addressing_mode
1731 + and type I.ea = Jumps.I.ea
1732 + and type I.instr = Jumps.I.instr
1733 + and type I.instruction = Jumps.I.instruction
1734 + and type I.operand = Jumps.I.operand
1735 + structure Emitter : MC_EMIT (* where I = Props.I *)
1736 + where type I.addressing_mode = Props.I.addressing_mode
1737 + and type I.ea = Props.I.ea
1738 + and type I.instr = Props.I.instr
1739 + and type I.instruction = Props.I.instruction
1740 + and type I.operand = Props.I.operand
1741 + structure CFG : CONTROL_FLOW_GRAPH (* where I = Emitter.I *)
1742 + where type I.addressing_mode = Emitter.I.addressing_mode
1743 + and type I.ea = Emitter.I.ea
1744 + and type I.instr = Emitter.I.instr
1745 + and type I.instruction = Emitter.I.instruction
1746 + and type I.operand = Emitter.I.operand
1747 + structure Asm : INSTRUCTION_EMITTER (* where I = CFG.I *)
1748 + where type I.addressing_mode = CFG.I.addressing_mode
1749 + and type I.ea = CFG.I.ea
1750 + and type I.instr = CFG.I.instr
1751 + and type I.instruction = CFG.I.instruction
1752 + and type I.operand = CFG.I.operand
1755 structure I = Jumps.I
1757 diff --git a/block-placement/block-placement.sml b/block-placement/block-placement.sml
1758 index 702f584..6066578 100644
1759 --- a/block-placement/block-placement.sml
1760 +++ b/block-placement/block-placement.sml
1763 functor BlockPlacement
1764 (structure CFG : CONTROL_FLOW_GRAPH
1765 - structure Props : INSN_PROPERTIES
1768 - : BLOCK_PLACEMENT =
1769 + structure Props : INSN_PROPERTIES (* where I = CFG.I *)
1770 + where type I.addressing_mode = CFG.I.addressing_mode
1771 + and type I.ea = CFG.I.ea
1772 + and type I.instr = CFG.I.instr
1773 + and type I.instruction = CFG.I.instruction
1774 + and type I.operand = CFG.I.operand
1775 + ) : BLOCK_PLACEMENT =
1779 diff --git a/block-placement/check-placement-fn.sml b/block-placement/check-placement-fn.sml
1780 index 6eae5d7..009daa9 100644
1781 --- a/block-placement/check-placement-fn.sml
1782 +++ b/block-placement/check-placement-fn.sml
1784 functor CheckPlacementFn (
1786 structure CFG : CONTROL_FLOW_GRAPH
1787 - structure InsnProps : INSN_PROPERTIES
1789 + structure InsnProps : INSN_PROPERTIES (* where I = CFG.I *)
1790 + where type I.addressing_mode = CFG.I.addressing_mode
1791 + and type I.ea = CFG.I.ea
1792 + and type I.instr = CFG.I.instr
1793 + and type I.instruction = CFG.I.instruction
1794 + and type I.operand = CFG.I.operand
1798 diff --git a/block-placement/jump-chain-elim-fn.sml b/block-placement/jump-chain-elim-fn.sml
1799 index 678da26..ceb242f 100644
1800 --- a/block-placement/jump-chain-elim-fn.sml
1801 +++ b/block-placement/jump-chain-elim-fn.sml
1803 functor JumpChainElimFn (
1805 structure CFG : CONTROL_FLOW_GRAPH
1806 - structure InsnProps : INSN_PROPERTIES
1808 + structure InsnProps : INSN_PROPERTIES (* where I = CFG.I *)
1809 + where type I.addressing_mode = CFG.I.addressing_mode
1810 + and type I.ea = CFG.I.ea
1811 + and type I.instr = CFG.I.instr
1812 + and type I.instruction = CFG.I.instruction
1813 + and type I.operand = CFG.I.operand
1815 (* Control flag that when set true allows jumps to labels outside
1816 * of the CFG to be chained. Set this false when there are many
1817 diff --git a/block-placement/weighted-block-placement-fn.sml b/block-placement/weighted-block-placement-fn.sml
1818 index 4668215..1f7a704 100644
1819 --- a/block-placement/weighted-block-placement-fn.sml
1820 +++ b/block-placement/weighted-block-placement-fn.sml
1822 functor WeightedBlockPlacementFn (
1824 structure CFG : CONTROL_FLOW_GRAPH
1825 - structure InsnProps : INSN_PROPERTIES
1827 + structure InsnProps : INSN_PROPERTIES (* where I = CFG.I *)
1828 + where type I.addressing_mode = CFG.I.addressing_mode
1829 + and type I.ea = CFG.I.ea
1830 + and type I.instr = CFG.I.instr
1831 + and type I.instruction = CFG.I.instruction
1832 + and type I.operand = CFG.I.operand
1834 ) : BLOCK_PLACEMENT = struct
1836 diff --git a/c-call/archs/x86-64-svid-fn.sml b/c-call/archs/x86-64-svid-fn.sml
1837 index 96f29f9..c7e5620 100644
1838 --- a/c-call/archs/x86-64-svid-fn.sml
1839 +++ b/c-call/archs/x86-64-svid-fn.sml
1840 @@ -75,7 +75,7 @@ functor X86_64SVIDFn (
1841 val calleeSaveRegs = [C.rbx, C.r12, C.r13, C.r14, C.r15]
1842 val callerSaveRegs = [C.rax, C.rcx, C.rdx, C.rsi, C.rdi, C.r8, C.r9, C.r10, C.r11]
1843 val callerSaveFRegs = (C.Regs CB.FP {from=0, to=15, step=1})
1844 - val calleeSaveFRegs = []
1845 + val calleeSaveFRegs : T.reg list = []
1847 val frameAlignB = 16
1849 diff --git a/c-call/gen/c-call-sig.sml b/c-call/gen/c-call-sig.sml
1850 index 35718b0..9d07716 100644
1851 --- a/c-call/gen/c-call-sig.sml
1852 +++ b/c-call/gen/c-call-sig.sml
1853 @@ -3,7 +3,27 @@ signature C_CALL =
1855 structure T : MLTREE
1856 structure Gen : C_CALL_GEN
1859 + where type T.Basis.cond = T.Basis.cond
1860 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
1861 + and type T.Basis.ext = T.Basis.ext
1862 + and type T.Basis.fcond = T.Basis.fcond
1863 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
1864 + and type T.Constant.const = T.Constant.const
1865 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
1866 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
1867 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
1868 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
1869 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
1870 + and type T.Region.region = T.Region.region
1871 + and type T.ccexp = T.ccexp
1872 + and type T.fexp = T.fexp
1873 + (* and type T.labexp = T.labexp *)
1874 + and type T.mlrisc = T.mlrisc
1875 + and type T.oper = T.oper
1876 + and type T.rep = T.rep
1877 + and type T.rexp = T.rexp
1878 + and type T.stm = T.stm
1880 datatype c_arg = datatype Gen.c_arg
1882 diff --git a/c-calls/unimplemented-c-calls.sml b/c-calls/unimplemented-c-calls.sml
1883 index 507a247..3f6bbc6 100644
1884 --- a/c-calls/unimplemented-c-calls.sml
1885 +++ b/c-calls/unimplemented-c-calls.sml
1888 functor UnimplementedCCallsFn
1889 (structure T: MLTREE
1890 - val impossible: string -> 'a) :> C_CALLS where T = T =
1891 + val impossible: string -> 'a) :> C_CALLS (* where T = T *)
1892 + where type T.Basis.cond = T.Basis.cond
1893 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
1894 + and type T.Basis.ext = T.Basis.ext
1895 + and type T.Basis.fcond = T.Basis.fcond
1896 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
1897 + and type T.Constant.const = T.Constant.const
1898 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
1899 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
1900 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
1901 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
1902 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
1903 + and type T.Region.region = T.Region.region
1904 + and type T.ccexp = T.ccexp
1905 + and type T.fexp = T.fexp
1906 + (* and type T.labexp = T.labexp *)
1907 + and type T.mlrisc = T.mlrisc
1908 + and type T.oper = T.oper
1909 + and type T.rep = T.rep
1910 + and type T.rexp = T.rexp
1911 + and type T.stm = T.stm =
1915 diff --git a/cm/Lib.cm b/cm/Lib.cm
1916 index 1105cf0..9d28dc1 100644
1920 (* This file is created by makeallcm *)
1922 + signature ARRAY_NONEQ
1923 signature ANNOTATIONS
1926 @@ -37,6 +38,7 @@ is
1930 + ../library/array-noneq.sig
1931 ../library/annotations.sig
1932 ../library/annotations.sml
1933 ../library/bitset.sig
1934 diff --git a/cm/proxyLib.cm b/cm/proxyLib.cm
1935 new file mode 100644
1936 index 0000000..72c35c1
1938 +++ b/cm/proxyLib.cm
1941 + group(proxyGrp.cm)
1945 +bind:(anchor:ALPHA.cm value:.)
1946 +bind:(anchor:ALPHA-GC.cm value:.)
1947 +bind:(anchor:ALPHA-Peephole.cm value:.)
1948 +bind:(anchor:ALPHA-RTL.cm value:.)
1949 +bind:(anchor:ALPHA-Sched.cm value:.)
1950 +bind:(anchor:ALPHA-SSA.cm value:.)
1951 +bind:(anchor:AMD64.cm value:.)
1952 +bind:(anchor:AMD64-GC.cm value:.)
1953 +bind:(anchor:AMD64-Peephole.cm value:.)
1954 +bind:(anchor:AMD64-RTL.cm value:.)
1955 +bind:(anchor:AMD64-Sched.cm value:.)
1956 +bind:(anchor:AMD64-SSA.cm value:.)
1957 +bind:(anchor:CCall.cm value:.)
1958 +bind:(anchor:CCall-sparc.cm value:.)
1959 +bind:(anchor:CCall-x86-64.cm value:.)
1960 +bind:(anchor:CCall-x86.cm value:.)
1961 +bind:(anchor:Control.cm value:.)
1962 +bind:(anchor:GC.cm value:.)
1963 +bind:(anchor:Graphs.cm value:.)
1964 +bind:(anchor:HPPA.cm value:.)
1965 +bind:(anchor:HPPA-GC.cm value:.)
1966 +bind:(anchor:HPPA-RTL.cm value:.)
1967 +bind:(anchor:HPPA-Sched.cm value:.)
1968 +bind:(anchor:HPPA-SSA.cm value:.)
1969 +bind:(anchor:IA32.cm value:.)
1970 +bind:(anchor:IA32-GC.cm value:.)
1971 +bind:(anchor:IA32-Peephole.cm value:.)
1972 +bind:(anchor:IA32-RTL.cm value:.)
1973 +bind:(anchor:IA32-Sched.cm value:.)
1974 +bind:(anchor:IA32-SSA.cm value:.)
1975 +bind:(anchor:ir-archive.cm value:.)
1976 +bind:(anchor:IR.cm value:.)
1977 +bind:(anchor:Lib.cm value:.)
1978 +bind:(anchor:MIPS.cm value:.)
1979 +bind:(anchor:MLRISC.cm value:.)
1980 +bind:(anchor:MLTREE.cm value:.)
1981 +bind:(anchor:Opt.cm value:.)
1982 +bind:(anchor:Peephole.cm value:.)
1983 +bind:(anchor:PPC.cm value:.)
1984 +bind:(anchor:PPC-GC.cm value:.)
1985 +bind:(anchor:PPC-Sched.cm value:.)
1986 +bind:(anchor:RA.cm value:.)
1987 +bind:(anchor:Region.cm value:.)
1988 +bind:(anchor:RTL.cm value:.)
1989 +bind:(anchor:Sched.cm value:.)
1990 +bind:(anchor:SPARC.cm value:.)
1991 +bind:(anchor:SPARC-GC.cm value:.)
1992 +bind:(anchor:SPARC-Peephole.cm value:.)
1993 +bind:(anchor:SPARC-RTL.cm value:.)
1994 +bind:(anchor:SPARC-Sched.cm value:.)
1995 +bind:(anchor:SPARC-SSA.cm value:.)
1996 +bind:(anchor:SSA.cm value:.)
1997 +bind:(anchor:StagedAlloc.cm value:.)
1998 +bind:(anchor:Visual.cm value:.)
1999 +bind:(anchor:VLIW.cm value:.)
2001 diff --git a/emit/cfgEmit.sml b/emit/cfgEmit.sml
2002 index 4b0393e..6795ba0 100644
2003 --- a/emit/cfgEmit.sml
2004 +++ b/emit/cfgEmit.sml
2008 (structure E : INSTRUCTION_EMITTER
2009 - structure CFG : CONTROL_FLOW_GRAPH
2011 - and P = E.S.P) : ASSEMBLY_EMITTER =
2012 + structure CFG : CONTROL_FLOW_GRAPH (* where I = E.I and P = E.S.P *)
2013 + where type I.addressing_mode = E.I.addressing_mode
2014 + and type I.ea = E.I.ea
2015 + and type I.instr = E.I.instr
2016 + and type I.instruction = E.I.instruction
2017 + and type I.operand = E.I.operand
2018 + where type P.Client.pseudo_op = E.S.P.Client.pseudo_op
2019 + and type P.T.Basis.cond = E.S.P.T.Basis.cond
2020 + and type P.T.Basis.div_rounding_mode = E.S.P.T.Basis.div_rounding_mode
2021 + and type P.T.Basis.ext = E.S.P.T.Basis.ext
2022 + and type P.T.Basis.fcond = E.S.P.T.Basis.fcond
2023 + and type P.T.Basis.rounding_mode = E.S.P.T.Basis.rounding_mode
2024 + and type P.T.Constant.const = E.S.P.T.Constant.const
2025 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) E.S.P.T.Extension.ccx
2026 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) E.S.P.T.Extension.fx
2027 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) E.S.P.T.Extension.rx
2028 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) E.S.P.T.Extension.sx
2029 + and type P.T.I.div_rounding_mode = E.S.P.T.I.div_rounding_mode
2030 + and type P.T.Region.region = E.S.P.T.Region.region
2031 + and type P.T.ccexp = E.S.P.T.ccexp
2032 + and type P.T.fexp = E.S.P.T.fexp
2033 + (* and type P.T.labexp = E.S.P.T.labexp *)
2034 + and type P.T.mlrisc = E.S.P.T.mlrisc
2035 + and type P.T.oper = E.S.P.T.oper
2036 + and type P.T.rep = E.S.P.T.rep
2037 + and type P.T.rexp = E.S.P.T.rexp
2038 + and type P.T.stm = E.S.P.T.stm
2039 + ) : ASSEMBLY_EMITTER =
2043 diff --git a/flowgraph/buildFlowgraph.sml b/flowgraph/buildFlowgraph.sml
2044 index a6d4582..533b83d 100644
2045 --- a/flowgraph/buildFlowgraph.sml
2046 +++ b/flowgraph/buildFlowgraph.sml
2047 @@ -9,9 +9,34 @@ sig
2048 structure S : INSTRUCTION_STREAM
2049 structure I : INSTRUCTIONS
2050 structure P : PSEUDO_OPS
2051 - structure CFG : CONTROL_FLOW_GRAPH
2054 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = P *)
2055 + where type I.addressing_mode = I.addressing_mode
2056 + and type I.ea = I.ea
2057 + and type I.instr = I.instr
2058 + and type I.instruction = I.instruction
2059 + and type I.operand = I.operand
2060 + where type P.Client.pseudo_op = P.Client.pseudo_op
2061 + and type P.T.Basis.cond = P.T.Basis.cond
2062 + and type P.T.Basis.div_rounding_mode = P.T.Basis.div_rounding_mode
2063 + and type P.T.Basis.ext = P.T.Basis.ext
2064 + and type P.T.Basis.fcond = P.T.Basis.fcond
2065 + and type P.T.Basis.rounding_mode = P.T.Basis.rounding_mode
2066 + and type P.T.Constant.const = P.T.Constant.const
2067 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) P.T.Extension.ccx
2068 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) P.T.Extension.fx
2069 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) P.T.Extension.rx
2070 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) P.T.Extension.sx
2071 + and type P.T.I.div_rounding_mode = P.T.I.div_rounding_mode
2072 + and type P.T.Region.region = P.T.Region.region
2073 + and type P.T.ccexp = P.T.ccexp
2074 + and type P.T.fexp = P.T.fexp
2075 + (* and type P.T.labexp = P.T.labexp *)
2076 + and type P.T.mlrisc = P.T.mlrisc
2077 + and type P.T.oper = P.T.oper
2078 + and type P.T.rep = P.T.rep
2079 + and type P.T.rexp = P.T.rexp
2080 + and type P.T.stm = P.T.stm
2083 * This creates an emitter which can be used to build a CFG incrementally
2085 @@ -26,9 +51,33 @@ end
2086 functor BuildFlowgraph
2087 (structure Props : INSN_PROPERTIES
2088 structure Stream : INSTRUCTION_STREAM
2089 - structure CFG : CONTROL_FLOW_GRAPH
2092 + structure CFG : CONTROL_FLOW_GRAPH (* where I = Props.I and P = Stream.P *)
2093 + where type I.addressing_mode = Props.I.addressing_mode
2094 + and type I.ea = Props.I.ea
2095 + and type I.instr = Props.I.instr
2096 + and type I.instruction = Props.I.instruction
2097 + and type I.operand = Props.I.operand
2098 + where type P.Client.pseudo_op = Stream.P.Client.pseudo_op
2099 + and type P.T.Basis.cond = Stream.P.T.Basis.cond
2100 + and type P.T.Basis.div_rounding_mode = Stream.P.T.Basis.div_rounding_mode
2101 + and type P.T.Basis.ext = Stream.P.T.Basis.ext
2102 + and type P.T.Basis.fcond = Stream.P.T.Basis.fcond
2103 + and type P.T.Basis.rounding_mode = Stream.P.T.Basis.rounding_mode
2104 + and type P.T.Constant.const = Stream.P.T.Constant.const
2105 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Stream.P.T.Extension.ccx
2106 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Stream.P.T.Extension.fx
2107 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Stream.P.T.Extension.rx
2108 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Stream.P.T.Extension.sx
2109 + and type P.T.I.div_rounding_mode = Stream.P.T.I.div_rounding_mode
2110 + and type P.T.Region.region = Stream.P.T.Region.region
2111 + and type P.T.ccexp = Stream.P.T.ccexp
2112 + and type P.T.fexp = Stream.P.T.fexp
2113 + (* and type P.T.labexp = Stream.P.T.labexp *)
2114 + and type P.T.mlrisc = Stream.P.T.mlrisc
2115 + and type P.T.oper = Stream.P.T.oper
2116 + and type P.T.rep = Stream.P.T.rep
2117 + and type P.T.rexp = Stream.P.T.rexp
2118 + and type P.T.stm = Stream.P.T.stm
2119 ) : CONTROL_FLOWGRAPH_GEN =
2122 diff --git a/flowgraph/cfg.sml b/flowgraph/cfg.sml
2123 index 430cfdd..49c3f61 100644
2124 --- a/flowgraph/cfg.sml
2125 +++ b/flowgraph/cfg.sml
2127 functor ControlFlowGraph
2128 (structure I : INSTRUCTIONS
2129 structure GraphImpl : GRAPH_IMPLEMENTATION
2130 - structure InsnProps : INSN_PROPERTIES where I = I
2131 - structure Asm : INSTRUCTION_EMITTER where I = I
2132 + structure InsnProps : INSN_PROPERTIES (* where I = I *)
2133 + where type I.addressing_mode = I.addressing_mode
2134 + and type I.ea = I.ea
2135 + and type I.instr = I.instr
2136 + and type I.instruction = I.instruction
2137 + and type I.operand = I.operand
2138 + structure Asm : INSTRUCTION_EMITTER (* where I = I *)
2139 + where type I.addressing_mode = I.addressing_mode
2140 + and type I.ea = I.ea
2141 + and type I.instr = I.instr
2142 + and type I.instruction = I.instruction
2143 + and type I.operand = I.operand
2144 ) : CONTROL_FLOW_GRAPH =
2147 diff --git a/flowgraph/cfgCountCopies.sml b/flowgraph/cfgCountCopies.sml
2148 index d02d2b5..9c68c03 100644
2149 --- a/flowgraph/cfgCountCopies.sml
2150 +++ b/flowgraph/cfgCountCopies.sml
2153 functor CFGCountCopies
2154 ( structure CFG : CONTROL_FLOW_GRAPH
2155 - structure InsnProps : INSN_PROPERTIES
2157 - structure SdiJumps : SDI_JUMPS
2159 + structure InsnProps : INSN_PROPERTIES (* where I = CFG.I *)
2160 + where type I.addressing_mode = CFG.I.addressing_mode
2161 + and type I.ea = CFG.I.ea
2162 + and type I.instr = CFG.I.instr
2163 + and type I.instruction = CFG.I.instruction
2164 + and type I.operand = CFG.I.operand
2165 + structure SdiJumps : SDI_JUMPS (* where I = CFG.I *)
2166 + where type I.addressing_mode = CFG.I.addressing_mode
2167 + and type I.ea = CFG.I.ea
2168 + and type I.instr = CFG.I.instr
2169 + and type I.instruction = CFG.I.instruction
2170 + and type I.operand = CFG.I.operand
2171 ) : CFG_OPTIMIZATION =
2174 diff --git a/flowgraph/cfgExpandCopies.sml b/flowgraph/cfgExpandCopies.sml
2175 index dc22908..2fc7240 100644
2176 --- a/flowgraph/cfgExpandCopies.sml
2177 +++ b/flowgraph/cfgExpandCopies.sml
2180 functor CFGExpandCopies
2181 (structure CFG : CONTROL_FLOW_GRAPH
2182 - structure Shuffle : SHUFFLE
2184 + structure Shuffle : SHUFFLE (* where I = CFG.I *)
2185 + where type I.addressing_mode = CFG.I.addressing_mode
2186 + and type I.ea = CFG.I.ea
2187 + and type I.instr = CFG.I.instr
2188 + and type I.instruction = CFG.I.instruction
2189 + and type I.operand = CFG.I.operand
2190 ) : CFG_OPTIMIZATION =
2193 diff --git a/flowgraph/cfgPeephole.sml b/flowgraph/cfgPeephole.sml
2194 index 9cf9fa8..f7b21db 100644
2195 --- a/flowgraph/cfgPeephole.sml
2196 +++ b/flowgraph/cfgPeephole.sml
2200 (structure CFG : CONTROL_FLOW_GRAPH
2201 - structure PeepHole : PEEPHOLE
2202 - sharing CFG.I = PeepHole.I
2203 + structure PeepHole : PEEPHOLE (* sharing CFG.I = PeepHole.I *)
2204 + where type I.addressing_mode = CFG.I.addressing_mode
2205 + and type I.ea = CFG.I.ea
2206 + and type I.instr = CFG.I.instr
2207 + and type I.instruction = CFG.I.instruction
2208 + and type I.operand = CFG.I.operand
2209 ) : CFG_OPTIMIZATION =
2212 diff --git a/flowgraph/printFlowgraph.sml b/flowgraph/printFlowgraph.sml
2213 index 84732fa..3c0718c 100644
2214 --- a/flowgraph/printFlowgraph.sml
2215 +++ b/flowgraph/printFlowgraph.sml
2217 signature PRINT_FLOWGRAPH =
2219 structure Asm : INSTRUCTION_EMITTER
2220 - structure CFG : CONTROL_FLOW_GRAPH
2223 + structure CFG : CONTROL_FLOW_GRAPH (* where I = Asm.I and P = Asm.S.P *)
2224 + where type I.addressing_mode = Asm.I.addressing_mode
2225 + and type I.ea = Asm.I.ea
2226 + and type I.instr = Asm.I.instr
2227 + and type I.instruction = Asm.I.instruction
2228 + and type I.operand = Asm.I.operand
2229 + where type P.Client.pseudo_op = Asm.S.P.Client.pseudo_op
2230 + and type P.T.Basis.cond = Asm.S.P.T.Basis.cond
2231 + and type P.T.Basis.div_rounding_mode = Asm.S.P.T.Basis.div_rounding_mode
2232 + and type P.T.Basis.ext = Asm.S.P.T.Basis.ext
2233 + and type P.T.Basis.fcond = Asm.S.P.T.Basis.fcond
2234 + and type P.T.Basis.rounding_mode = Asm.S.P.T.Basis.rounding_mode
2235 + and type P.T.Constant.const = Asm.S.P.T.Constant.const
2236 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Asm.S.P.T.Extension.ccx
2237 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Asm.S.P.T.Extension.fx
2238 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Asm.S.P.T.Extension.rx
2239 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Asm.S.P.T.Extension.sx
2240 + and type P.T.I.div_rounding_mode = Asm.S.P.T.I.div_rounding_mode
2241 + and type P.T.Region.region = Asm.S.P.T.Region.region
2242 + and type P.T.ccexp = Asm.S.P.T.ccexp
2243 + and type P.T.fexp = Asm.S.P.T.fexp
2244 + (* and type P.T.labexp = Asm.S.P.T.labexp *)
2245 + and type P.T.mlrisc = Asm.S.P.T.mlrisc
2246 + and type P.T.oper = Asm.S.P.T.oper
2247 + and type P.T.rep = Asm.S.P.T.rep
2248 + and type P.T.rexp = Asm.S.P.T.rexp
2249 + and type P.T.stm = Asm.S.P.T.stm
2251 val printCFG : TextIO.outstream -> string -> CFG.cfg -> unit
2253 @@ -15,9 +39,33 @@ end
2255 functor PrintFlowgraph
2256 (structure Asm : INSTRUCTION_EMITTER
2257 - structure CFG : CONTROL_FLOW_GRAPH
2260 + structure CFG : CONTROL_FLOW_GRAPH (* where I = Asm.I and P = Asm.S.P *)
2261 + where type I.addressing_mode = Asm.I.addressing_mode
2262 + and type I.ea = Asm.I.ea
2263 + and type I.instr = Asm.I.instr
2264 + and type I.instruction = Asm.I.instruction
2265 + and type I.operand = Asm.I.operand
2266 + where type P.Client.pseudo_op = Asm.S.P.Client.pseudo_op
2267 + and type P.T.Basis.cond = Asm.S.P.T.Basis.cond
2268 + and type P.T.Basis.div_rounding_mode = Asm.S.P.T.Basis.div_rounding_mode
2269 + and type P.T.Basis.ext = Asm.S.P.T.Basis.ext
2270 + and type P.T.Basis.fcond = Asm.S.P.T.Basis.fcond
2271 + and type P.T.Basis.rounding_mode = Asm.S.P.T.Basis.rounding_mode
2272 + and type P.T.Constant.const = Asm.S.P.T.Constant.const
2273 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Asm.S.P.T.Extension.ccx
2274 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Asm.S.P.T.Extension.fx
2275 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Asm.S.P.T.Extension.rx
2276 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Asm.S.P.T.Extension.sx
2277 + and type P.T.I.div_rounding_mode = Asm.S.P.T.I.div_rounding_mode
2278 + and type P.T.Region.region = Asm.S.P.T.Region.region
2279 + and type P.T.ccexp = Asm.S.P.T.ccexp
2280 + and type P.T.fexp = Asm.S.P.T.fexp
2281 + (* and type P.T.labexp = Asm.S.P.T.labexp *)
2282 + and type P.T.mlrisc = Asm.S.P.T.mlrisc
2283 + and type P.T.oper = Asm.S.P.T.oper
2284 + and type P.T.rep = Asm.S.P.T.rep
2285 + and type P.T.rexp = Asm.S.P.T.rexp
2286 + and type P.T.stm = Asm.S.P.T.stm
2287 ) : PRINT_FLOWGRAPH =
2290 diff --git a/flowgraph/pseudo-ops-big.sml b/flowgraph/pseudo-ops-big.sml
2291 index 6834f48..7a31d3c 100644
2292 --- a/flowgraph/pseudo-ops-big.sml
2293 +++ b/flowgraph/pseudo-ops-big.sml
2296 functor PseudoOpsBig
2297 ( structure T : MLTREE
2298 - structure MLTreeEval : MLTREE_EVAL
2300 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
2301 + where type T.Basis.cond = T.Basis.cond
2302 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
2303 + and type T.Basis.ext = T.Basis.ext
2304 + and type T.Basis.fcond = T.Basis.fcond
2305 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
2306 + and type T.Constant.const = T.Constant.const
2307 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
2308 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
2309 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
2310 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
2311 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
2312 + and type T.Region.region = T.Region.region
2313 + and type T.ccexp = T.ccexp
2314 + and type T.fexp = T.fexp
2315 + (* and type T.labexp = T.labexp *)
2316 + and type T.mlrisc = T.mlrisc
2317 + and type T.oper = T.oper
2318 + and type T.rep = T.rep
2319 + and type T.rexp = T.rexp
2320 + and type T.stm = T.stm
2321 val icache_alignment : int (* cache line size *)
2322 val max_alignment : int option (* maximum alignment for internal labels *)
2323 val nop: {sz:int, en:Word32.word} (* encoding for noop *)
2324 diff --git a/flowgraph/pseudo-ops-little.sml b/flowgraph/pseudo-ops-little.sml
2325 index 2d433cd..38b180e 100644
2326 --- a/flowgraph/pseudo-ops-little.sml
2327 +++ b/flowgraph/pseudo-ops-little.sml
2330 functor PseudoOpsLittle
2331 ( structure T : MLTREE
2332 - structure MLTreeEval : MLTREE_EVAL
2334 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
2335 + where type T.Basis.cond = T.Basis.cond
2336 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
2337 + and type T.Basis.ext = T.Basis.ext
2338 + and type T.Basis.fcond = T.Basis.fcond
2339 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
2340 + and type T.Constant.const = T.Constant.const
2341 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
2342 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
2343 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
2344 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
2345 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
2346 + and type T.Region.region = T.Region.region
2347 + and type T.ccexp = T.ccexp
2348 + and type T.fexp = T.fexp
2349 + (* and type T.labexp = T.labexp *)
2350 + and type T.mlrisc = T.mlrisc
2351 + and type T.oper = T.oper
2352 + and type T.rep = T.rep
2353 + and type T.rexp = T.rexp
2354 + and type T.stm = T.stm
2355 val icache_alignment : int (* cache line size *)
2356 val max_alignment : int option (* maximum alignment for internal labels *)
2357 val nop: {sz:int, en:Word32.word} (* encoding for noop *)
2358 diff --git a/flowgraph/pseudo-ops.sig b/flowgraph/pseudo-ops.sig
2359 index f5165c9..7f0b394 100644
2360 --- a/flowgraph/pseudo-ops.sig
2361 +++ b/flowgraph/pseudo-ops.sig
2364 signature PSEUDO_OPS = sig
2365 structure T : MLTREE
2366 - structure Client : CLIENT_PSEUDO_OPS where AsmPseudoOps.T = T
2367 + structure Client : CLIENT_PSEUDO_OPS (* where AsmPseudoOps.T = T *)
2368 + where type AsmPseudoOps.T.Basis.cond = T.Basis.cond
2369 + and type AsmPseudoOps.T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
2370 + and type AsmPseudoOps.T.Basis.ext = T.Basis.ext
2371 + and type AsmPseudoOps.T.Basis.fcond = T.Basis.fcond
2372 + and type AsmPseudoOps.T.Basis.rounding_mode = T.Basis.rounding_mode
2373 + and type AsmPseudoOps.T.Constant.const = T.Constant.const
2374 + and type ('s,'r,'f,'c) AsmPseudoOps.T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
2375 + and type ('s,'r,'f,'c) AsmPseudoOps.T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
2376 + and type ('s,'r,'f,'c) AsmPseudoOps.T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
2377 + and type ('s,'r,'f,'c) AsmPseudoOps.T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
2378 + and type AsmPseudoOps.T.I.div_rounding_mode = T.I.div_rounding_mode
2379 + and type AsmPseudoOps.T.Region.region = T.Region.region
2380 + and type AsmPseudoOps.T.ccexp = T.ccexp
2381 + and type AsmPseudoOps.T.fexp = T.fexp
2382 + (* and type AsmPseudoOps.T.labexp = T.labexp *)
2383 + and type AsmPseudoOps.T.mlrisc = T.mlrisc
2384 + and type AsmPseudoOps.T.oper = T.oper
2385 + and type AsmPseudoOps.T.rep = T.rep
2386 + and type AsmPseudoOps.T.rexp = T.rexp
2387 + and type AsmPseudoOps.T.stm = T.stm
2389 type pseudo_op = (T.labexp, Client.pseudo_op) PseudoOpsBasisTyp.pseudo_op
2391 diff --git a/frequencies/compute-freqs-fn.sml b/frequencies/compute-freqs-fn.sml
2392 index 2c701ce..cc41c8d 100644
2393 --- a/frequencies/compute-freqs-fn.sml
2394 +++ b/frequencies/compute-freqs-fn.sml
2395 @@ -40,9 +40,9 @@ functor ComputeFreqsFn (
2397 (***** Representation of equations *****)
2398 type var = Graph.node_id
2399 + type term = (real * var)
2400 + type sum = {terms : term list, c : real}
2401 datatype def = Unknown | Sum of sum
2402 - withtype term = (real * var)
2403 - and sum = {terms : term list, c : real}
2405 val zero = {c = 0.0, terms = []}
2406 val one = {c = 1.0, terms = []}
2407 diff --git a/gc-safety/gc-cells.sig b/gc-safety/gc-cells.sig
2408 index c70e143..09f8388 100644
2409 --- a/gc-safety/gc-cells.sig
2410 +++ b/gc-safety/gc-cells.sig
2411 @@ -8,7 +8,16 @@ sig
2414 structure GC : GC_TYPE
2415 - structure CB : CELLS_BASIS = CellsBasis
2416 + structure CB : CELLS_BASIS (* = CellsBasis *)
2417 + where type CellSet.cellset = CellsBasis.CellSet.cellset
2418 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
2419 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
2420 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
2421 + and type cell = CellsBasis.cell
2422 + and type cellColor = CellsBasis.cellColor
2423 + and type cellkind = CellsBasis.cellkind
2424 + and type cellkindDesc = CellsBasis.cellkindDesc
2425 + and type cellkindInfo = CellsBasis.cellkindInfo
2427 (* Generate a virtual register and update the gc info at the same time. *)
2428 val newCell : CB.cellkind -> GC.gctype -> CB.cell
2429 diff --git a/graphs/digraph.sml b/graphs/digraph.sml
2430 index 44d341a..005c015 100644
2431 --- a/graphs/digraph.sml
2432 +++ b/graphs/digraph.sml
2437 -functor DirectedGraph(A : ARRAY) :
2438 +functor DirectedGraph(A : ARRAY_NONEQ) :
2439 sig include GRAPH_IMPLEMENTATION
2441 type 'e adjlist = 'e Graph.edge list A.array
2442 diff --git a/hppa/backpatch/hppaDelaySlotProps.sml b/hppa/backpatch/hppaDelaySlotProps.sml
2443 index 5b2ffbb..da1d324 100644
2444 --- a/hppa/backpatch/hppaDelaySlotProps.sml
2445 +++ b/hppa/backpatch/hppaDelaySlotProps.sml
2448 functor HppaDelaySlots
2449 (structure I : HPPAINSTR
2450 - structure P : INSN_PROPERTIES where I = I
2451 + structure P : INSN_PROPERTIES (* where I = I *)
2452 + where type I.addressing_mode = I.addressing_mode
2453 + and type I.ea = I.ea
2454 + and type I.instr = I.instr
2455 + and type I.instruction = I.instruction
2456 + and type I.operand = I.operand
2457 ) : DELAY_SLOT_PROPERTIES =
2460 diff --git a/hppa/backpatch/hppaJumps.sml b/hppa/backpatch/hppaJumps.sml
2461 index df66191..fc3e049 100644
2462 --- a/hppa/backpatch/hppaJumps.sml
2463 +++ b/hppa/backpatch/hppaJumps.sml
2467 ( structure Instr:HPPAINSTR
2468 - structure Shuffle:HPPASHUFFLE
2470 - structure MLTreeEval : MLTREE_EVAL
2472 + structure Shuffle:HPPASHUFFLE (* where I = Instr *)
2473 + where type I.Constant.const = Instr.Constant.const
2474 + and type I.Region.region = Instr.Region.region
2475 + and type I.T.Basis.cond = Instr.T.Basis.cond
2476 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
2477 + and type I.T.Basis.ext = Instr.T.Basis.ext
2478 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
2479 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
2480 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
2481 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
2482 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
2483 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
2484 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
2485 + and type I.T.ccexp = Instr.T.ccexp
2486 + and type I.T.fexp = Instr.T.fexp
2487 + (* and type I.T.labexp = Instr.T.labexp *)
2488 + and type I.T.mlrisc = Instr.T.mlrisc
2489 + and type I.T.oper = Instr.T.oper
2490 + and type I.T.rep = Instr.T.rep
2491 + and type I.T.rexp = Instr.T.rexp
2492 + and type I.T.stm = Instr.T.stm
2493 + and type I.addressing_mode = Instr.addressing_mode
2494 + and type I.arith = Instr.arith
2495 + and type I.arithi = Instr.arithi
2496 + and type I.bcond = Instr.bcond
2497 + and type I.bitcond = Instr.bitcond
2498 + and type I.cmp = Instr.cmp
2499 + and type I.cmpi = Instr.cmpi
2500 + and type I.ea = Instr.ea
2501 + and type I.farith = Instr.farith
2502 + and type I.fcnv = Instr.fcnv
2503 + and type I.fcond = Instr.fcond
2504 + and type I.field_selector = Instr.field_selector
2505 + and type I.fload = Instr.fload
2506 + and type I.floadx = Instr.floadx
2507 + and type I.fmt = Instr.fmt
2508 + and type I.fstore = Instr.fstore
2509 + and type I.fstorex = Instr.fstorex
2510 + and type I.funary = Instr.funary
2511 + and type I.instr = Instr.instr
2512 + and type I.instruction = Instr.instruction
2513 + and type I.load = Instr.load
2514 + and type I.loadi = Instr.loadi
2515 + and type I.operand = Instr.operand
2516 + and type I.scond = Instr.scond
2517 + and type I.shift = Instr.shift
2518 + and type I.shiftv = Instr.shiftv
2519 + and type I.store = Instr.store
2520 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
2521 + where type T.Basis.cond = Instr.T.Basis.cond
2522 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
2523 + and type T.Basis.ext = Instr.T.Basis.ext
2524 + and type T.Basis.fcond = Instr.T.Basis.fcond
2525 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
2526 + and type T.Constant.const = Instr.T.Constant.const
2527 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
2528 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
2529 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
2530 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
2531 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
2532 + and type T.Region.region = Instr.T.Region.region
2533 + and type T.ccexp = Instr.T.ccexp
2534 + and type T.fexp = Instr.T.fexp
2535 + (* and type T.labexp = Instr.T.labexp *)
2536 + and type T.mlrisc = Instr.T.mlrisc
2537 + and type T.oper = Instr.T.oper
2538 + and type T.rep = Instr.T.rep
2539 + and type T.rexp = Instr.T.rexp
2540 + and type T.stm = Instr.T.stm
2544 diff --git a/hppa/emit/hppaAsm.sml b/hppa/emit/hppaAsm.sml
2545 index 734e0d1..be2453a 100644
2546 --- a/hppa/emit/hppaAsm.sml
2547 +++ b/hppa/emit/hppaAsm.sml
2551 functor HppaAsmEmitter(structure S : INSTRUCTION_STREAM
2552 - structure Instr : HPPAINSTR
2554 - structure Shuffle : HPPASHUFFLE
2556 - structure MLTreeEval : MLTREE_EVAL
2558 + structure Instr : HPPAINSTR (* where T = S.P.T *)
2559 + where type T.Basis.cond = S.P.T.Basis.cond
2560 + and type T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
2561 + and type T.Basis.ext = S.P.T.Basis.ext
2562 + and type T.Basis.fcond = S.P.T.Basis.fcond
2563 + and type T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
2564 + and type T.Constant.const = S.P.T.Constant.const
2565 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
2566 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
2567 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
2568 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
2569 + and type T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
2570 + and type T.Region.region = S.P.T.Region.region
2571 + and type T.ccexp = S.P.T.ccexp
2572 + and type T.fexp = S.P.T.fexp
2573 + (* and type T.labexp = S.P.T.labexp *)
2574 + and type T.mlrisc = S.P.T.mlrisc
2575 + and type T.oper = S.P.T.oper
2576 + and type T.rep = S.P.T.rep
2577 + and type T.rexp = S.P.T.rexp
2578 + and type T.stm = S.P.T.stm
2579 + structure Shuffle : HPPASHUFFLE (* where I = Instr *)
2580 + where type I.Constant.const = Instr.Constant.const
2581 + and type I.Region.region = Instr.Region.region
2582 + and type I.T.Basis.cond = Instr.T.Basis.cond
2583 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
2584 + and type I.T.Basis.ext = Instr.T.Basis.ext
2585 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
2586 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
2587 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
2588 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
2589 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
2590 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
2591 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
2592 + and type I.T.ccexp = Instr.T.ccexp
2593 + and type I.T.fexp = Instr.T.fexp
2594 + (* and type I.T.labexp = Instr.T.labexp *)
2595 + and type I.T.mlrisc = Instr.T.mlrisc
2596 + and type I.T.oper = Instr.T.oper
2597 + and type I.T.rep = Instr.T.rep
2598 + and type I.T.rexp = Instr.T.rexp
2599 + and type I.T.stm = Instr.T.stm
2600 + and type I.addressing_mode = Instr.addressing_mode
2601 + and type I.arith = Instr.arith
2602 + and type I.arithi = Instr.arithi
2603 + and type I.bcond = Instr.bcond
2604 + and type I.bitcond = Instr.bitcond
2605 + and type I.cmp = Instr.cmp
2606 + and type I.cmpi = Instr.cmpi
2607 + and type I.ea = Instr.ea
2608 + and type I.farith = Instr.farith
2609 + and type I.fcnv = Instr.fcnv
2610 + and type I.fcond = Instr.fcond
2611 + and type I.field_selector = Instr.field_selector
2612 + and type I.fload = Instr.fload
2613 + and type I.floadx = Instr.floadx
2614 + and type I.fmt = Instr.fmt
2615 + and type I.fstore = Instr.fstore
2616 + and type I.fstorex = Instr.fstorex
2617 + and type I.funary = Instr.funary
2618 + and type I.instr = Instr.instr
2619 + and type I.instruction = Instr.instruction
2620 + and type I.load = Instr.load
2621 + and type I.loadi = Instr.loadi
2622 + and type I.operand = Instr.operand
2623 + and type I.scond = Instr.scond
2624 + and type I.shift = Instr.shift
2625 + and type I.shiftv = Instr.shiftv
2626 + and type I.store = Instr.store
2627 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
2628 + where type T.Basis.cond = Instr.T.Basis.cond
2629 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
2630 + and type T.Basis.ext = Instr.T.Basis.ext
2631 + and type T.Basis.fcond = Instr.T.Basis.fcond
2632 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
2633 + and type T.Constant.const = Instr.T.Constant.const
2634 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
2635 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
2636 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
2637 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
2638 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
2639 + and type T.Region.region = Instr.T.Region.region
2640 + and type T.ccexp = Instr.T.ccexp
2641 + and type T.fexp = Instr.T.fexp
2642 + (* and type T.labexp = Instr.T.labexp *)
2643 + and type T.mlrisc = Instr.T.mlrisc
2644 + and type T.oper = Instr.T.oper
2645 + and type T.rep = Instr.T.rep
2646 + and type T.rexp = Instr.T.rexp
2647 + and type T.stm = Instr.T.stm
2648 ) : INSTRUCTION_EMITTER =
2651 diff --git a/hppa/emit/hppaMC.sml b/hppa/emit/hppaMC.sml
2652 index 17f49d6..681a610 100644
2653 --- a/hppa/emit/hppaMC.sml
2654 +++ b/hppa/emit/hppaMC.sml
2658 functor HppaMCEmitter(structure Instr : HPPAINSTR
2659 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
2660 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
2661 + where type T.Basis.cond = Instr.T.Basis.cond
2662 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
2663 + and type T.Basis.ext = Instr.T.Basis.ext
2664 + and type T.Basis.fcond = Instr.T.Basis.fcond
2665 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
2666 + and type T.Constant.const = Instr.T.Constant.const
2667 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
2668 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
2669 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
2670 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
2671 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
2672 + and type T.Region.region = Instr.T.Region.region
2673 + and type T.ccexp = Instr.T.ccexp
2674 + and type T.fexp = Instr.T.fexp
2675 + (* and type T.labexp = Instr.T.labexp *)
2676 + and type T.mlrisc = Instr.T.mlrisc
2677 + and type T.oper = Instr.T.oper
2678 + and type T.rep = Instr.T.rep
2679 + and type T.rexp = Instr.T.rexp
2680 + and type T.stm = Instr.T.stm
2681 structure Stream : INSTRUCTION_STREAM
2682 structure CodeString : CODE_STRING
2683 ) : INSTRUCTION_EMITTER =
2684 @@ -47,6 +67,7 @@ struct
2685 (* note: fromLargeWord strips the high order bits! *)
2688 + val w = W.toLargeWord w
2689 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
2691 fun doNothing _ = ()
2692 diff --git a/hppa/flowgraph/hppaGasPseudoOps.sml b/hppa/flowgraph/hppaGasPseudoOps.sml
2693 index 8e77f26..859cb7a 100644
2694 --- a/hppa/flowgraph/hppaGasPseudoOps.sml
2695 +++ b/hppa/flowgraph/hppaGasPseudoOps.sml
2697 functor HppaGasPseudoOps
2698 ( structure T : MLTREE
2699 - structure MLTreeEval : MLTREE_EVAL where T = T
2700 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
2701 + where type T.Basis.cond = T.Basis.cond
2702 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
2703 + and type T.Basis.ext = T.Basis.ext
2704 + and type T.Basis.fcond = T.Basis.fcond
2705 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
2706 + and type T.Constant.const = T.Constant.const
2707 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
2708 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
2709 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
2710 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
2711 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
2712 + and type T.Region.region = T.Region.region
2713 + and type T.ccexp = T.ccexp
2714 + and type T.fexp = T.fexp
2715 + (* and type T.labexp = T.labexp *)
2716 + and type T.mlrisc = T.mlrisc
2717 + and type T.oper = T.oper
2718 + and type T.rep = T.rep
2719 + and type T.rexp = T.rexp
2720 + and type T.stm = T.stm
2721 ) : PSEUDO_OPS_BASIS =
2724 diff --git a/hppa/instructions/hppaInstr.sml b/hppa/instructions/hppaInstr.sml
2725 index 069c26c..ff579c9 100644
2726 --- a/hppa/instructions/hppaInstr.sml
2727 +++ b/hppa/instructions/hppaInstr.sml
2729 signature HPPAINSTR =
2731 structure C : HPPACELLS
2732 - structure CB : CELLS_BASIS = CellsBasis
2733 + structure CB : CELLS_BASIS (* = CellsBasis *)
2734 + where type CellSet.cellset = CellsBasis.CellSet.cellset
2735 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
2736 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
2737 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
2738 + and type cell = CellsBasis.cell
2739 + and type cellColor = CellsBasis.cellColor
2740 + and type cellkind = CellsBasis.cellkind
2741 + and type cellkindDesc = CellsBasis.cellkindDesc
2742 + and type cellkindInfo = CellsBasis.cellkindInfo
2743 structure T : MLTREE
2744 structure Constant: CONSTANT
2745 structure Region : REGION
2746 diff --git a/hppa/instructions/hppaProps.sml b/hppa/instructions/hppaProps.sml
2747 index df9b170..2d0b5b0 100644
2748 --- a/hppa/instructions/hppaProps.sml
2749 +++ b/hppa/instructions/hppaProps.sml
2753 ( structure HppaInstr : HPPAINSTR
2754 - structure MLTreeEval : MLTREE_EVAL where T = HppaInstr.T
2755 - structure MLTreeHash : MLTREE_HASH where T = HppaInstr.T
2756 + structure MLTreeEval : MLTREE_EVAL (* where T = HppaInstr.T *)
2757 + where type T.Basis.cond = HppaInstr.T.Basis.cond
2758 + and type T.Basis.div_rounding_mode = HppaInstr.T.Basis.div_rounding_mode
2759 + and type T.Basis.ext = HppaInstr.T.Basis.ext
2760 + and type T.Basis.fcond = HppaInstr.T.Basis.fcond
2761 + and type T.Basis.rounding_mode = HppaInstr.T.Basis.rounding_mode
2762 + and type T.Constant.const = HppaInstr.T.Constant.const
2763 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) HppaInstr.T.Extension.ccx
2764 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) HppaInstr.T.Extension.fx
2765 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) HppaInstr.T.Extension.rx
2766 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) HppaInstr.T.Extension.sx
2767 + and type T.I.div_rounding_mode = HppaInstr.T.I.div_rounding_mode
2768 + and type T.Region.region = HppaInstr.T.Region.region
2769 + and type T.ccexp = HppaInstr.T.ccexp
2770 + and type T.fexp = HppaInstr.T.fexp
2771 + (* and type T.labexp = HppaInstr.T.labexp *)
2772 + and type T.mlrisc = HppaInstr.T.mlrisc
2773 + and type T.oper = HppaInstr.T.oper
2774 + and type T.rep = HppaInstr.T.rep
2775 + and type T.rexp = HppaInstr.T.rexp
2776 + and type T.stm = HppaInstr.T.stm
2777 + structure MLTreeHash : MLTREE_HASH (* where T = HppaInstr.T *)
2778 + where type T.Basis.cond = HppaInstr.T.Basis.cond
2779 + and type T.Basis.div_rounding_mode = HppaInstr.T.Basis.div_rounding_mode
2780 + and type T.Basis.ext = HppaInstr.T.Basis.ext
2781 + and type T.Basis.fcond = HppaInstr.T.Basis.fcond
2782 + and type T.Basis.rounding_mode = HppaInstr.T.Basis.rounding_mode
2783 + and type T.Constant.const = HppaInstr.T.Constant.const
2784 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) HppaInstr.T.Extension.ccx
2785 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) HppaInstr.T.Extension.fx
2786 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) HppaInstr.T.Extension.rx
2787 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) HppaInstr.T.Extension.sx
2788 + and type T.I.div_rounding_mode = HppaInstr.T.I.div_rounding_mode
2789 + and type T.Region.region = HppaInstr.T.Region.region
2790 + and type T.ccexp = HppaInstr.T.ccexp
2791 + and type T.fexp = HppaInstr.T.fexp
2792 + (* and type T.labexp = HppaInstr.T.labexp *)
2793 + and type T.mlrisc = HppaInstr.T.mlrisc
2794 + and type T.oper = HppaInstr.T.oper
2795 + and type T.rep = HppaInstr.T.rep
2796 + and type T.rexp = HppaInstr.T.rexp
2797 + and type T.stm = HppaInstr.T.stm
2798 ) : INSN_PROPERTIES =
2800 structure I = HppaInstr
2801 diff --git a/hppa/mltree/hppa.sml b/hppa/mltree/hppa.sml
2802 index 50a58b4..f1d8959 100644
2803 --- a/hppa/mltree/hppa.sml
2804 +++ b/hppa/mltree/hppa.sml
2805 @@ -14,14 +14,106 @@
2808 (structure HppaInstr : HPPAINSTR
2809 - structure ExtensionComp : MLTREE_EXTENSION_COMP
2810 - where I = HppaInstr
2811 - and T = HppaInstr.T
2812 - structure MilliCode : HPPA_MILLICODE
2813 - where I = HppaInstr
2814 - structure LabelComp : LABEL_COMP
2815 - where I = HppaInstr
2816 - and T = HppaInstr.T
2817 + structure ExtensionComp : MLTREE_EXTENSION_COMP (* where I = HppaInstr and T = HppaInstr.T *)
2818 + where type I.addressing_mode = HppaInstr.addressing_mode
2819 + and type I.ea = HppaInstr.ea
2820 + and type I.instr = HppaInstr.instr
2821 + and type I.instruction = HppaInstr.instruction
2822 + and type I.operand = HppaInstr.operand
2823 + where type T.Basis.cond = HppaInstr.T.Basis.cond
2824 + and type T.Basis.div_rounding_mode = HppaInstr.T.Basis.div_rounding_mode
2825 + and type T.Basis.ext = HppaInstr.T.Basis.ext
2826 + and type T.Basis.fcond = HppaInstr.T.Basis.fcond
2827 + and type T.Basis.rounding_mode = HppaInstr.T.Basis.rounding_mode
2828 + and type T.Constant.const = HppaInstr.T.Constant.const
2829 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) HppaInstr.T.Extension.ccx
2830 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) HppaInstr.T.Extension.fx
2831 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) HppaInstr.T.Extension.rx
2832 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) HppaInstr.T.Extension.sx
2833 + and type T.I.div_rounding_mode = HppaInstr.T.I.div_rounding_mode
2834 + and type T.Region.region = HppaInstr.T.Region.region
2835 + and type T.ccexp = HppaInstr.T.ccexp
2836 + and type T.fexp = HppaInstr.T.fexp
2837 + (* and type T.labexp = HppaInstr.T.labexp *)
2838 + and type T.mlrisc = HppaInstr.T.mlrisc
2839 + and type T.oper = HppaInstr.T.oper
2840 + and type T.rep = HppaInstr.T.rep
2841 + and type T.rexp = HppaInstr.T.rexp
2842 + and type T.stm = HppaInstr.T.stm
2843 + structure MilliCode : HPPA_MILLICODE (* where I = HppaInstr *)
2844 + where type I.Constant.const = HppaInstr.Constant.const
2845 + and type I.Region.region = HppaInstr.Region.region
2846 + and type I.T.Basis.cond = HppaInstr.T.Basis.cond
2847 + and type I.T.Basis.div_rounding_mode = HppaInstr.T.Basis.div_rounding_mode
2848 + and type I.T.Basis.ext = HppaInstr.T.Basis.ext
2849 + and type I.T.Basis.fcond = HppaInstr.T.Basis.fcond
2850 + and type I.T.Basis.rounding_mode = HppaInstr.T.Basis.rounding_mode
2851 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) HppaInstr.T.Extension.ccx
2852 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) HppaInstr.T.Extension.fx
2853 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) HppaInstr.T.Extension.rx
2854 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) HppaInstr.T.Extension.sx
2855 + and type I.T.I.div_rounding_mode = HppaInstr.T.I.div_rounding_mode
2856 + and type I.T.ccexp = HppaInstr.T.ccexp
2857 + and type I.T.fexp = HppaInstr.T.fexp
2858 + (* and type I.T.labexp = HppaInstr.T.labexp *)
2859 + and type I.T.mlrisc = HppaInstr.T.mlrisc
2860 + and type I.T.oper = HppaInstr.T.oper
2861 + and type I.T.rep = HppaInstr.T.rep
2862 + and type I.T.rexp = HppaInstr.T.rexp
2863 + and type I.T.stm = HppaInstr.T.stm
2864 + and type I.addressing_mode = HppaInstr.addressing_mode
2865 + and type I.arith = HppaInstr.arith
2866 + and type I.arithi = HppaInstr.arithi
2867 + and type I.bcond = HppaInstr.bcond
2868 + and type I.bitcond = HppaInstr.bitcond
2869 + and type I.cmp = HppaInstr.cmp
2870 + and type I.cmpi = HppaInstr.cmpi
2871 + and type I.ea = HppaInstr.ea
2872 + and type I.farith = HppaInstr.farith
2873 + and type I.fcnv = HppaInstr.fcnv
2874 + and type I.fcond = HppaInstr.fcond
2875 + and type I.field_selector = HppaInstr.field_selector
2876 + and type I.fload = HppaInstr.fload
2877 + and type I.floadx = HppaInstr.floadx
2878 + and type I.fmt = HppaInstr.fmt
2879 + and type I.fstore = HppaInstr.fstore
2880 + and type I.fstorex = HppaInstr.fstorex
2881 + and type I.funary = HppaInstr.funary
2882 + and type I.instr = HppaInstr.instr
2883 + and type I.instruction = HppaInstr.instruction
2884 + and type I.load = HppaInstr.load
2885 + and type I.loadi = HppaInstr.loadi
2886 + and type I.operand = HppaInstr.operand
2887 + and type I.scond = HppaInstr.scond
2888 + and type I.shift = HppaInstr.shift
2889 + and type I.shiftv = HppaInstr.shiftv
2890 + and type I.store = HppaInstr.store
2891 + structure LabelComp : LABEL_COMP (* where I = HppaInstr and T = HppaInstr.T *)
2892 + where type I.addressing_mode = HppaInstr.addressing_mode
2893 + and type I.ea = HppaInstr.ea
2894 + and type I.instr = HppaInstr.instr
2895 + and type I.instruction = HppaInstr.instruction
2896 + and type I.operand = HppaInstr.operand
2897 + where type T.Basis.cond = HppaInstr.T.Basis.cond
2898 + and type T.Basis.div_rounding_mode = HppaInstr.T.Basis.div_rounding_mode
2899 + and type T.Basis.ext = HppaInstr.T.Basis.ext
2900 + and type T.Basis.fcond = HppaInstr.T.Basis.fcond
2901 + and type T.Basis.rounding_mode = HppaInstr.T.Basis.rounding_mode
2902 + and type T.Constant.const = HppaInstr.T.Constant.const
2903 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) HppaInstr.T.Extension.ccx
2904 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) HppaInstr.T.Extension.fx
2905 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) HppaInstr.T.Extension.rx
2906 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) HppaInstr.T.Extension.sx
2907 + and type T.I.div_rounding_mode = HppaInstr.T.I.div_rounding_mode
2908 + and type T.Region.region = HppaInstr.T.Region.region
2909 + and type T.ccexp = HppaInstr.T.ccexp
2910 + and type T.fexp = HppaInstr.T.fexp
2911 + (* and type T.labexp = HppaInstr.T.labexp *)
2912 + and type T.mlrisc = HppaInstr.T.mlrisc
2913 + and type T.oper = HppaInstr.T.oper
2914 + and type T.rep = HppaInstr.T.rep
2915 + and type T.rexp = HppaInstr.T.rexp
2916 + and type T.stm = HppaInstr.T.stm
2917 val costOfMultiply : int ref
2918 val costOfDivision : int ref
2920 @@ -52,8 +144,8 @@ struct
2921 fun mkfcopy{dst, src, tmp} =
2922 I.COPY{k=CB.FP, sz=64, dst=dst, src=src, tmp=tmp}
2923 structure W = Word32
2924 - functor Multiply32 = MLTreeMult
2926 + structure Multiply32 = struct
2931 @@ -65,11 +157,12 @@ struct
2932 fun slli{r,i,d} = [I.shift{s=I.ZDEP,r=r,p=31-i,len=32-i,t=d}]
2933 fun srli{r,i,d} = [I.shift{s=I.EXTRU,r=r,p=31-i,len=32-i,t=d}]
2934 fun srai{r,i,d} = [I.shift{s=I.EXTRS,r=r,p=31-i,len=32-i,t=d}]
2938 (* signed, trapping version of multiply and divide *)
2939 - structure Mult32 = Multiply32
2940 - (val trapping = true
2941 + structure Mult32 = MLTreeMult
2943 + val trapping = true
2944 val multCost = costOfMultiply
2945 val divCost = costOfDivision
2946 fun addv{r1,r2,d} = [I.arith{a=I.ADDO,r1=r1,r2=r2,t=d}]
2947 @@ -77,12 +170,13 @@ struct
2948 val sh1addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH1ADDO,r1=r1,r2=r2,t=d}])
2949 val sh2addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH2ADDO,r1=r1,r2=r2,t=d}])
2950 val sh3addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH3ADDO,r1=r1,r2=r2,t=d}])
2952 - (val signed = true)
2954 + val signed = true)
2956 (* unsigned, non-trapping version of multiply and divide *)
2957 - structure Mulu32 = Multiply32
2958 - (val trapping = false
2959 + structure Mulu32 = MLTreeMult
2961 + val trapping = false
2962 val multCost = costOfMultiply
2963 val divCost = costOfDivision
2964 fun addv{r1,r2,d} = [I.arith{a=I.ADD,r1=r1,r2=r2,t=d}]
2965 @@ -90,12 +184,13 @@ struct
2966 val sh1addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH1ADDL,r1=r1,r2=r2,t=d}])
2967 val sh2addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH2ADDL,r1=r1,r2=r2,t=d}])
2968 val sh3addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH3ADDL,r1=r1,r2=r2,t=d}])
2970 - (val signed = false)
2972 + val signed = false)
2974 (* signed, non-trapping version of multiply and divide *)
2975 - structure Muls32 = Multiply32
2976 - (val trapping = false
2977 + structure Muls32 = MLTreeMult
2979 + val trapping = false
2980 val multCost = costOfMultiply
2981 val divCost = costOfDivision
2982 fun addv{r1,r2,d} = [I.arith{a=I.ADD,r1=r1,r2=r2,t=d}]
2983 @@ -103,8 +198,8 @@ struct
2984 val sh1addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH1ADDL,r1=r1,r2=r2,t=d}])
2985 val sh2addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH2ADDL,r1=r1,r2=r2,t=d}])
2986 val sh3addv = SOME(fn{r1,r2,d} => [I.arith{a=I.SH3ADDL,r1=r1,r2=r2,t=d}])
2988 - (val signed = true)
2990 + val signed = true)
2992 fun error msg = MLRiscErrorMsg.error("Hppa",msg)
2994 diff --git a/hppa/mltree/hppaMillicode.sig b/hppa/mltree/hppaMillicode.sig
2995 index 936dd90..d801996 100644
2996 --- a/hppa/mltree/hppaMillicode.sig
2997 +++ b/hppa/mltree/hppaMillicode.sig
2999 signature HPPA_MILLICODE = sig
3000 structure I : HPPAINSTR
3001 - structure CB : CELLS_BASIS = CellsBasis
3002 + structure CB : CELLS_BASIS (* = CellsBasis *)
3003 + where type CellSet.cellset = CellsBasis.CellSet.cellset
3004 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
3005 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
3006 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
3007 + and type cell = CellsBasis.cell
3008 + and type cellColor = CellsBasis.cellColor
3009 + and type cellkind = CellsBasis.cellkind
3010 + and type cellkindDesc = CellsBasis.cellkindDesc
3011 + and type cellkindInfo = CellsBasis.cellkindInfo
3013 val divu : {rs:CB.cell, rt:CB.cell, rd:CB.cell} -> I.instruction list
3014 val mulo : {rs:CB.cell, rt:CB.cell, rd:CB.cell} -> I.instruction list
3015 diff --git a/instructions/insnProps.sig b/instructions/insnProps.sig
3016 index 63fde27..29ed432 100644
3017 --- a/instructions/insnProps.sig
3018 +++ b/instructions/insnProps.sig
3019 @@ -7,7 +7,7 @@ signature INSN_PROPERTIES =
3021 structure I : INSTRUCTIONS
3024 + (* sharing I.C = C *)
3026 (* classify instructions *)
3027 datatype kind = IK_JUMP (* branches, including returns *)
3028 diff --git a/instructions/instructions.sig b/instructions/instructions.sig
3029 index cbd007c..eb8a1b3 100644
3030 --- a/instructions/instructions.sig
3031 +++ b/instructions/instructions.sig
3033 signature INSTRUCTIONS =
3036 - structure CB :CELLS_BASIS = CellsBasis
3037 + structure CB : CELLS_BASIS (* = CellsBasis *)
3038 + where type CellSet.cellset = CellsBasis.CellSet.cellset
3039 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
3040 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
3041 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
3042 + and type cell = CellsBasis.cell
3043 + and type cellColor = CellsBasis.cellColor
3044 + and type cellkind = CellsBasis.cellkind
3045 + and type cellkindDesc = CellsBasis.cellkindDesc
3046 + and type cellkindInfo = CellsBasis.cellkindInfo
3047 type operand (* operands supported by architecture *)
3048 type addressing_mode (* addressing mode *)
3049 type ea (* effective address for accessing memory *)
3050 diff --git a/instructions/mlriscAnnotations.sig b/instructions/mlriscAnnotations.sig
3051 index 36c14af..39d87eb 100644
3052 --- a/instructions/mlriscAnnotations.sig
3053 +++ b/instructions/mlriscAnnotations.sig
3055 signature MLRISC_ANNOTATIONS =
3058 - structure C : CELLS_BASIS = CellsBasis
3059 + structure C : CELLS_BASIS (* = CellsBasis *)
3060 + where type CellSet.cellset = CellsBasis.CellSet.cellset
3061 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
3062 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
3063 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
3064 + and type cell = CellsBasis.cell
3065 + and type cellColor = CellsBasis.cellColor
3066 + and type cellkind = CellsBasis.cellkind
3067 + and type cellkindDesc = CellsBasis.cellkindDesc
3068 + and type cellkindInfo = CellsBasis.cellkindInfo
3071 * The branch probability of conditional branches.
3072 diff --git a/library/array-noneq.sig b/library/array-noneq.sig
3073 new file mode 100644
3074 index 0000000..544c0fd
3076 +++ b/library/array-noneq.sig
3078 +signature ARRAY_NONEQ =
3083 + val all: ('a -> bool) -> 'a array -> bool
3084 + val app: ('a -> unit) -> 'a array -> unit
3085 + val appi: (int * 'a -> unit) -> 'a array -> unit
3086 + val array: int * 'a -> 'a array
3087 + val collate: ('a * 'a -> order) -> 'a array * 'a array -> order
3088 + val copy: {src: 'a array, dst: 'a array, di: int} -> unit
3089 + val copyVec: {src: 'a vector, dst: 'a array, di: int} -> unit
3090 + val exists: ('a -> bool) -> 'a array -> bool
3091 + val find: ('a -> bool) -> 'a array -> 'a option
3092 + val findi: (int * 'a -> bool) -> 'a array -> (int * 'a) option
3093 + val foldl: ('a * 'b -> 'b) -> 'b -> 'a array -> 'b
3094 + val foldli: (int * 'a * 'b -> 'b) -> 'b -> 'a array -> 'b
3095 + val foldr: ('a * 'b -> 'b) -> 'b -> 'a array -> 'b
3096 + val foldri: (int * 'a * 'b -> 'b) -> 'b -> 'a array -> 'b
3097 + val fromList: 'a list -> 'a array
3098 + val length: 'a array -> int
3100 + val modify: ('a -> 'a) -> 'a array -> unit
3101 + val modifyi: (int * 'a -> 'a) -> 'a array -> unit
3102 + val sub: 'a array * int -> 'a
3103 + val tabulate: int * (int -> 'a) -> 'a array
3104 + val update: 'a array * int * 'a -> unit
3105 + val vector: 'a array -> 'a vector
3108 + val toList: 'a array -> 'a list
3109 + val fromVector: 'a vector -> 'a array
3110 + val toVector: 'a array -> 'a vector
3114 +functor Chk(A : ARRAY) : ARRAY_NONEQ = A
3115 +functor Chk(A : ARRAY_NONEQ
3116 + where type 'a array = 'a array
3117 + where type 'a vector = 'a vector) : ARRAY = A
3119 diff --git a/library/dynamic-array.sml b/library/dynamic-array.sml
3120 index dc16832..5bd96e4 100644
3121 --- a/library/dynamic-array.sml
3122 +++ b/library/dynamic-array.sml
3125 structure DynArray : sig
3128 + include ARRAY_NONEQ
3130 val fromArray : 'a Array.array * 'a * int -> 'a array
3131 val baseArray : 'a array -> 'a Array.array
3132 @@ -97,6 +97,8 @@ structure DynArray : sig
3133 (* additional operations from Basis Library proposal 2015-003 *)
3134 fun toList arr = foldr (op ::) [] arr
3138 fun fromVector v = let
3139 val arr = A.fromVector v
3140 val default = A.sub(arr, 0)
3141 @@ -104,6 +106,7 @@ structure DynArray : sig
3142 ARRAY(ref arr, default, ref (A.length arr))
3144 handle _ => raise Size
3147 val toVector = vector
3149 diff --git a/library/hash-array.sml b/library/hash-array.sml
3150 index 074f3e8..1a76b66 100644
3151 --- a/library/hash-array.sml
3152 +++ b/library/hash-array.sml
3155 structure HashArray : sig
3158 + include ARRAY_NONEQ
3160 val array' : int * (int -> 'a) -> 'a array
3161 val array'': int * (int -> 'a) -> 'a array
3162 diff --git a/library/sources.cm b/library/sources.cm
3163 index 016ee18..cac4fae 100644
3164 --- a/library/sources.cm
3165 +++ b/library/sources.cm
3168 + signature ARRAY_NONEQ
3169 signature ANNOTATIONS
3170 structure Annotations
3172 @@ -21,6 +22,7 @@ is
3180 diff --git a/mlb/ALPHA.mlb b/mlb/ALPHA.mlb
3181 new file mode 100644
3182 index 0000000..57a929c
3188 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
3189 + "redundantBind warn" "redundantMatch warn"
3190 + "sequenceNonUnit ignore"
3191 + "warnUnused false" "forceUsed"
3192 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
3198 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
3202 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
3206 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
3210 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
3214 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
3218 + $(SML_LIB)/basis/pervasive.mlb
3222 + signature gs_0 = FREQUENCY_PROPERTIES
3227 + signature gs_1 = PROBABILITY
3228 + structure gs_2 = Probability
3233 + structure gs_3 = MLRiscAnnotations
3238 + signature gs_4 = REGION
3243 + signature gs_5 = CONSTANT
3248 + signature gs_6 = MLTREE
3253 + signature gs_7 = CELLS_BASIS
3258 + structure gs_8 = CellsBasis
3263 + structure gs_9 = Label
3268 + structure gs_10 = Annotations
3273 + functor gs_11 = Cells
3278 + structure gs_12 = Int
3283 + signature gs_13 = CELLS
3288 + signature gs_14 = MLRISC_ERROR_MSG
3289 + structure gs_15 = MLRiscErrorMsg
3292 + signature CELLS = gs_13
3293 + functor Cells = gs_11
3294 + structure CellsBasis = gs_8
3295 + structure Int = gs_12
3296 + signature MLRISC_ERROR_MSG = gs_14
3297 + structure MLRiscErrorMsg = gs_15
3298 + ../alpha/instructions/alphaCells.sml
3300 + signature gs_16 = ALPHACELLS
3301 + structure gs_17 = AlphaCells
3304 + signature ALPHACELLS = gs_16
3305 + structure AlphaCells = gs_17
3306 + structure Annotations = gs_10
3307 + signature CELLS_BASIS = gs_7
3308 + signature CONSTANT = gs_5
3309 + structure CellsBasis = gs_8
3310 + structure Label = gs_9
3311 + signature MLTREE = gs_6
3312 + signature REGION = gs_4
3313 + ../alpha/instructions/alphaInstr.sml
3315 + signature gs_18 = ALPHAINSTR
3316 + functor gs_19 = AlphaInstr
3319 + signature ALPHAINSTR = gs_18
3320 + functor AlphaInstr = gs_19
3321 + signature FREQUENCY_PROPERTIES = gs_0
3322 + structure MLRiscAnnotations = gs_3
3323 + signature PROBABILITY = gs_1
3324 + structure Probability = gs_2
3325 + ../alpha/instructions/alphaFreqProps.sml
3327 + functor gs_20 = AlphaFreqProps
3332 + signature gs_21 = INSN_PROPERTIES
3337 + structure gs_22 = Option
3342 + structure gs_23 = Word
3347 + signature gs_24 = MLTREE_EVAL
3352 + signature gs_25 = MLTREE_HASH
3355 + signature ALPHAINSTR = gs_18
3356 + functor AlphaInstr = gs_19
3357 + structure CellsBasis = gs_8
3358 + signature INSN_PROPERTIES = gs_21
3359 + structure Label = gs_9
3360 + signature MLRISC_ERROR_MSG = gs_14
3361 + structure MLRiscErrorMsg = gs_15
3362 + signature MLTREE_EVAL = gs_24
3363 + signature MLTREE_HASH = gs_25
3364 + structure Option = gs_22
3365 + structure Word = gs_23
3366 + ../alpha/instructions/alphaProps.sml
3368 + functor gs_26 = AlphaProps
3373 + signature gs_27 = SDI_JUMPS
3376 + signature ALPHAINSTR = gs_18
3377 + functor AlphaInstr = gs_19
3378 + structure CellsBasis = gs_8
3379 + ../alpha/instructions/alphaShuffle.sig
3381 + signature gs_28 = ALPHASHUFFLE
3384 + signature ALPHAINSTR = gs_18
3385 + signature ALPHASHUFFLE = gs_28
3386 + functor AlphaInstr = gs_19
3387 + structure CellsBasis = gs_8
3388 + structure Int = gs_12
3389 + signature MLRISC_ERROR_MSG = gs_14
3390 + structure MLRiscErrorMsg = gs_15
3391 + signature MLTREE_EVAL = gs_24
3392 + structure Option = gs_22
3393 + signature SDI_JUMPS = gs_27
3394 + ../alpha/backpatch/alphaJumps.sml
3396 + functor gs_29 = AlphaJumps
3401 + signature gs_30 = INSTRUCTION_EMITTER
3406 + signature gs_31 = ASM_FORMAT_UTIL
3407 + structure gs_32 = AsmFormatUtil
3412 + signature gs_33 = ASM_STREAM
3413 + structure gs_34 = AsmStream
3418 + structure gs_35 = TextIO
3423 + structure gs_36 = String
3428 + structure gs_37 = AsmFlags
3433 + signature gs_38 = INSTRUCTION_STREAM
3436 + signature ALPHAINSTR = gs_18
3437 + signature ALPHASHUFFLE = gs_28
3438 + signature ASM_FORMAT_UTIL = gs_31
3439 + signature ASM_STREAM = gs_33
3440 + functor AlphaInstr = gs_19
3441 + structure Annotations = gs_10
3442 + structure AsmFlags = gs_37
3443 + structure AsmFormatUtil = gs_32
3444 + structure AsmStream = gs_34
3445 + structure CellsBasis = gs_8
3446 + signature INSTRUCTION_EMITTER = gs_30
3447 + signature INSTRUCTION_STREAM = gs_38
3448 + structure Int = gs_12
3449 + signature MLRISC_ERROR_MSG = gs_14
3450 + structure MLRiscErrorMsg = gs_15
3451 + signature MLTREE_EVAL = gs_24
3452 + structure String = gs_36
3453 + structure TextIO = gs_35
3454 + ../alpha/emit/alphaAsm.sml
3456 + functor gs_39 = AlphaAsmEmitter
3459 + signature ALPHAINSTR = gs_18
3460 + functor AlphaInstr = gs_19
3461 + structure CellsBasis = gs_8
3462 + signature MLRISC_ERROR_MSG = gs_14
3463 + structure MLRiscErrorMsg = gs_15
3464 + ../alpha/ra/alphaRewrite.sml
3466 + functor gs_40 = AlphaRewrite
3471 + signature gs_41 = PSEUDO_OPS_BASIS
3476 + functor gs_42 = GasPseudoOps
3481 + functor gs_43 = PseudoOpsLittle
3486 + structure gs_44 = Format
3491 + structure gs_45 = PseudoOpsBasisTyp
3496 + structure gs_46 = Word32
3499 + structure Format = gs_44
3500 + functor GasPseudoOps = gs_42
3501 + signature MLRISC_ERROR_MSG = gs_14
3502 + structure MLRiscErrorMsg = gs_15
3503 + signature MLTREE = gs_6
3504 + signature MLTREE_EVAL = gs_24
3505 + signature PSEUDO_OPS_BASIS = gs_41
3506 + structure PseudoOpsBasisTyp = gs_45
3507 + functor PseudoOpsLittle = gs_43
3508 + structure Word32 = gs_46
3509 + ../alpha/flowgraph/alphaGasPseudoOps.sml
3511 + functor gs_47 = AlphaGasPseudoOps
3516 + signature gs_48 = ARCH_SPILL_INSTR
3519 + signature ALPHAINSTR = gs_18
3520 + signature ARCH_SPILL_INSTR = gs_48
3521 + functor AlphaInstr = gs_19
3522 + functor AlphaRewrite = gs_40
3523 + structure CellsBasis = gs_8
3524 + signature MLRISC_ERROR_MSG = gs_14
3525 + structure MLRiscErrorMsg = gs_15
3526 + ../alpha/ra/alphaSpillInstr.sml
3528 + functor gs_49 = AlphaSpillInstr
3533 + functor gs_50 = MLTreeMult
3538 + functor gs_51 = MLTreeGen
3543 + structure gs_52 = IntInf
3548 + structure gs_53 = Int32
3553 + structure gs_54 = List
3558 + signature gs_55 = MLTREECOMP
3559 + signature gs_56 = MLTREE_EXTENSION_COMP
3562 + signature ALPHACELLS = gs_16
3563 + signature ALPHAINSTR = gs_18
3564 + structure AlphaCells = gs_17
3565 + functor AlphaInstr = gs_19
3566 + signature CELLS_BASIS = gs_7
3567 + structure CellsBasis = gs_8
3568 + signature MLTREE = gs_6
3569 + ../alpha/mltree/alphaPseudoInstr.sig
3571 + signature gs_57 = ALPHA_PSEUDO_INSTR
3574 + signature ALPHAINSTR = gs_18
3575 + signature ALPHA_PSEUDO_INSTR = gs_57
3576 + functor AlphaInstr = gs_19
3577 + structure CellsBasis = gs_8
3578 + structure Int32 = gs_53
3579 + structure IntInf = gs_52
3580 + structure Label = gs_9
3581 + structure List = gs_54
3582 + signature MLRISC_ERROR_MSG = gs_14
3583 + structure MLRiscAnnotations = gs_3
3584 + structure MLRiscErrorMsg = gs_15
3585 + signature MLTREECOMP = gs_55
3586 + signature MLTREE_EXTENSION_COMP = gs_56
3587 + functor MLTreeGen = gs_51
3588 + functor MLTreeMult = gs_50
3589 + structure Word = gs_23
3590 + structure Word32 = gs_46
3591 + ../alpha/mltree/alpha.sml
3593 + functor gs_58 = Alpha
3598 + functor gs_59 = Shuffle
3601 + signature ALPHAINSTR = gs_18
3602 + signature ALPHASHUFFLE = gs_28
3603 + functor AlphaInstr = gs_19
3604 + structure CellsBasis = gs_8
3605 + signature MLRISC_ERROR_MSG = gs_14
3606 + structure MLRiscErrorMsg = gs_15
3607 + structure Option = gs_22
3608 + functor Shuffle = gs_59
3609 + ../alpha/instructions/alphaShuffle.sml
3611 + functor gs_60 = AlphaShuffle
3616 + structure gs_61 = Word8
3621 + signature gs_62 = CODE_STRING
3624 + signature ALPHAINSTR = gs_18
3625 + functor AlphaInstr = gs_19
3626 + signature CODE_STRING = gs_62
3627 + structure CellsBasis = gs_8
3628 + signature INSTRUCTION_EMITTER = gs_30
3629 + signature INSTRUCTION_STREAM = gs_38
3630 + structure Label = gs_9
3631 + signature MLRISC_ERROR_MSG = gs_14
3632 + structure MLRiscErrorMsg = gs_15
3633 + signature MLTREE_EVAL = gs_24
3634 + structure Option = gs_22
3635 + structure Word32 = gs_46
3636 + structure Word8 = gs_61
3637 + ../alpha/emit/alphaMC.sml
3639 + functor gs_63 = AlphaMCEmitter
3642 + signature ALPHACELLS = gs_16
3643 + signature ALPHAINSTR = gs_18
3644 + signature ALPHASHUFFLE = gs_28
3645 + signature ALPHA_PSEUDO_INSTR = gs_57
3646 + functor Alpha = gs_58
3647 + functor AlphaAsmEmitter = gs_39
3648 + structure AlphaCells = gs_17
3649 + functor AlphaFreqProps = gs_20
3650 + functor AlphaGasPseudoOps = gs_47
3651 + functor AlphaInstr = gs_19
3652 + functor AlphaJumps = gs_29
3653 + functor AlphaMCEmitter = gs_63
3654 + functor AlphaProps = gs_26
3655 + functor AlphaRewrite = gs_40
3656 + functor AlphaShuffle = gs_60
3657 + functor AlphaSpillInstr = gs_49
3662 diff --git a/mlb/AMD64-Peephole.mlb b/mlb/AMD64-Peephole.mlb
3663 new file mode 100644
3664 index 0000000..5002b9b
3666 +++ b/mlb/AMD64-Peephole.mlb
3670 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
3671 + "redundantBind warn" "redundantMatch warn"
3672 + "sequenceNonUnit ignore"
3673 + "warnUnused false" "forceUsed"
3674 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
3680 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
3684 + (* $Peephole.cm(=(proxyLib.cm):.)/Peephole.cm =??=> *) Peephole.mlb
3688 + (* $AMD64.cm(=(proxyLib.cm):.)/AMD64.cm =??=> *) AMD64.mlb
3692 + $(SML_LIB)/basis/pervasive.mlb
3696 + signature gs_0 = PEEPHOLE
3701 + structure gs_1 = CellsBasis
3706 + signature gs_2 = MLTREE_EVAL
3711 + signature gs_3 = AMD64INSTR
3712 + functor gs_4 = AMD64Instr
3715 + signature AMD64INSTR = gs_3
3716 + functor AMD64Instr = gs_4
3717 + structure CellsBasis = gs_1
3718 + signature MLTREE_EVAL = gs_2
3719 + signature PEEPHOLE = gs_0
3720 + ../amd64/instructions/amd64Peephole.sml
3722 + functor gs_5 = AMD64Peephole
3725 + functor AMD64Peephole = gs_5
3730 diff --git a/mlb/AMD64.mlb b/mlb/AMD64.mlb
3731 new file mode 100644
3732 index 0000000..15a15dd
3738 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
3739 + "redundantBind warn" "redundantMatch warn"
3740 + "sequenceNonUnit ignore"
3741 + "warnUnused false" "forceUsed"
3742 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
3748 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
3752 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
3756 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
3760 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
3764 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
3768 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
3772 + (* $MLTREE.cm(=(proxyLib.cm):.)/MLTREE.cm =??=> *) MLTREE.mlb
3776 + $(SML_LIB)/basis/pervasive.mlb
3780 + structure gs_0 = Int
3785 + signature gs_1 = REGION
3790 + signature gs_2 = CONSTANT
3795 + signature gs_3 = MLTREE
3800 + signature gs_4 = CELLS_BASIS
3805 + structure gs_5 = CellsBasis
3810 + structure gs_6 = Label
3815 + structure gs_7 = Int64
3820 + structure gs_8 = Int32
3825 + structure gs_9 = Annotations
3830 + functor gs_10 = Cells
3835 + signature gs_11 = CELLS
3840 + signature gs_12 = MLRISC_ERROR_MSG
3841 + structure gs_13 = MLRiscErrorMsg
3844 + signature CELLS = gs_11
3845 + functor Cells = gs_10
3846 + structure CellsBasis = gs_5
3847 + structure Int = gs_0
3848 + signature MLRISC_ERROR_MSG = gs_12
3849 + structure MLRiscErrorMsg = gs_13
3850 + ../amd64/instructions/amd64Cells.sml
3852 + signature gs_14 = AMD64CELLS
3853 + structure gs_15 = AMD64Cells
3856 + signature AMD64CELLS = gs_14
3857 + structure AMD64Cells = gs_15
3858 + structure Annotations = gs_9
3859 + signature CELLS_BASIS = gs_4
3860 + signature CONSTANT = gs_2
3861 + structure CellsBasis = gs_5
3862 + structure Int32 = gs_8
3863 + structure Int64 = gs_7
3864 + structure Label = gs_6
3865 + signature MLTREE = gs_3
3866 + signature REGION = gs_1
3867 + ../amd64/instructions/amd64Instr.sml
3869 + signature gs_16 = AMD64INSTR
3870 + functor gs_17 = AMD64Instr
3873 + signature AMD64INSTR = gs_16
3874 + functor AMD64Instr = gs_17
3875 + structure Int = gs_0
3876 + ../amd64/mltree/amd64-opcodes.sml
3878 + functor gs_18 = AMD64Opcodes
3883 + signature gs_19 = MC_EMIT
3888 + structure gs_20 = Word32
3893 + structure gs_21 = Word8
3898 + structure gs_22 = LargeWord
3903 + structure gs_23 = Word8Vector
3908 + structure gs_24 = Word
3913 + signature gs_25 = MLTREE_EVAL
3918 + functor gs_26 = Shuffle
3921 + signature AMD64INSTR = gs_16
3922 + functor AMD64Instr = gs_17
3923 + structure CellsBasis = gs_5
3924 + functor Shuffle = gs_26
3925 + ../amd64/instructions/amd64Shuffle.sml
3927 + signature gs_27 = AMD64SHUFFLE
3928 + functor gs_28 = AMD64Shuffle
3931 + signature AMD64INSTR = gs_16
3932 + functor AMD64Instr = gs_17
3933 + signature AMD64SHUFFLE = gs_27
3934 + functor AMD64Shuffle = gs_28
3935 + structure CellsBasis = gs_5
3936 + structure Int32 = gs_8
3937 + structure LargeWord = gs_22
3938 + signature MC_EMIT = gs_19
3939 + signature MLTREE_EVAL = gs_25
3940 + structure Word = gs_24
3941 + structure Word32 = gs_20
3942 + structure Word8 = gs_21
3943 + structure Word8Vector = gs_23
3944 + ../amd64/amd64MCFn.sml
3946 + functor gs_29 = AMD64MCFn
3951 + structure gs_30 = Word64
3956 + signature gs_31 = INSTRUCTION_EMITTER
3959 + signature AMD64INSTR = gs_16
3960 + functor AMD64Instr = gs_17
3961 + signature AMD64SHUFFLE = gs_27
3962 + functor AMD64Shuffle = gs_28
3963 + structure CellsBasis = gs_5
3964 + signature INSTRUCTION_EMITTER = gs_31
3965 + structure Int = gs_0
3966 + structure Int32 = gs_8
3967 + structure Int64 = gs_7
3968 + structure LargeWord = gs_22
3969 + signature MC_EMIT = gs_19
3970 + signature MLRISC_ERROR_MSG = gs_12
3971 + structure MLRiscErrorMsg = gs_13
3972 + signature MLTREE_EVAL = gs_25
3973 + structure Word = gs_24
3974 + structure Word32 = gs_20
3975 + structure Word64 = gs_30
3976 + structure Word8 = gs_21
3977 + structure Word8Vector = gs_23
3978 + ../amd64/amd64MC.sml
3980 + functor gs_32 = AMD64MCEmitter
3985 + signature gs_33 = OMIT_FRAME_POINTER
3990 + structure gs_34 = IntHashTable
3995 + signature gs_35 = MLRISC_CONTROL
3996 + structure gs_36 = MLRiscControl
4001 + structure gs_37 = MLRiscAnnotations
4006 + structure gs_38 = Graph
4011 + structure gs_39 = General
4016 + structure gs_40 = ListPair
4021 + structure gs_41 = Option
4026 + signature gs_42 = CONTROL_FLOW_GRAPH
4029 + signature AMD64INSTR = gs_16
4030 + functor AMD64Instr = gs_17
4031 + signature CONTROL_FLOW_GRAPH = gs_42
4032 + structure CellsBasis = gs_5
4033 + structure General = gs_39
4034 + structure Graph = gs_38
4035 + structure Int = gs_0
4036 + structure Int32 = gs_8
4037 + structure IntHashTable = gs_34
4038 + structure ListPair = gs_40
4039 + signature MLRISC_CONTROL = gs_35
4040 + signature MLRISC_ERROR_MSG = gs_12
4041 + structure MLRiscAnnotations = gs_37
4042 + structure MLRiscControl = gs_36
4043 + structure MLRiscErrorMsg = gs_13
4044 + signature OMIT_FRAME_POINTER = gs_33
4045 + structure Option = gs_41
4046 + ../amd64/omit-frameptr/amd64omit-frameptr.sml
4048 + functor gs_43 = AMD64OmitFramePointer
4053 + signature gs_44 = C_CALLS
4058 + structure gs_45 = CTypes
4063 + functor gs_46 = MLTreeUtils
4068 + structure gs_47 = IntInf
4073 + structure gs_48 = String
4078 + structure gs_49 = List
4081 + signature AMD64CELLS = gs_14
4082 + structure AMD64Cells = gs_15
4083 + structure CTypes = gs_45
4084 + signature C_CALLS = gs_44
4085 + structure CellsBasis = gs_5
4086 + structure Int = gs_0
4087 + structure Int32 = gs_8
4088 + structure IntInf = gs_47
4089 + structure List = gs_49
4090 + signature MLRISC_ERROR_MSG = gs_12
4091 + structure MLRiscAnnotations = gs_37
4092 + structure MLRiscErrorMsg = gs_13
4093 + signature MLTREE = gs_3
4094 + functor MLTreeUtils = gs_46
4095 + structure String = gs_48
4096 + structure Word = gs_24
4097 + ../amd64/c-calls/amd64-svid.sml
4099 + functor gs_50 = AMD64SVID_CCalls
4104 + signature gs_51 = PSEUDO_OPS_BASIS
4109 + functor gs_52 = GasPseudoOps
4114 + functor gs_53 = PseudoOpsLittle
4119 + structure gs_54 = Format
4124 + structure gs_55 = PseudoOpsBasisTyp
4127 + structure Format = gs_54
4128 + functor GasPseudoOps = gs_52
4129 + signature MLRISC_ERROR_MSG = gs_12
4130 + structure MLRiscErrorMsg = gs_13
4131 + signature MLTREE = gs_3
4132 + signature MLTREE_EVAL = gs_25
4133 + signature PSEUDO_OPS_BASIS = gs_51
4134 + structure PseudoOpsBasisTyp = gs_55
4135 + functor PseudoOpsLittle = gs_53
4136 + structure Word32 = gs_20
4137 + ../amd64/flowgraph/amd64GasPseudoOps.sml
4139 + functor gs_56 = AMD64GasPseudoOps
4144 + signature gs_57 = MLTREE_HASH
4149 + signature gs_58 = INSN_PROPERTIES
4152 + signature AMD64INSTR = gs_16
4153 + functor AMD64Instr = gs_17
4154 + structure CellsBasis = gs_5
4155 + signature INSN_PROPERTIES = gs_58
4156 + structure Int = gs_0
4157 + structure Int32 = gs_8
4158 + structure Int64 = gs_7
4159 + structure Label = gs_6
4160 + structure List = gs_49
4161 + signature MLRISC_ERROR_MSG = gs_12
4162 + structure MLRiscErrorMsg = gs_13
4163 + signature MLTREE_EVAL = gs_25
4164 + signature MLTREE_HASH = gs_57
4165 + structure Word = gs_24
4166 + ../amd64/instructions/amd64Props.sml
4168 + signature gs_59 = AMD64INSN_PROPERTIES
4169 + functor gs_60 = AMD64Props
4174 + signature gs_61 = SDI_JUMPS
4177 + signature AMD64INSTR = gs_16
4178 + functor AMD64Instr = gs_17
4179 + signature AMD64SHUFFLE = gs_27
4180 + functor AMD64Shuffle = gs_28
4181 + signature MC_EMIT = gs_19
4182 + signature MLRISC_ERROR_MSG = gs_12
4183 + structure MLRiscErrorMsg = gs_13
4184 + signature MLTREE_EVAL = gs_25
4185 + signature SDI_JUMPS = gs_61
4186 + structure Word8Vector = gs_23
4187 + ../amd64/backpatch/amd64Jumps.sml
4189 + functor gs_62 = AMD64Jumps
4194 + signature gs_63 = MLTREE_STREAM
4197 + ../amd64/instructions/amd64InstrExt.sml
4199 + structure gs_64 = AMD64InstrExt
4202 + signature AMD64INSTR = gs_16
4203 + functor AMD64Instr = gs_17
4204 + structure AMD64InstrExt = gs_64
4205 + signature CONTROL_FLOW_GRAPH = gs_42
4206 + signature MLRISC_ERROR_MSG = gs_12
4207 + structure MLRiscErrorMsg = gs_13
4208 + signature MLTREE_STREAM = gs_63
4209 + ../amd64/instructions/amd64CompInstrExt.sml
4211 + signature gs_65 = AMD64COMP_INSTR_EXT
4212 + functor gs_66 = AMD64CompInstrExt
4217 + functor gs_67 = DarwinPseudoOps
4220 + functor DarwinPseudoOps = gs_67
4221 + structure Format = gs_54
4222 + signature MLRISC_ERROR_MSG = gs_12
4223 + structure MLRiscErrorMsg = gs_13
4224 + signature MLTREE = gs_3
4225 + signature MLTREE_EVAL = gs_25
4226 + signature PSEUDO_OPS_BASIS = gs_51
4227 + structure PseudoOpsBasisTyp = gs_55
4228 + functor PseudoOpsLittle = gs_53
4229 + structure Word32 = gs_20
4230 + ../amd64/flowgraph/amd64-darwin-pseudo-ops.sml
4232 + functor gs_68 = AMD64DarwinPseudoOps
4237 + signature gs_69 = ASM_FORMAT_UTIL
4238 + structure gs_70 = AsmFormatUtil
4243 + signature gs_71 = ASM_STREAM
4244 + structure gs_72 = AsmStream
4249 + structure gs_73 = TextIO
4254 + structure gs_74 = Char
4259 + structure gs_75 = AsmFlags
4264 + signature gs_76 = INSTRUCTION_STREAM
4267 + signature AMD64INSTR = gs_16
4268 + functor AMD64Instr = gs_17
4269 + signature AMD64SHUFFLE = gs_27
4270 + functor AMD64Shuffle = gs_28
4271 + signature ASM_FORMAT_UTIL = gs_69
4272 + signature ASM_STREAM = gs_71
4273 + structure Annotations = gs_9
4274 + structure AsmFlags = gs_75
4275 + structure AsmFormatUtil = gs_70
4276 + structure AsmStream = gs_72
4277 + structure CellsBasis = gs_5
4278 + structure Char = gs_74
4279 + signature INSTRUCTION_EMITTER = gs_31
4280 + signature INSTRUCTION_STREAM = gs_76
4281 + structure Int = gs_0
4282 + structure Int32 = gs_8
4283 + structure Int64 = gs_7
4284 + signature MLRISC_ERROR_MSG = gs_12
4285 + structure MLRiscErrorMsg = gs_13
4286 + signature MLTREE_EVAL = gs_25
4287 + structure String = gs_48
4288 + structure TextIO = gs_73
4289 + ../amd64/emit/amd64Asm.sml
4291 + functor gs_77 = AMD64AsmEmitter
4296 + signature gs_78 = CFG_OPTIMIZATION
4301 + functor gs_79 = GetReg
4306 + signature gs_80 = PRINT_FLOWGRAPH
4307 + functor gs_81 = PrintFlowgraph
4312 + functor gs_82 = RegisterAllocator
4317 + functor gs_83 = MemoryRA
4322 + functor gs_84 = RADeadCodeElim
4327 + functor gs_85 = ClusterRA
4332 + structure gs_86 = Vector
4337 + signature gs_87 = RA_SPILL
4342 + signature gs_88 = RA_SPILL_HEURISTICS
4347 + structure gs_89 = RAGraph
4352 + signature gs_90 = ARCH_SPILL_INSTR
4355 + signature AMD64INSN_PROPERTIES = gs_59
4356 + signature AMD64INSTR = gs_16
4357 + functor AMD64Instr = gs_17
4358 + functor AMD64Props = gs_60
4359 + signature ARCH_SPILL_INSTR = gs_90
4360 + structure Annotations = gs_9
4361 + structure CellsBasis = gs_5
4362 + signature MLRISC_ERROR_MSG = gs_12
4363 + structure MLRiscAnnotations = gs_37
4364 + structure MLRiscErrorMsg = gs_13
4365 + ../amd64/ra/amd64SpillInstr.sml
4367 + functor gs_91 = AMD64SpillInstr
4370 + signature AMD64INSN_PROPERTIES = gs_59
4371 + signature AMD64INSTR = gs_16
4372 + functor AMD64Instr = gs_17
4373 + functor AMD64Props = gs_60
4374 + functor AMD64SpillInstr = gs_91
4375 + structure Annotations = gs_9
4376 + signature CFG_OPTIMIZATION = gs_78
4377 + signature CONTROL_FLOW_GRAPH = gs_42
4378 + structure CellsBasis = gs_5
4379 + functor ClusterRA = gs_85
4380 + functor GetReg = gs_79
4381 + structure Graph = gs_38
4382 + signature INSTRUCTION_EMITTER = gs_31
4383 + structure IntHashTable = gs_34
4384 + structure List = gs_49
4385 + signature MLRISC_CONTROL = gs_35
4386 + signature MLRISC_ERROR_MSG = gs_12
4387 + structure MLRiscControl = gs_36
4388 + structure MLRiscErrorMsg = gs_13
4389 + functor MemoryRA = gs_83
4390 + structure Option = gs_41
4391 + signature PRINT_FLOWGRAPH = gs_80
4392 + functor PrintFlowgraph = gs_81
4393 + functor RADeadCodeElim = gs_84
4394 + structure RAGraph = gs_89
4395 + signature RA_SPILL = gs_87
4396 + signature RA_SPILL_HEURISTICS = gs_88
4397 + functor RegisterAllocator = gs_82
4398 + structure Vector = gs_86
4399 + ../amd64/ra/amd64RegAlloc.sml
4401 + functor gs_92 = AMD64RegAlloc
4406 + functor gs_93 = MLTreeGen
4411 + functor gs_94 = MLTreeSize
4416 + signature gs_95 = PROBABILITY
4417 + structure gs_96 = Probability
4422 + signature gs_97 = MLTREECOMP
4423 + signature gs_98 = MLTREE_EXTENSION_COMP
4428 + signature gs_99 = MLTREE_UTILS
4431 + signature AMD64INSTR = gs_16
4432 + functor AMD64Instr = gs_17
4433 + functor AMD64Opcodes = gs_18
4434 + structure CellsBasis = gs_5
4435 + structure Int32 = gs_8
4436 + structure Int64 = gs_7
4437 + structure IntInf = gs_47
4438 + structure Label = gs_6
4439 + structure List = gs_49
4440 + structure ListPair = gs_40
4441 + signature MLRISC_ERROR_MSG = gs_12
4442 + structure MLRiscAnnotations = gs_37
4443 + structure MLRiscErrorMsg = gs_13
4444 + signature MLTREECOMP = gs_97
4445 + signature MLTREE_EXTENSION_COMP = gs_98
4446 + signature MLTREE_UTILS = gs_99
4447 + functor MLTreeGen = gs_93
4448 + functor MLTreeSize = gs_94
4449 + signature PROBABILITY = gs_95
4450 + structure Probability = gs_96
4451 + functor Shuffle = gs_26
4452 + structure Word = gs_24
4453 + structure Word32 = gs_20
4454 + ../amd64/mltree/amd64-gen.sml
4456 + functor gs_100 = AMD64Gen
4459 + functor AMD64AsmEmitter = gs_77
4460 + signature AMD64CELLS = gs_14
4461 + structure AMD64Cells = gs_15
4462 + functor AMD64CompInstrExt = gs_66
4463 + functor AMD64DarwinPseudoOps = gs_68
4464 + functor AMD64GasPseudoOps = gs_56
4465 + functor AMD64Gen = gs_100
4466 + signature AMD64INSN_PROPERTIES = gs_59
4467 + signature AMD64INSTR = gs_16
4468 + functor AMD64Instr = gs_17
4469 + structure AMD64InstrExt = gs_64
4470 + functor AMD64Jumps = gs_62
4471 + functor AMD64MCEmitter = gs_32
4472 + functor AMD64MCFn = gs_29
4473 + functor AMD64OmitFramePointer = gs_43
4474 + functor AMD64Opcodes = gs_18
4475 + functor AMD64Props = gs_60
4476 + functor AMD64RegAlloc = gs_92
4477 + signature AMD64SHUFFLE = gs_27
4478 + functor AMD64SVID_CCalls = gs_50
4479 + functor AMD64Shuffle = gs_28
4480 + functor AMD64SpillInstr = gs_91
4485 diff --git a/mlb/CCall-sparc.mlb b/mlb/CCall-sparc.mlb
4486 new file mode 100644
4487 index 0000000..82e45ff
4489 +++ b/mlb/CCall-sparc.mlb
4493 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4494 + "redundantBind warn" "redundantMatch warn"
4495 + "sequenceNonUnit ignore"
4496 + "warnUnused false" "forceUsed"
4497 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4503 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4507 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4511 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4515 + (* $CCall.cm(=(proxyLib.cm):.)/CCall.cm =??=> *) CCall.mlb
4519 + (* $SPARC.cm(=(proxyLib.cm):.)/SPARC.cm =??=> *) SPARC.mlb
4523 + $(SML_LIB)/basis/pervasive.mlb
4527 + signature gs_0 = C_CALL
4532 + functor gs_1 = SparcCConventionFn
4537 + functor gs_2 = CCallGenFn
4542 + functor gs_3 = StagedAllocationFn
4547 + signature gs_4 = SPARCCELLS
4548 + structure gs_5 = SparcCells
4553 + structure gs_6 = CType
4558 + structure gs_7 = CLocKind
4563 + structure gs_8 = List
4568 + signature gs_9 = MLTREE
4573 + structure gs_10 = SparcInstrExt
4578 + structure gs_11 = Int
4581 + structure CType = gs_6
4582 + structure Int = gs_11
4583 + ../c-call/archs/sparc-c-sizes.sml
4585 + structure gs_12 = SparcCSizes
4588 + functor CCallGenFn = gs_2
4589 + structure CLocKind = gs_7
4590 + structure CType = gs_6
4591 + signature C_CALL = gs_0
4592 + structure List = gs_8
4593 + signature MLTREE = gs_9
4594 + signature SPARCCELLS = gs_4
4595 + functor SparcCConventionFn = gs_1
4596 + structure SparcCSizes = gs_12
4597 + structure SparcCells = gs_5
4598 + structure SparcInstrExt = gs_10
4599 + functor StagedAllocationFn = gs_3
4600 + ../c-call/archs/sparc-c-call-fn.sml
4602 + functor gs_13 = SparcCCallFn
4605 + functor SparcCCallFn = gs_13
4606 + structure SparcCSizes = gs_12
4611 diff --git a/mlb/CCall-x86-64.mlb b/mlb/CCall-x86-64.mlb
4612 new file mode 100644
4613 index 0000000..bd053f7
4615 +++ b/mlb/CCall-x86-64.mlb
4619 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4620 + "redundantBind warn" "redundantMatch warn"
4621 + "sequenceNonUnit ignore"
4622 + "warnUnused false" "forceUsed"
4623 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4629 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4633 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4637 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4641 + (* $CCall.cm(=(proxyLib.cm):.)/CCall.cm =??=> *) CCall.mlb
4645 + (* $AMD64.cm(=(proxyLib.cm):.)/AMD64.cm =??=> *) AMD64.mlb
4649 + $(SML_LIB)/basis/pervasive.mlb
4653 + structure gs_0 = CType
4658 + structure gs_1 = Word
4663 + structure gs_2 = Int
4666 + structure CType = gs_0
4667 + structure Int = gs_2
4668 + structure Word = gs_1
4669 + ../c-call/archs/x86-64-c-sizes.sml
4671 + structure gs_3 = CSizes
4676 + functor gs_4 = X86_64CConventionFn
4681 + functor gs_5 = CCallGenFn
4686 + functor gs_6 = StagedAllocationFn
4691 + structure gs_7 = CellsBasis
4696 + signature gs_8 = AMD64CELLS
4697 + structure gs_9 = AMD64Cells
4702 + structure gs_10 = CLocKind
4707 + structure gs_11 = String
4712 + structure gs_12 = List
4717 + signature gs_13 = MLTREE
4720 + signature AMD64CELLS = gs_8
4721 + structure AMD64Cells = gs_9
4722 + functor CCallGenFn = gs_5
4723 + structure CLocKind = gs_10
4724 + structure CSizes = gs_3
4725 + structure CType = gs_0
4726 + structure CellsBasis = gs_7
4727 + structure Int = gs_2
4728 + structure List = gs_12
4729 + signature MLTREE = gs_13
4730 + functor StagedAllocationFn = gs_6
4731 + structure String = gs_11
4732 + functor X86_64CConventionFn = gs_4
4733 + ../c-call/archs/x86-64-svid-fn.sml
4735 + functor gs_14 = X86_64SVIDFn
4738 + structure CSizes = gs_3
4739 + functor X86_64SVIDFn = gs_14
4744 diff --git a/mlb/CCall-x86.mlb b/mlb/CCall-x86.mlb
4745 new file mode 100644
4746 index 0000000..0f1961e
4748 +++ b/mlb/CCall-x86.mlb
4752 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4753 + "redundantBind warn" "redundantMatch warn"
4754 + "sequenceNonUnit ignore"
4755 + "warnUnused false" "forceUsed"
4756 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4762 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4766 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4770 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4774 + (* $CCall.cm(=(proxyLib.cm):.)/CCall.cm =??=> *) CCall.mlb
4778 + (* $IA32.cm(=(proxyLib.cm):.)/IA32.cm =??=> *) IA32.mlb
4782 + $(SML_LIB)/basis/pervasive.mlb
4786 + structure gs_0 = CType
4791 + structure gs_1 = Word
4796 + structure gs_2 = Int
4799 + structure CType = gs_0
4800 + structure Int = gs_2
4801 + structure Word = gs_1
4802 + ../c-call/archs/x86-c-sizes.sml
4804 + structure gs_3 = X86CSizes
4809 + signature gs_4 = C_CALL
4814 + functor gs_5 = X86CConventionFn
4819 + functor gs_6 = CCallGenFn
4824 + functor gs_7 = StagedAllocationFn
4829 + structure gs_8 = CellsBasis
4834 + signature gs_9 = X86CELLS
4835 + structure gs_10 = X86Cells
4840 + structure gs_11 = CLocKind
4845 + structure gs_12 = IntInf
4850 + structure gs_13 = MLRiscAnnotations
4855 + structure gs_14 = Int32
4860 + structure gs_15 = String
4865 + structure gs_16 = List
4870 + signature gs_17 = MLTREE
4875 + structure gs_18 = X86InstrExt
4878 + functor CCallGenFn = gs_6
4879 + structure CLocKind = gs_11
4880 + structure CType = gs_0
4881 + signature C_CALL = gs_4
4882 + structure CellsBasis = gs_8
4883 + structure Int = gs_2
4884 + structure Int32 = gs_14
4885 + structure IntInf = gs_12
4886 + structure List = gs_16
4887 + structure MLRiscAnnotations = gs_13
4888 + signature MLTREE = gs_17
4889 + functor StagedAllocationFn = gs_7
4890 + structure String = gs_15
4891 + functor X86CConventionFn = gs_5
4892 + signature X86CELLS = gs_9
4893 + structure X86CSizes = gs_3
4894 + structure X86Cells = gs_10
4895 + structure X86InstrExt = gs_18
4896 + ../c-call/archs/x86-svid-fn.sml
4898 + functor gs_19 = X86SVIDFn
4901 + structure X86CSizes = gs_3
4902 + functor X86SVIDFn = gs_19
4907 diff --git a/mlb/CCall.mlb b/mlb/CCall.mlb
4908 new file mode 100644
4909 index 0000000..0f1bd8d
4915 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4916 + "redundantBind warn" "redundantMatch warn"
4917 + "sequenceNonUnit ignore"
4918 + "warnUnused false" "forceUsed"
4919 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4925 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4929 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4933 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4937 + $(SML_LIB)/basis/pervasive.mlb
4941 + signature gs_0 = MLTREE
4946 + signature gs_1 = STAGED_ALLOCATION
4951 + structure gs_2 = CLocKind
4954 + structure CLocKind = gs_2
4955 + signature MLTREE = gs_0
4956 + signature STAGED_ALLOCATION = gs_1
4957 + ../c-call/gen/c-call-gen-sig.sml
4959 + signature gs_3 = C_CALL_GEN
4964 + structure gs_4 = List
4967 + structure List = gs_4
4968 + ../c-call/gen/c-type.sml
4970 + structure gs_5 = CType
4973 + structure CType = gs_5
4974 + signature C_CALL_GEN = gs_3
4975 + signature MLTREE = gs_0
4976 + ../c-call/gen/c-call-sig.sml
4978 + signature gs_6 = C_CALL
4983 + structure gs_7 = ListPair
4988 + signature gs_8 = CELLS
4991 + signature CELLS = gs_8
4992 + structure CLocKind = gs_2
4993 + signature C_CALL_GEN = gs_3
4994 + structure List = gs_4
4995 + structure ListPair = gs_7
4996 + signature MLTREE = gs_0
4997 + signature STAGED_ALLOCATION = gs_1
4998 + ../c-call/gen/c-call-gen-fn.sml
5000 + functor gs_9 = CCallGenFn
5003 + functor CCallGenFn = gs_9
5004 + structure CType = gs_5
5005 + signature C_CALL = gs_6
5006 + signature C_CALL_GEN = gs_3
5011 diff --git a/mlb/Control.mlb b/mlb/Control.mlb
5012 new file mode 100644
5013 index 0000000..78b7d84
5015 +++ b/mlb/Control.mlb
5019 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
5020 + "redundantBind warn" "redundantMatch warn"
5021 + "sequenceNonUnit ignore"
5022 + "warnUnused false" "forceUsed"
5023 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
5029 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
5033 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
5037 + (* $/controls-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Controls/controls-lib.mlb
5041 + $(SML_LIB)/basis/pervasive.mlb
5045 + structure gs_0 = Timer
5050 + structure gs_1 = Time
5055 + structure gs_2 = Controls
5060 + structure gs_3 = ControlUtil
5065 + structure gs_4 = ControlSet
5070 + structure gs_5 = ControlRegistry
5075 + structure gs_6 = TextIO
5080 + structure gs_7 = Atom
5083 + structure Atom = gs_7
5084 + structure ControlRegistry = gs_5
5085 + structure ControlSet = gs_4
5086 + structure ControlUtil = gs_3
5087 + structure Controls = gs_2
5088 + structure TextIO = gs_6
5089 + structure Time = gs_1
5090 + ../control/mlrisc-control.sml
5092 + signature gs_8 = MLRISC_CONTROL
5093 + structure gs_9 = MLRiscControl
5096 + signature MLRISC_CONTROL = gs_8
5097 + structure MLRiscControl = gs_9
5098 + structure Time = gs_1
5099 + structure Timer = gs_0
5100 + ../control/mlrisc-timing.sml
5102 + signature gs_10 = MLRISC_TIMING
5103 + structure gs_11 = MLRiscTiming
5106 + structure TextIO = gs_6
5107 + ../control/mlriscErrormsg.sml
5109 + signature gs_12 = MLRISC_ERROR_MSG
5110 + structure gs_13 = MLRiscErrorMsg
5113 + signature MLRISC_CONTROL = gs_8
5114 + signature MLRISC_ERROR_MSG = gs_12
5115 + signature MLRISC_TIMING = gs_10
5116 + structure MLRiscControl = gs_9
5117 + structure MLRiscErrorMsg = gs_13
5118 + structure MLRiscTiming = gs_11
5123 diff --git a/mlb/Graphs.mlb b/mlb/Graphs.mlb
5124 new file mode 100644
5125 index 0000000..03e2731
5127 +++ b/mlb/Graphs.mlb
5131 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
5132 + "redundantBind warn" "redundantMatch warn"
5133 + "sequenceNonUnit ignore"
5134 + "warnUnused false" "forceUsed"
5135 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
5141 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
5145 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
5149 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
5153 + $(SML_LIB)/basis/pervasive.mlb
5157 + structure gs_0 = ListMergeSort
5162 + structure gs_1 = Int
5167 + structure gs_2 = List
5170 + ../graphs/graph.sig
5172 + signature gs_3 = GRAPH
5175 + signature GRAPH = gs_3
5176 + structure List = gs_2
5177 + ../graphs/graph.sml
5179 + structure gs_4 = Graph
5182 + structure Graph = gs_4
5183 + structure Int = gs_1
5184 + structure ListMergeSort = gs_0
5185 + ../graphs/uniongraph.sml
5187 + signature gs_5 = UNION_GRAPH_VIEW
5188 + structure gs_6 = UnionGraphView
5193 + signature gs_7 = CATNETABLE_LIST
5194 + structure gs_8 = CatnetableList
5199 + structure gs_9 = Array
5202 + ../graphs/group.sig
5204 + signature gs_10 = ABELIAN_GROUP
5205 + signature gs_11 = ABELIAN_GROUP_WITH_INF
5208 + signature ABELIAN_GROUP = gs_10
5209 + signature ABELIAN_GROUP_WITH_INF = gs_11
5210 + structure Graph = gs_4
5211 + ../graphs/min-cut.sig
5213 + signature gs_12 = MIN_CUT
5218 + signature gs_13 = ARRAY
5221 + structure Graph = gs_4
5222 + ../graphs/node-priqueue.sig
5224 + signature gs_14 = NODE_PRIORITY_QUEUE
5227 + signature ARRAY = gs_13
5228 + structure Graph = gs_4
5229 + signature NODE_PRIORITY_QUEUE = gs_14
5230 + ../graphs/node-priqueue.sml
5232 + functor gs_15 = NodePriorityQueue
5235 + signature ABELIAN_GROUP = gs_10
5236 + signature ABELIAN_GROUP_WITH_INF = gs_11
5237 + structure Array = gs_9
5238 + signature CATNETABLE_LIST = gs_7
5239 + structure CatnetableList = gs_8
5240 + structure Graph = gs_4
5241 + signature MIN_CUT = gs_12
5242 + functor NodePriorityQueue = gs_15
5243 + ../graphs/min-cut.sml
5245 + functor gs_16 = MinCut
5248 + structure Graph = gs_4
5249 + structure List = gs_2
5250 + ../graphs/isograph.sml
5252 + signature gs_17 = ISOMORPHIC_GRAPH_VIEW
5253 + structure gs_18 = IsomorphicGraphView
5256 + structure Graph = gs_4
5257 + structure Int = gs_1
5258 + structure List = gs_2
5259 + ../graphs/seme.sml
5261 + signature gs_19 = SINGLE_ENTRY_MULTIPLE_EXIT_VIEW
5262 + structure gs_20 = SingleEntryMultipleExit
5265 + structure Graph = gs_4
5266 + ../graphs/graph-comb.sig
5268 + signature gs_21 = GRAPH_COMBINATIONS
5271 + structure Graph = gs_4
5272 + ../graphs/revgraph.sml
5274 + signature gs_22 = REVERSED_GRAPH_VIEW
5275 + structure gs_23 = ReversedGraphView
5278 + structure Graph = gs_4
5279 + ../graphs/renamegraph.sml
5281 + signature gs_24 = RENAMED_GRAPH_VIEW
5282 + structure gs_25 = RenamedGraphView
5285 + signature GRAPH_COMBINATIONS = gs_21
5286 + structure Graph = gs_4
5287 + signature RENAMED_GRAPH_VIEW = gs_24
5288 + signature REVERSED_GRAPH_VIEW = gs_22
5289 + structure RenamedGraphView = gs_25
5290 + structure ReversedGraphView = gs_23
5291 + signature UNION_GRAPH_VIEW = gs_5
5292 + structure UnionGraphView = gs_6
5293 + ../graphs/graph-comb.sml
5295 + structure gs_26 = GraphCombinations
5298 + structure Graph = gs_4
5299 + ../graphs/readonly.sml
5301 + signature gs_27 = READONLY_GRAPH_VIEW
5302 + structure gs_28 = ReadOnlyGraphView
5305 + structure Graph = gs_4
5306 + ../graphs/graphimpl.sig
5308 + signature gs_29 = GRAPH_IMPLEMENTATION
5313 + structure gs_30 = Word8Array
5316 + structure Graph = gs_4
5317 + ../graphs/graph-scc.sig
5319 + signature gs_31 = GRAPH_STRONGLY_CONNECTED_COMPONENTS
5322 + structure Array = gs_9
5323 + signature GRAPH_STRONGLY_CONNECTED_COMPONENTS = gs_31
5324 + structure Graph = gs_4
5325 + structure Int = gs_1
5326 + structure Word8Array = gs_30
5327 + ../graphs/graph-scc.sml
5329 + structure gs_32 = GraphSCC
5334 + structure gs_33 = BitSet
5337 + structure Array = gs_9
5338 + structure Graph = gs_4
5339 + ../graphs/graph-dfs.sig
5341 + signature gs_34 = GRAPH_DEPTH_FIRST_SEARCH
5344 + structure Array = gs_9
5345 + structure BitSet = gs_33
5346 + signature GRAPH_DEPTH_FIRST_SEARCH = gs_34
5347 + structure Graph = gs_4
5348 + ../graphs/graph-dfs.sml
5350 + structure gs_35 = GraphDFS
5353 + structure Array = gs_9
5354 + structure Graph = gs_4
5355 + ../graphs/graph-bfs.sig
5357 + signature gs_36 = GRAPH_BREATH_FIRST_SEARCH
5360 + structure Array = gs_9
5361 + structure BitSet = gs_33
5362 + signature GRAPH_BREATH_FIRST_SEARCH = gs_36
5363 + structure Graph = gs_4
5364 + ../graphs/graph-bfs.sml
5366 + structure gs_37 = GraphBFS
5369 + structure Graph = gs_4
5370 + ../graphs/graph-bcc.sig
5372 + signature gs_38 = GRAPH_BICONNECTED_COMPONENTS
5375 + structure Array = gs_9
5376 + signature GRAPH_BICONNECTED_COMPONENTS = gs_38
5377 + structure Graph = gs_4
5378 + ../graphs/graph-bcc.sml
5380 + structure gs_39 = GraphBCC
5383 + structure Graph = gs_4
5384 + ../graphs/graph-topsort.sig
5386 + signature gs_40 = GRAPH_TOPOLOGICAL_SORT
5391 + structure gs_41 = String
5394 + structure Graph = gs_4
5395 + structure Int = gs_1
5396 + structure List = gs_2
5397 + structure String = gs_41
5398 + ../graphs/printgraph.sml
5400 + signature gs_42 = PRINT_GRAPH
5401 + structure gs_43 = PrintGraph
5404 + structure Graph = gs_4
5405 + ../graphs/no-exit.sml
5407 + signature gs_44 = NO_ENTRY_VIEW
5408 + signature gs_45 = NO_EXIT_VIEW
5409 + structure gs_46 = NoEntryView
5410 + structure gs_47 = NoExitView
5415 + structure gs_48 = PriorityQueue
5418 + structure Graph = gs_4
5419 + ../graphs/spanning-tree.sig
5421 + signature gs_49 = MIN_COST_SPANNING_TREE
5426 + structure gs_50 = HashTable
5431 + structure gs_51 = URef
5436 + structure gs_52 = Word
5439 + structure Graph = gs_4
5440 + structure HashTable = gs_50
5441 + structure URef = gs_51
5442 + structure Word = gs_52
5443 + ../graphs/node-partition.sml
5445 + signature gs_53 = NODE_PARTITION
5446 + structure gs_54 = NodePartition
5449 + structure Graph = gs_4
5450 + signature MIN_COST_SPANNING_TREE = gs_49
5451 + signature NODE_PARTITION = gs_53
5452 + structure NodePartition = gs_54
5453 + structure PriorityQueue = gs_48
5454 + ../graphs/kruskal.sml
5456 + structure gs_55 = Kruskal
5461 + structure gs_56 = HashArray
5464 + structure Graph = gs_4
5465 + structure List = gs_2
5466 + ../graphs/subgraph-p.sml
5468 + signature gs_57 = SUBGRAPH_P_VIEW
5469 + structure gs_58 = Subgraph_P_View
5472 + structure Graph = gs_4
5473 + structure HashArray = gs_56
5474 + signature SUBGRAPH_P_VIEW = gs_57
5475 + structure Subgraph_P_View = gs_58
5476 + ../graphs/trace-graph.sml
5478 + signature gs_59 = TRACE_SUBGRAPH_VIEW
5479 + structure gs_60 = TraceView
5482 + structure Graph = gs_4
5483 + structure Int = gs_1
5484 + structure List = gs_2
5485 + ../graphs/start-stop.sml
5487 + signature gs_61 = START_STOP_VIEW
5488 + structure gs_62 = StartStopView
5491 + signature GRAPH_IMPLEMENTATION = gs_29
5492 + structure Graph = gs_4
5493 + ../graphs/snap-shot.sml
5495 + signature gs_63 = GRAPH_SNAPSHOT
5496 + functor gs_64 = GraphSnapShot
5499 + signature ABELIAN_GROUP = gs_10
5500 + signature ABELIAN_GROUP_WITH_INF = gs_11
5501 + structure Graph = gs_4
5502 + ../graphs/max-flow.sig
5504 + signature gs_65 = MAX_FLOW
5507 + signature ABELIAN_GROUP = gs_10
5508 + signature ABELIAN_GROUP_WITH_INF = gs_11
5509 + structure Array = gs_9
5510 + structure Graph = gs_4
5511 + structure Int = gs_1
5512 + structure List = gs_2
5513 + signature MAX_FLOW = gs_65
5514 + ../graphs/max-flow.sml
5516 + functor gs_66 = MaxFlow
5521 + structure gs_67 = Array2
5524 + signature ABELIAN_GROUP = gs_10
5525 + signature ABELIAN_GROUP_WITH_INF = gs_11
5526 + structure Array = gs_9
5527 + structure Array2 = gs_67
5528 + structure Graph = gs_4
5529 + ../graphs/shortest-paths.sig
5531 + signature gs_68 = ALL_PAIRS_SHORTEST_PATHS
5532 + signature gs_69 = SINGLE_SOURCE_SHORTEST_PATHS
5535 + signature ABELIAN_GROUP = gs_10
5536 + signature ABELIAN_GROUP_WITH_INF = gs_11
5537 + signature ALL_PAIRS_SHORTEST_PATHS = gs_68
5538 + structure Array2 = gs_67
5539 + structure Graph = gs_4
5540 + signature SINGLE_SOURCE_SHORTEST_PATHS = gs_69
5541 + ../graphs/floyd-warshall.sml
5543 + functor gs_70 = FloydWarshall
5546 + structure Graph = gs_4
5547 + ../graphs/graph-is-cyclic.sig
5549 + signature gs_71 = GRAPH_IS_CYCLIC
5552 + structure Graph = gs_4
5553 + ../graphs/update-graph-info.sml
5555 + signature gs_72 = UPDATE_GRAPH_INFO
5556 + structure gs_73 = UpdateGraphInfo
5559 + structure Graph = gs_4
5560 + ../graphs/graph-cycles.sig
5562 + signature gs_74 = GRAPH_SIMPLE_CYCLES
5565 + signature ABELIAN_GROUP = gs_10
5566 + signature ABELIAN_GROUP_WITH_INF = gs_11
5567 + signature ALL_PAIRS_SHORTEST_PATHS = gs_68
5568 + structure Array = gs_9
5569 + structure Graph = gs_4
5570 + structure Int = gs_1
5571 + signature SINGLE_SOURCE_SHORTEST_PATHS = gs_69
5572 + ../graphs/bellman-ford.sml
5574 + functor gs_75 = BellmanFord
5577 + signature GRAPH_TOPOLOGICAL_SORT = gs_40
5578 + structure Graph = gs_4
5579 + structure Word8Array = gs_30
5580 + ../graphs/graph-topsort.sml
5582 + structure gs_76 = GraphTopsort
5585 + structure Array = gs_9
5586 + structure Graph = gs_4
5587 + structure GraphTopsort = gs_76
5588 + ../graphs/trans-closure.sml
5590 + signature gs_77 = TRANSITIVE_CLOSURE
5591 + structure gs_78 = TransitiveClosure
5596 + structure gs_79 = DynArray
5601 + signature gs_80 = ARRAY_NONEQ
5604 + signature ARRAY_NONEQ = gs_80
5605 + structure DynArray = gs_79
5606 + signature GRAPH_IMPLEMENTATION = gs_29
5607 + structure Graph = gs_4
5608 + structure List = gs_2
5609 + ../graphs/digraph.sml
5611 + functor gs_81 = DirectedGraph
5612 + structure gs_82 = DirectedGraph
5615 + structure Graph = gs_4
5616 + ../graphs/wrappers.sml
5618 + signature gs_83 = GRAPH_WRAPPERS
5619 + structure gs_84 = GraphWrappers
5622 + structure BitSet = gs_33
5623 + signature GRAPH_IS_CYCLIC = gs_71
5624 + structure Graph = gs_4
5625 + ../graphs/graph-is-cyclic.sml
5627 + structure gs_85 = GraphIsCyclic
5632 + structure gs_86 = IntHashTable
5635 + structure Graph = gs_4
5636 + structure IntHashTable = gs_86
5637 + structure List = gs_2
5638 + ../graphs/subgraph.sml
5640 + signature gs_87 = SUBGRAPH_VIEW
5641 + structure gs_88 = SubgraphView
5644 + structure Graph = gs_4
5645 + structure Int = gs_1
5646 + structure ListMergeSort = gs_0
5647 + ../graphs/ugraph.sml
5649 + signature gs_89 = UNDIRECTED_GRAPH_VIEW
5650 + structure gs_90 = UndirectedGraphView
5653 + structure Graph = gs_4
5654 + structure HashArray = gs_56
5655 + structure List = gs_2
5656 + structure URef = gs_51
5657 + ../graphs/graph-minor.sml
5659 + signature gs_91 = GRAPH_MINOR_VIEW
5660 + structure gs_92 = GraphMinorView
5663 + signature ARRAY = gs_13
5664 + signature GRAPH_IMPLEMENTATION = gs_29
5665 + structure Graph = gs_4
5666 + structure List = gs_2
5667 + ../graphs/udgraph.sml
5669 + functor gs_93 = UndirectedGraph
5672 + signature GRAPH = gs_3
5673 + ../graphs/bigraph.sig
5675 + signature gs_94 = BIPARTITE_GRAPH
5678 + structure Graph = gs_4
5679 + structure HashArray = gs_56
5680 + signature SUBGRAPH_P_VIEW = gs_57
5681 + structure Subgraph_P_View = gs_58
5682 + ../graphs/acyclic-graph.sml
5684 + signature gs_95 = ACYCLIC_SUBGRAPH_VIEW
5685 + structure gs_96 = AcyclicSubgraphView
5688 + structure Graph = gs_4
5689 + ../graphs/singleton.sml
5691 + signature gs_97 = SINGLETON_GRAPH_VIEW
5692 + structure gs_98 = SingletonGraphView
5695 + signature ABELIAN_GROUP = gs_10
5696 + signature ABELIAN_GROUP_WITH_INF = gs_11
5697 + signature ALL_PAIRS_SHORTEST_PATHS = gs_68
5698 + structure Array = gs_9
5699 + structure Graph = gs_4
5700 + functor NodePriorityQueue = gs_15
5701 + signature SINGLE_SOURCE_SHORTEST_PATHS = gs_69
5702 + ../graphs/dijkstra.sml
5704 + functor gs_99 = Dijkstra
5707 + signature ABELIAN_GROUP = gs_10
5708 + signature ABELIAN_GROUP_WITH_INF = gs_11
5709 + signature ALL_PAIRS_SHORTEST_PATHS = gs_68
5710 + structure Array = gs_9
5711 + structure Array2 = gs_67
5712 + functor BellmanFord = gs_75
5713 + functor Dijkstra = gs_99
5714 + functor DirectedGraph = gs_81
5715 + structure DirectedGraph = gs_82
5716 + structure Graph = gs_4
5717 + structure HashArray = gs_56
5718 + signature SINGLE_SOURCE_SHORTEST_PATHS = gs_69
5719 + signature UNION_GRAPH_VIEW = gs_5
5720 + structure UnionGraphView = gs_6
5721 + ../graphs/johnson.sml
5723 + functor gs_100 = Johnson
5726 + structure Graph = gs_4
5727 + ../graphs/matching.sig
5729 + signature gs_101 = BIPARTITE_MATCHING
5732 + structure Array = gs_9
5733 + signature GRAPH_SIMPLE_CYCLES = gs_74
5734 + structure Graph = gs_4
5735 + structure GraphSCC = gs_32
5736 + ../graphs/graph-cycles.sml
5738 + structure gs_102 = GraphCycles
5741 + structure Array = gs_9
5742 + signature BIPARTITE_MATCHING = gs_101
5743 + structure Graph = gs_4
5744 + structure List = gs_2
5745 + ../graphs/matching.sml
5747 + structure gs_103 = BipartiteMatching
5750 + ../graphs/closed-semi-ring.sig
5752 + signature gs_104 = CLOSED_SEMI_RING
5755 + signature ABELIAN_GROUP = gs_10
5756 + signature ABELIAN_GROUP_WITH_INF = gs_11
5757 + signature ACYCLIC_SUBGRAPH_VIEW = gs_95
5758 + signature ALL_PAIRS_SHORTEST_PATHS = gs_68
5759 + structure AcyclicSubgraphView = gs_96
5760 + signature BIPARTITE_GRAPH = gs_94
5761 + signature BIPARTITE_MATCHING = gs_101
5762 + functor BellmanFord = gs_75
5763 + structure BipartiteMatching = gs_103
5764 + signature CLOSED_SEMI_RING = gs_104
5765 + functor Dijkstra = gs_99
5766 + functor DirectedGraph = gs_81
5767 + structure DirectedGraph = gs_82
5768 + functor FloydWarshall = gs_70
5769 + signature GRAPH = gs_3
5770 + signature GRAPH_BICONNECTED_COMPONENTS = gs_38
5771 + signature GRAPH_BREATH_FIRST_SEARCH = gs_36
5772 + signature GRAPH_COMBINATIONS = gs_21
5773 + signature GRAPH_DEPTH_FIRST_SEARCH = gs_34
5774 + signature GRAPH_IMPLEMENTATION = gs_29
5775 + signature GRAPH_IS_CYCLIC = gs_71
5776 + signature GRAPH_MINOR_VIEW = gs_91
5777 + signature GRAPH_SIMPLE_CYCLES = gs_74
5778 + signature GRAPH_SNAPSHOT = gs_63
5779 + signature GRAPH_STRONGLY_CONNECTED_COMPONENTS = gs_31
5780 + signature GRAPH_TOPOLOGICAL_SORT = gs_40
5781 + signature GRAPH_WRAPPERS = gs_83
5782 + structure Graph = gs_4
5783 + structure GraphBCC = gs_39
5784 + structure GraphBFS = gs_37
5785 + structure GraphCombinations = gs_26
5786 + structure GraphCycles = gs_102
5787 + structure GraphDFS = gs_35
5788 + structure GraphIsCyclic = gs_85
5789 + structure GraphMinorView = gs_92
5790 + structure GraphSCC = gs_32
5791 + functor GraphSnapShot = gs_64
5792 + structure GraphTopsort = gs_76
5793 + structure GraphWrappers = gs_84
5794 + signature ISOMORPHIC_GRAPH_VIEW = gs_17
5795 + structure IsomorphicGraphView = gs_18
5796 + functor Johnson = gs_100
5797 + structure Kruskal = gs_55
5798 + signature MAX_FLOW = gs_65
5799 + signature MIN_COST_SPANNING_TREE = gs_49
5800 + signature MIN_CUT = gs_12
5801 + functor MaxFlow = gs_66
5802 + functor MinCut = gs_16
5803 + signature NODE_PARTITION = gs_53
5804 + signature NODE_PRIORITY_QUEUE = gs_14
5805 + signature NO_ENTRY_VIEW = gs_44
5806 + signature NO_EXIT_VIEW = gs_45
5807 + structure NoEntryView = gs_46
5808 + structure NoExitView = gs_47
5809 + structure NodePartition = gs_54
5810 + functor NodePriorityQueue = gs_15
5811 + signature PRINT_GRAPH = gs_42
5812 + structure PrintGraph = gs_43
5813 + signature READONLY_GRAPH_VIEW = gs_27
5814 + signature RENAMED_GRAPH_VIEW = gs_24
5815 + signature REVERSED_GRAPH_VIEW = gs_22
5816 + structure ReadOnlyGraphView = gs_28
5817 + structure RenamedGraphView = gs_25
5818 + structure ReversedGraphView = gs_23
5819 + signature SINGLETON_GRAPH_VIEW = gs_97
5820 + signature SINGLE_ENTRY_MULTIPLE_EXIT_VIEW = gs_19
5821 + signature SINGLE_SOURCE_SHORTEST_PATHS = gs_69
5822 + signature START_STOP_VIEW = gs_61
5823 + signature SUBGRAPH_P_VIEW = gs_57
5824 + signature SUBGRAPH_VIEW = gs_87
5825 + structure SingleEntryMultipleExit = gs_20
5826 + structure SingletonGraphView = gs_98
5827 + structure StartStopView = gs_62
5828 + structure SubgraphView = gs_88
5829 + structure Subgraph_P_View = gs_58
5830 + signature TRACE_SUBGRAPH_VIEW = gs_59
5831 + signature TRANSITIVE_CLOSURE = gs_77
5832 + structure TraceView = gs_60
5833 + structure TransitiveClosure = gs_78
5834 + signature UNDIRECTED_GRAPH_VIEW = gs_89
5835 + signature UNION_GRAPH_VIEW = gs_5
5836 + signature UPDATE_GRAPH_INFO = gs_72
5837 + functor UndirectedGraph = gs_93
5838 + structure UndirectedGraphView = gs_90
5839 + structure UnionGraphView = gs_6
5840 + structure UpdateGraphInfo = gs_73
5845 diff --git a/mlb/HPPA.mlb b/mlb/HPPA.mlb
5846 new file mode 100644
5847 index 0000000..4e0d097
5853 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
5854 + "redundantBind warn" "redundantMatch warn"
5855 + "sequenceNonUnit ignore"
5856 + "warnUnused false" "forceUsed"
5857 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
5863 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
5867 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
5871 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
5875 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
5879 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
5883 + $(SML_LIB)/basis/pervasive.mlb
5887 + structure gs_0 = CellsBasis
5892 + functor gs_1 = Shuffle
5897 + structure gs_2 = Option
5902 + signature gs_3 = MLRISC_ERROR_MSG
5903 + structure gs_4 = MLRiscErrorMsg
5908 + signature gs_5 = REGION
5913 + signature gs_6 = CONSTANT
5918 + signature gs_7 = MLTREE
5923 + signature gs_8 = CELLS_BASIS
5928 + structure gs_9 = Label
5933 + structure gs_10 = Annotations
5938 + functor gs_11 = Cells
5943 + structure gs_12 = Int
5948 + signature gs_13 = CELLS
5951 + signature CELLS = gs_13
5952 + functor Cells = gs_11
5953 + structure CellsBasis = gs_0
5954 + structure Int = gs_12
5955 + signature MLRISC_ERROR_MSG = gs_3
5956 + structure MLRiscErrorMsg = gs_4
5957 + ../hppa/instructions/hppaCells.sml
5959 + signature gs_14 = HPPACELLS
5960 + structure gs_15 = HppaCells
5963 + structure Annotations = gs_10
5964 + signature CELLS_BASIS = gs_8
5965 + signature CONSTANT = gs_6
5966 + structure CellsBasis = gs_0
5967 + signature HPPACELLS = gs_14
5968 + structure HppaCells = gs_15
5969 + structure Label = gs_9
5970 + signature MLTREE = gs_7
5971 + signature REGION = gs_5
5972 + ../hppa/instructions/hppaInstr.sml
5974 + signature gs_16 = HPPAINSTR
5975 + functor gs_17 = HppaInstr
5978 + structure CellsBasis = gs_0
5979 + signature HPPAINSTR = gs_16
5980 + functor HppaInstr = gs_17
5981 + ../hppa/instructions/hppaShuffle.sig
5983 + signature gs_18 = HPPASHUFFLE
5986 + structure CellsBasis = gs_0
5987 + signature HPPAINSTR = gs_16
5988 + signature HPPASHUFFLE = gs_18
5989 + functor HppaInstr = gs_17
5990 + signature MLRISC_ERROR_MSG = gs_3
5991 + structure MLRiscErrorMsg = gs_4
5992 + structure Option = gs_2
5993 + functor Shuffle = gs_1
5994 + ../hppa/instructions/hppaShuffle.sml
5996 + functor gs_19 = HppaShuffle
6001 + signature gs_20 = INSTRUCTION_EMITTER
6006 + structure gs_21 = IntInf
6011 + structure gs_22 = Word8
6016 + structure gs_23 = Word32
6021 + signature gs_24 = CODE_STRING
6026 + signature gs_25 = INSTRUCTION_STREAM
6031 + signature gs_26 = MLTREE_EVAL
6034 + signature CODE_STRING = gs_24
6035 + structure CellsBasis = gs_0
6036 + signature HPPAINSTR = gs_16
6037 + functor HppaInstr = gs_17
6038 + signature INSTRUCTION_EMITTER = gs_20
6039 + signature INSTRUCTION_STREAM = gs_25
6040 + structure IntInf = gs_21
6041 + structure Label = gs_9
6042 + signature MLRISC_ERROR_MSG = gs_3
6043 + structure MLRiscErrorMsg = gs_4
6044 + signature MLTREE_EVAL = gs_26
6045 + structure Option = gs_2
6046 + structure Word32 = gs_23
6047 + structure Word8 = gs_22
6048 + ../hppa/emit/hppaMC.sml
6050 + functor gs_27 = HppaMCEmitter
6053 + signature CELLS_BASIS = gs_8
6054 + structure CellsBasis = gs_0
6055 + signature HPPAINSTR = gs_16
6056 + functor HppaInstr = gs_17
6057 + ../hppa/mltree/hppaMillicode.sig
6059 + signature gs_28 = HPPA_MILLICODE
6064 + signature gs_29 = ASM_FORMAT_UTIL
6065 + structure gs_30 = AsmFormatUtil
6070 + signature gs_31 = ASM_STREAM
6071 + structure gs_32 = AsmStream
6076 + structure gs_33 = TextIO
6081 + structure gs_34 = String
6086 + structure gs_35 = AsmFlags
6089 + signature ASM_FORMAT_UTIL = gs_29
6090 + signature ASM_STREAM = gs_31
6091 + structure Annotations = gs_10
6092 + structure AsmFlags = gs_35
6093 + structure AsmFormatUtil = gs_30
6094 + structure AsmStream = gs_32
6095 + structure CellsBasis = gs_0
6096 + signature HPPAINSTR = gs_16
6097 + signature HPPASHUFFLE = gs_18
6098 + functor HppaInstr = gs_17
6099 + signature INSTRUCTION_EMITTER = gs_20
6100 + signature INSTRUCTION_STREAM = gs_25
6101 + structure Int = gs_12
6102 + signature MLRISC_ERROR_MSG = gs_3
6103 + structure MLRiscErrorMsg = gs_4
6104 + signature MLTREE_EVAL = gs_26
6105 + structure String = gs_34
6106 + structure TextIO = gs_33
6107 + ../hppa/emit/hppaAsm.sml
6109 + functor gs_36 = HppaAsmEmitter
6114 + signature gs_37 = INSTRUCTIONS
6117 + structure CellsBasis = gs_0
6118 + signature INSTRUCTIONS = gs_37
6119 + signature MLTREE = gs_7
6120 + ../hppa/mltree/hppaLabelComp.sig
6122 + signature gs_38 = LABEL_COMP
6127 + signature gs_39 = ARCH_SPILL_INSTR
6130 + structure CellsBasis = gs_0
6131 + signature HPPAINSTR = gs_16
6132 + functor HppaInstr = gs_17
6133 + signature MLRISC_ERROR_MSG = gs_3
6134 + structure MLRiscErrorMsg = gs_4
6135 + ../hppa/ra/hppaRewrite.sml
6137 + functor gs_40 = HppaRewrite
6140 + signature ARCH_SPILL_INSTR = gs_39
6141 + structure CellsBasis = gs_0
6142 + signature HPPAINSTR = gs_16
6143 + functor HppaInstr = gs_17
6144 + functor HppaRewrite = gs_40
6145 + signature MLRISC_ERROR_MSG = gs_3
6146 + structure MLRiscErrorMsg = gs_4
6147 + ../hppa/ra/hppaSpillInstr.sml
6149 + functor gs_41 = HppaSpillInstr
6154 + signature gs_42 = FREQUENCY_PROPERTIES
6159 + signature gs_43 = PROBABILITY
6160 + structure gs_44 = Probability
6165 + structure gs_45 = MLRiscAnnotations
6168 + signature FREQUENCY_PROPERTIES = gs_42
6169 + signature HPPAINSTR = gs_16
6170 + functor HppaInstr = gs_17
6171 + structure MLRiscAnnotations = gs_45
6172 + signature PROBABILITY = gs_43
6173 + structure Probability = gs_44
6174 + ../hppa/instructions/hppaFreqProps.sml
6176 + functor gs_46 = HppaFreqProps
6181 + signature gs_47 = PSEUDO_OPS_BASIS
6186 + functor gs_48 = GasPseudoOps
6191 + functor gs_49 = PseudoOpsBig
6196 + structure gs_50 = Format
6201 + structure gs_51 = PseudoOpsBasisTyp
6204 + structure Format = gs_50
6205 + functor GasPseudoOps = gs_48
6206 + signature MLRISC_ERROR_MSG = gs_3
6207 + structure MLRiscErrorMsg = gs_4
6208 + signature MLTREE = gs_7
6209 + signature MLTREE_EVAL = gs_26
6210 + signature PSEUDO_OPS_BASIS = gs_47
6211 + structure PseudoOpsBasisTyp = gs_51
6212 + functor PseudoOpsBig = gs_49
6213 + structure Word32 = gs_23
6214 + ../hppa/flowgraph/hppaGasPseudoOps.sml
6216 + functor gs_52 = HppaGasPseudoOps
6221 + signature gs_53 = DELAY_SLOT_PROPERTIES
6226 + signature gs_54 = INSN_PROPERTIES
6229 + structure CellsBasis = gs_0
6230 + signature DELAY_SLOT_PROPERTIES = gs_53
6231 + signature HPPAINSTR = gs_16
6232 + functor HppaInstr = gs_17
6233 + signature INSN_PROPERTIES = gs_54
6234 + signature MLRISC_ERROR_MSG = gs_3
6235 + structure MLRiscErrorMsg = gs_4
6236 + structure Option = gs_2
6237 + ../hppa/backpatch/hppaDelaySlotProps.sml
6239 + functor gs_55 = HppaDelaySlots
6244 + structure gs_56 = Word
6249 + signature gs_57 = MLTREE_HASH
6252 + structure CellsBasis = gs_0
6253 + signature HPPAINSTR = gs_16
6254 + functor HppaInstr = gs_17
6255 + signature INSN_PROPERTIES = gs_54
6256 + structure Label = gs_9
6257 + signature MLRISC_ERROR_MSG = gs_3
6258 + structure MLRiscErrorMsg = gs_4
6259 + signature MLTREE_EVAL = gs_26
6260 + signature MLTREE_HASH = gs_57
6261 + structure Option = gs_2
6262 + structure Word = gs_56
6263 + ../hppa/instructions/hppaProps.sml
6265 + functor gs_58 = HppaProps
6270 + signature gs_59 = SDI_JUMPS
6273 + structure CellsBasis = gs_0
6274 + signature HPPAINSTR = gs_16
6275 + signature HPPASHUFFLE = gs_18
6276 + functor HppaInstr = gs_17
6277 + structure Label = gs_9
6278 + signature MLRISC_ERROR_MSG = gs_3
6279 + structure MLRiscErrorMsg = gs_4
6280 + signature MLTREE_EVAL = gs_26
6281 + signature SDI_JUMPS = gs_59
6282 + structure Word = gs_56
6283 + ../hppa/backpatch/hppaJumps.sml
6285 + functor gs_60 = HppaJumps
6290 + functor gs_61 = MLTreeMult
6295 + functor gs_62 = MLTreeGen
6300 + signature gs_63 = MLTREECOMP
6301 + signature gs_64 = MLTREE_EXTENSION_COMP
6304 + structure CellsBasis = gs_0
6305 + signature HPPAINSTR = gs_16
6306 + signature HPPA_MILLICODE = gs_28
6307 + functor HppaInstr = gs_17
6308 + signature LABEL_COMP = gs_38
6309 + structure Label = gs_9
6310 + signature MLRISC_ERROR_MSG = gs_3
6311 + structure MLRiscAnnotations = gs_45
6312 + structure MLRiscErrorMsg = gs_4
6313 + signature MLTREECOMP = gs_63
6314 + signature MLTREE_EXTENSION_COMP = gs_64
6315 + functor MLTreeGen = gs_62
6316 + functor MLTreeMult = gs_61
6317 + structure Word32 = gs_23
6318 + ../hppa/mltree/hppa.sml
6320 + functor gs_65 = Hppa
6323 + signature HPPACELLS = gs_14
6324 + signature HPPAINSTR = gs_16
6325 + signature HPPASHUFFLE = gs_18
6326 + signature HPPA_MILLICODE = gs_28
6327 + functor Hppa = gs_65
6328 + functor HppaAsmEmitter = gs_36
6329 + structure HppaCells = gs_15
6330 + functor HppaDelaySlots = gs_55
6331 + functor HppaFreqProps = gs_46
6332 + functor HppaGasPseudoOps = gs_52
6333 + functor HppaInstr = gs_17
6334 + functor HppaJumps = gs_60
6335 + functor HppaMCEmitter = gs_27
6336 + functor HppaProps = gs_58
6337 + functor HppaRewrite = gs_40
6338 + functor HppaShuffle = gs_19
6339 + functor HppaSpillInstr = gs_41
6340 + signature LABEL_COMP = gs_38
6345 diff --git a/mlb/IA32-Peephole.mlb b/mlb/IA32-Peephole.mlb
6346 new file mode 100644
6347 index 0000000..d9ee357
6349 +++ b/mlb/IA32-Peephole.mlb
6353 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
6354 + "redundantBind warn" "redundantMatch warn"
6355 + "sequenceNonUnit ignore"
6356 + "warnUnused false" "forceUsed"
6357 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
6363 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
6367 + (* $Peephole.cm(=(proxyLib.cm):.)/Peephole.cm =??=> *) Peephole.mlb
6371 + (* $IA32.cm(=(proxyLib.cm):.)/IA32.cm =??=> *) IA32.mlb
6375 + $(SML_LIB)/basis/pervasive.mlb
6379 + signature gs_0 = PEEPHOLE
6384 + structure gs_1 = CellsBasis
6389 + signature gs_2 = MLTREE_EVAL
6394 + signature gs_3 = X86INSTR
6395 + functor gs_4 = X86Instr
6398 + structure CellsBasis = gs_1
6399 + signature MLTREE_EVAL = gs_2
6400 + signature PEEPHOLE = gs_0
6401 + signature X86INSTR = gs_3
6402 + functor X86Instr = gs_4
6403 + ../x86/instructions/x86Peephole.sml
6405 + functor gs_5 = X86Peephole
6408 + functor X86Peephole = gs_5
6413 diff --git a/mlb/IA32.mlb b/mlb/IA32.mlb
6414 new file mode 100644
6415 index 0000000..83c09d3
6421 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
6422 + "redundantBind warn" "redundantMatch warn"
6423 + "sequenceNonUnit ignore"
6424 + "warnUnused false" "forceUsed"
6425 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
6431 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
6435 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
6439 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
6443 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
6447 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
6451 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
6455 + (* $MLTREE.cm(=(proxyLib.cm):.)/MLTREE.cm =??=> *) MLTREE.mlb
6459 + $(SML_LIB)/basis/pervasive.mlb
6463 + signature gs_0 = ARCH_SPILL_INSTR
6468 + structure gs_1 = CellsBasis
6473 + signature gs_2 = MLRISC_ERROR_MSG
6474 + structure gs_3 = MLRiscErrorMsg
6479 + signature gs_4 = INSN_PROPERTIES
6484 + signature gs_5 = REGION
6489 + signature gs_6 = CONSTANT
6494 + signature gs_7 = MLTREE
6499 + signature gs_8 = CELLS_BASIS
6504 + structure gs_9 = Label
6509 + structure gs_10 = Int32
6514 + structure gs_11 = Annotations
6519 + functor gs_12 = Cells
6524 + structure gs_13 = Int
6529 + signature gs_14 = CELLS
6532 + signature CELLS = gs_14
6533 + functor Cells = gs_12
6534 + structure CellsBasis = gs_1
6535 + structure Int = gs_13
6536 + signature MLRISC_ERROR_MSG = gs_2
6537 + structure MLRiscErrorMsg = gs_3
6538 + ../x86/instructions/x86Cells.sml
6540 + signature gs_15 = X86CELLS
6541 + structure gs_16 = X86Cells
6544 + structure Annotations = gs_11
6545 + signature CELLS_BASIS = gs_8
6546 + signature CONSTANT = gs_6
6547 + structure CellsBasis = gs_1
6548 + structure Int32 = gs_10
6549 + structure Label = gs_9
6550 + signature MLTREE = gs_7
6551 + signature REGION = gs_5
6552 + signature X86CELLS = gs_15
6553 + structure X86Cells = gs_16
6554 + ../x86/instructions/x86Instr.sml
6556 + signature gs_17 = X86INSTR
6557 + functor gs_18 = X86Instr
6560 + signature ARCH_SPILL_INSTR = gs_0
6561 + structure CellsBasis = gs_1
6562 + signature INSN_PROPERTIES = gs_4
6563 + signature MLRISC_ERROR_MSG = gs_2
6564 + structure MLRiscErrorMsg = gs_3
6565 + signature X86INSTR = gs_17
6566 + functor X86Instr = gs_18
6567 + ../x86/ra/x86SpillInstr.sml
6569 + functor gs_19 = X86SpillInstr
6572 + structure CellsBasis = gs_1
6573 + signature X86INSTR = gs_17
6574 + functor X86Instr = gs_18
6575 + ../x86/instructions/x86MemRegs.sig
6577 + signature gs_20 = MEMORY_REGISTERS
6582 + signature gs_21 = MC_EMIT
6587 + structure gs_22 = Word32
6592 + structure gs_23 = Word8
6597 + structure gs_24 = LargeWord
6602 + structure gs_25 = Word8Vector
6607 + structure gs_26 = Option
6612 + structure gs_27 = Word
6617 + signature gs_28 = INSTRUCTION_EMITTER
6622 + signature gs_29 = MLTREE_EVAL
6625 + structure CellsBasis = gs_1
6626 + signature X86INSTR = gs_17
6627 + functor X86Instr = gs_18
6628 + ../x86/instructions/x86Shuffle.sig
6630 + signature gs_30 = X86SHUFFLE
6633 + structure CellsBasis = gs_1
6634 + signature INSTRUCTION_EMITTER = gs_28
6635 + structure Int32 = gs_10
6636 + structure LargeWord = gs_24
6637 + signature MC_EMIT = gs_21
6638 + signature MEMORY_REGISTERS = gs_20
6639 + signature MLRISC_ERROR_MSG = gs_2
6640 + structure MLRiscErrorMsg = gs_3
6641 + signature MLTREE_EVAL = gs_29
6642 + structure Option = gs_26
6643 + structure Word = gs_27
6644 + structure Word32 = gs_22
6645 + structure Word8 = gs_23
6646 + structure Word8Vector = gs_25
6647 + signature X86INSTR = gs_17
6648 + functor X86Instr = gs_18
6649 + signature X86SHUFFLE = gs_30
6652 + functor gs_31 = X86MCEmitter
6657 + signature gs_32 = PSEUDO_OPS_BASIS
6662 + functor gs_33 = DarwinPseudoOps
6667 + functor gs_34 = PseudoOpsLittle
6672 + structure gs_35 = Format
6677 + structure gs_36 = PseudoOpsBasisTyp
6680 + functor DarwinPseudoOps = gs_33
6681 + structure Format = gs_35
6682 + signature MLRISC_ERROR_MSG = gs_2
6683 + structure MLRiscErrorMsg = gs_3
6684 + signature MLTREE = gs_7
6685 + signature MLTREE_EVAL = gs_29
6686 + signature PSEUDO_OPS_BASIS = gs_32
6687 + structure PseudoOpsBasisTyp = gs_36
6688 + functor PseudoOpsLittle = gs_34
6689 + structure Word32 = gs_22
6690 + ../x86/flowgraph/x86-darwin-pseudo-ops.sml
6692 + functor gs_37 = X86DarwinPseudoOps
6697 + functor gs_38 = Shuffle
6702 + structure gs_39 = List
6705 + structure CellsBasis = gs_1
6706 + structure List = gs_39
6707 + functor Shuffle = gs_38
6708 + signature X86INSTR = gs_17
6709 + functor X86Instr = gs_18
6710 + signature X86SHUFFLE = gs_30
6711 + ../x86/instructions/x86Shuffle.sml
6713 + functor gs_40 = X86Shuffle
6718 + signature gs_41 = CONTROL_FLOW_GRAPH
6723 + signature gs_42 = MLTREE_STREAM
6726 + ../x86/instructions/x86instr-ext.sml
6728 + structure gs_43 = X86InstrExt
6731 + signature CONTROL_FLOW_GRAPH = gs_41
6732 + signature MLRISC_ERROR_MSG = gs_2
6733 + structure MLRiscErrorMsg = gs_3
6734 + signature MLTREE_STREAM = gs_42
6735 + signature X86INSTR = gs_17
6736 + functor X86Instr = gs_18
6737 + structure X86InstrExt = gs_43
6738 + ../x86/instructions/x86comp-instr-ext.sml
6740 + signature gs_44 = X86COMP_INSTR_EXT
6741 + functor gs_45 = X86CompInstrExt
6746 + functor gs_46 = GasPseudoOps
6749 + structure Format = gs_35
6750 + functor GasPseudoOps = gs_46
6751 + signature MLRISC_ERROR_MSG = gs_2
6752 + structure MLRiscErrorMsg = gs_3
6753 + signature MLTREE = gs_7
6754 + signature MLTREE_EVAL = gs_29
6755 + signature PSEUDO_OPS_BASIS = gs_32
6756 + structure PseudoOpsBasisTyp = gs_36
6757 + functor PseudoOpsLittle = gs_34
6758 + structure Word32 = gs_22
6759 + ../x86/flowgraph/x86GasPseudoOps.sml
6761 + functor gs_47 = X86GasPseudoOps
6766 + signature gs_48 = C_CALLS
6771 + structure gs_49 = CTypes
6776 + structure gs_50 = IntInf
6781 + structure gs_51 = MLRiscAnnotations
6786 + structure gs_52 = String
6789 + structure CTypes = gs_49
6790 + signature C_CALLS = gs_48
6791 + structure Int = gs_13
6792 + structure Int32 = gs_10
6793 + structure IntInf = gs_50
6794 + structure List = gs_39
6795 + signature MLRISC_ERROR_MSG = gs_2
6796 + structure MLRiscAnnotations = gs_51
6797 + structure MLRiscErrorMsg = gs_3
6798 + signature MLTREE = gs_7
6799 + structure String = gs_52
6800 + structure Word = gs_27
6801 + signature X86CELLS = gs_15
6802 + structure X86Cells = gs_16
6803 + structure X86InstrExt = gs_43
6804 + ../x86/c-calls/ia32-svid.sml
6806 + functor gs_53 = IA32SVID_CCalls
6811 + signature gs_54 = FREQUENCY_PROPERTIES
6816 + signature gs_55 = PROBABILITY
6817 + structure gs_56 = Probability
6820 + signature FREQUENCY_PROPERTIES = gs_54
6821 + structure MLRiscAnnotations = gs_51
6822 + signature PROBABILITY = gs_55
6823 + structure Probability = gs_56
6824 + signature X86INSTR = gs_17
6825 + functor X86Instr = gs_18
6826 + ../x86/instructions/x86FreqProps.sml
6828 + functor gs_57 = X86FreqProps
6833 + signature gs_58 = MLTREE_HASH
6836 + structure CellsBasis = gs_1
6837 + signature INSN_PROPERTIES = gs_4
6838 + structure Int = gs_13
6839 + structure Int32 = gs_10
6840 + structure Label = gs_9
6841 + signature MLRISC_ERROR_MSG = gs_2
6842 + structure MLRiscErrorMsg = gs_3
6843 + signature MLTREE_EVAL = gs_29
6844 + signature MLTREE_HASH = gs_58
6845 + structure Word = gs_27
6846 + signature X86INSTR = gs_17
6847 + functor X86Instr = gs_18
6848 + ../x86/instructions/x86Props.sml
6850 + functor gs_59 = X86Props
6855 + signature gs_60 = SDI_JUMPS
6858 + signature MC_EMIT = gs_21
6859 + signature MLRISC_ERROR_MSG = gs_2
6860 + structure MLRiscErrorMsg = gs_3
6861 + signature MLTREE_EVAL = gs_29
6862 + signature SDI_JUMPS = gs_60
6863 + structure Word8Vector = gs_25
6864 + signature X86INSTR = gs_17
6865 + functor X86Instr = gs_18
6866 + signature X86SHUFFLE = gs_30
6867 + ../x86/backpatch/x86Jumps.sml
6869 + functor gs_61 = X86Jumps
6872 + signature CELLS_BASIS = gs_8
6873 + structure CellsBasis = gs_1
6874 + signature X86INSTR = gs_17
6875 + functor X86Instr = gs_18
6876 + ../x86/ra/x86Rewrite.sig
6878 + signature gs_62 = X86REWRITE
6883 + signature gs_63 = CFG_OPTIMIZATION
6888 + functor gs_64 = GetReg
6893 + functor gs_65 = RegisterAllocator
6898 + functor gs_66 = MemoryRA
6903 + functor gs_67 = RADeadCodeElim
6908 + functor gs_68 = ClusterRA
6913 + signature gs_69 = LIVENESS
6914 + functor gs_70 = Liveness
6919 + signature gs_71 = PRINT_FLOWGRAPH
6920 + functor gs_72 = PrintFlowgraph
6925 + structure gs_73 = IntHashTable
6930 + signature gs_74 = MLRISC_CONTROL
6931 + structure gs_75 = MLRiscControl
6936 + structure gs_76 = Graph
6941 + structure gs_77 = Array
6946 + signature gs_78 = RA_SPILL
6951 + signature gs_79 = RA_SPILL_HEURISTICS
6956 + structure gs_80 = RAGraph
6961 + structure gs_81 = IntRedBlackMap
6966 + structure gs_82 = StringOutStream
6971 + signature gs_83 = ASM_STREAM
6972 + structure gs_84 = AsmStream
6977 + structure gs_85 = ListMergeSort
6982 + structure gs_86 = TextIO
6987 + structure gs_87 = ListPair
6990 + signature ASM_STREAM = gs_83
6991 + structure Annotations = gs_11
6992 + structure Array = gs_77
6993 + structure AsmStream = gs_84
6994 + signature CFG_OPTIMIZATION = gs_63
6995 + signature CONTROL_FLOW_GRAPH = gs_41
6996 + structure CellsBasis = gs_1
6997 + structure Graph = gs_76
6998 + signature INSN_PROPERTIES = gs_4
6999 + signature INSTRUCTION_EMITTER = gs_28
7000 + structure Int = gs_13
7001 + structure IntHashTable = gs_73
7002 + structure IntRedBlackMap = gs_81
7003 + signature LIVENESS = gs_69
7004 + structure Label = gs_9
7005 + structure List = gs_39
7006 + structure ListMergeSort = gs_85
7007 + structure ListPair = gs_87
7008 + functor Liveness = gs_70
7009 + signature MLRISC_CONTROL = gs_74
7010 + signature MLRISC_ERROR_MSG = gs_2
7011 + structure MLRiscAnnotations = gs_51
7012 + structure MLRiscControl = gs_75
7013 + structure MLRiscErrorMsg = gs_3
7014 + structure String = gs_52
7015 + structure StringOutStream = gs_82
7016 + structure TextIO = gs_86
7017 + signature X86INSTR = gs_17
7018 + functor X86Instr = gs_18
7019 + ../x86/mltree/x86-fp.sml
7021 + functor gs_88 = X86FP
7024 + structure Annotations = gs_11
7025 + structure Array = gs_77
7026 + signature CFG_OPTIMIZATION = gs_63
7027 + signature CONTROL_FLOW_GRAPH = gs_41
7028 + structure CellsBasis = gs_1
7029 + functor ClusterRA = gs_68
7030 + functor GetReg = gs_64
7031 + structure Graph = gs_76
7032 + signature INSN_PROPERTIES = gs_4
7033 + signature INSTRUCTION_EMITTER = gs_28
7034 + structure IntHashTable = gs_73
7035 + signature LIVENESS = gs_69
7036 + structure List = gs_39
7037 + functor Liveness = gs_70
7038 + signature MLRISC_CONTROL = gs_74
7039 + signature MLRISC_ERROR_MSG = gs_2
7040 + structure MLRiscControl = gs_75
7041 + structure MLRiscErrorMsg = gs_3
7042 + functor MemoryRA = gs_66
7043 + signature PRINT_FLOWGRAPH = gs_71
7044 + functor PrintFlowgraph = gs_72
7045 + functor RADeadCodeElim = gs_67
7046 + structure RAGraph = gs_80
7047 + signature RA_SPILL = gs_78
7048 + signature RA_SPILL_HEURISTICS = gs_79
7049 + functor RegisterAllocator = gs_65
7050 + functor X86FP = gs_88
7051 + signature X86INSTR = gs_17
7052 + functor X86Instr = gs_18
7053 + functor X86SpillInstr = gs_19
7054 + ../x86/ra/x86RA.sml
7056 + functor gs_89 = X86RA
7061 + signature gs_90 = OMIT_FRAME_POINTER
7066 + structure gs_91 = General
7069 + signature CONTROL_FLOW_GRAPH = gs_41
7070 + structure CellsBasis = gs_1
7071 + structure General = gs_91
7072 + structure Graph = gs_76
7073 + structure Int32 = gs_10
7074 + structure IntHashTable = gs_73
7075 + structure ListPair = gs_87
7076 + signature MEMORY_REGISTERS = gs_20
7077 + signature MLRISC_CONTROL = gs_74
7078 + signature MLRISC_ERROR_MSG = gs_2
7079 + structure MLRiscAnnotations = gs_51
7080 + structure MLRiscControl = gs_75
7081 + structure MLRiscErrorMsg = gs_3
7082 + signature OMIT_FRAME_POINTER = gs_90
7083 + structure Option = gs_26
7084 + signature X86INSTR = gs_17
7085 + functor X86Instr = gs_18
7086 + ../x86/omit-frameptr/x86omit-frameptr.sml
7088 + functor gs_92 = X86OmitFramePointer
7093 + signature gs_93 = ASM_FORMAT_UTIL
7094 + structure gs_94 = AsmFormatUtil
7099 + structure gs_95 = Char
7104 + structure gs_96 = AsmFlags
7109 + signature gs_97 = INSTRUCTION_STREAM
7112 + signature ASM_FORMAT_UTIL = gs_93
7113 + signature ASM_STREAM = gs_83
7114 + structure Annotations = gs_11
7115 + structure AsmFlags = gs_96
7116 + structure AsmFormatUtil = gs_94
7117 + structure AsmStream = gs_84
7118 + structure CellsBasis = gs_1
7119 + structure Char = gs_95
7120 + signature INSTRUCTION_EMITTER = gs_28
7121 + signature INSTRUCTION_STREAM = gs_97
7122 + structure Int = gs_13
7123 + structure Int32 = gs_10
7124 + signature MEMORY_REGISTERS = gs_20
7125 + signature MLRISC_ERROR_MSG = gs_2
7126 + structure MLRiscErrorMsg = gs_3
7127 + signature MLTREE_EVAL = gs_29
7128 + structure Option = gs_26
7129 + structure String = gs_52
7130 + structure TextIO = gs_86
7131 + signature X86INSTR = gs_17
7132 + functor X86Instr = gs_18
7133 + signature X86SHUFFLE = gs_30
7134 + ../x86/emit/x86Asm.sml
7136 + functor gs_98 = X86AsmEmitter
7139 + structure CellsBasis = gs_1
7140 + signature MLRISC_ERROR_MSG = gs_2
7141 + structure MLRiscErrorMsg = gs_3
7142 + signature X86INSTR = gs_17
7143 + functor X86Instr = gs_18
7144 + signature X86REWRITE = gs_62
7145 + ../x86/ra/x86Rewrite.sml
7147 + functor gs_99 = X86Rewrite
7152 + functor gs_100 = MLTreeGen
7157 + signature gs_101 = MLTREECOMP
7158 + signature gs_102 = MLTREE_EXTENSION_COMP
7163 + signature gs_103 = MLTREE_UTILS
7166 + structure Annotations = gs_11
7167 + structure CellsBasis = gs_1
7168 + structure Int = gs_13
7169 + structure Int32 = gs_10
7170 + structure Label = gs_9
7171 + structure List = gs_39
7172 + signature MLRISC_ERROR_MSG = gs_2
7173 + structure MLRiscAnnotations = gs_51
7174 + structure MLRiscErrorMsg = gs_3
7175 + signature MLTREECOMP = gs_101
7176 + signature MLTREE_EXTENSION_COMP = gs_102
7177 + signature MLTREE_STREAM = gs_42
7178 + signature MLTREE_UTILS = gs_103
7179 + functor MLTreeGen = gs_100
7180 + signature PROBABILITY = gs_55
7181 + structure Probability = gs_56
7182 + functor Shuffle = gs_38
7183 + structure Word = gs_27
7184 + structure Word32 = gs_22
7185 + signature X86INSTR = gs_17
7186 + functor X86Instr = gs_18
7187 + ../x86/mltree/x86.sml
7189 + functor gs_104 = X86
7192 + functor IA32SVID_CCalls = gs_53
7193 + signature MEMORY_REGISTERS = gs_20
7194 + functor X86 = gs_104
7195 + functor X86AsmEmitter = gs_98
7196 + signature X86CELLS = gs_15
7197 + signature X86COMP_INSTR_EXT = gs_44
7198 + structure X86Cells = gs_16
7199 + functor X86CompInstrExt = gs_45
7200 + functor X86DarwinPseudoOps = gs_37
7201 + functor X86FP = gs_88
7202 + functor X86FreqProps = gs_57
7203 + functor X86GasPseudoOps = gs_47
7204 + signature X86INSTR = gs_17
7205 + functor X86Instr = gs_18
7206 + structure X86InstrExt = gs_43
7207 + functor X86Jumps = gs_61
7208 + functor X86MCEmitter = gs_31
7209 + functor X86OmitFramePointer = gs_92
7210 + functor X86Props = gs_59
7211 + functor X86RA = gs_89
7212 + signature X86REWRITE = gs_62
7213 + functor X86Rewrite = gs_99
7214 + signature X86SHUFFLE = gs_30
7215 + functor X86Shuffle = gs_40
7216 + functor X86SpillInstr = gs_19
7221 diff --git a/mlb/Lib.mlb b/mlb/Lib.mlb
7222 new file mode 100644
7223 index 0000000..3748f93
7229 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
7230 + "redundantBind warn" "redundantMatch warn"
7231 + "sequenceNonUnit ignore"
7232 + "warnUnused false" "forceUsed"
7233 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
7239 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
7243 + $(SML_LIB)/basis/pervasive.mlb
7245 + ../library/array-noneq.sig
7247 + signature gs_0 = ARRAY_NONEQ
7252 + structure gs_1 = ArraySlice
7257 + structure gs_2 = Array
7262 + structure gs_3 = Vector
7267 + structure gs_4 = General
7272 + structure gs_5 = Int
7275 + signature ARRAY_NONEQ = gs_0
7276 + structure Array = gs_2
7277 + structure ArraySlice = gs_1
7278 + structure General = gs_4
7279 + structure Int = gs_5
7280 + structure Vector = gs_3
7281 + ../library/dynamic-array.sml
7283 + structure gs_6 = DynArray
7288 + structure gs_7 = String
7293 + structure gs_8 = Word
7298 + structure gs_9 = Word8
7303 + structure gs_10 = Word8Array
7306 + ../library/bitset.sig
7308 + signature gs_11 = BITSET
7311 + signature BITSET = gs_11
7312 + structure String = gs_7
7313 + structure Word = gs_8
7314 + structure Word8 = gs_9
7315 + structure Word8Array = gs_10
7316 + ../library/bitset.sml
7318 + structure gs_12 = BitSet
7323 + structure gs_13 = TextIO
7326 + structure TextIO = gs_13
7327 + ../library/stringOutStream.sig
7329 + signature gs_14 = STRING_OUTSTREAM
7332 + structure String = gs_7
7333 + ../library/line-break.sml
7335 + signature gs_15 = LINE_BREAK
7336 + structure gs_16 = LineBreak
7341 + structure gs_17 = Real
7346 + structure gs_18 = List
7351 + structure gs_19 = IntInf
7354 + structure Int = gs_5
7355 + structure IntInf = gs_19
7356 + structure List = gs_18
7357 + structure Real = gs_17
7358 + ../library/probability.sml
7360 + signature gs_20 = PROBABILITY
7361 + structure gs_21 = Probability
7366 + structure gs_22 = TextPrimIO
7371 + structure gs_23 = CharArraySlice
7376 + structure gs_24 = CharVectorSlice
7381 + structure gs_25 = IO
7384 + structure CharArraySlice = gs_23
7385 + structure CharVectorSlice = gs_24
7386 + structure IO = gs_25
7387 + structure List = gs_18
7388 + signature STRING_OUTSTREAM = gs_14
7389 + structure String = gs_7
7390 + structure TextIO = gs_13
7391 + structure TextPrimIO = gs_22
7392 + ../library/stringOutStream.sml
7394 + structure gs_26 = StringOutStream
7397 + ../library/catlist.sml
7399 + signature gs_27 = CATNETABLE_LIST
7400 + structure gs_28 = CatnetableList
7403 + ../library/priQueue.sig
7405 + signature gs_29 = PRIORITY_QUEUE
7408 + structure Array = gs_2
7409 + signature PRIORITY_QUEUE = gs_29
7410 + ../library/heap.sml
7412 + structure gs_30 = PriorityHeap
7415 + ../library/annotations.sig
7417 + signature gs_31 = ANNOTATIONS
7420 + signature ANNOTATIONS = gs_31
7421 + ../library/annotations.sml
7423 + structure gs_32 = Annotations
7426 + signature ARRAY_NONEQ = gs_0
7427 + structure Array = gs_2
7428 + structure List = gs_18
7429 + structure Vector = gs_3
7430 + structure Word = gs_8
7431 + ../library/hash-array.sml
7433 + structure gs_33 = HashArray
7436 + ../library/cache.sml
7438 + signature gs_34 = CACHE_REF
7439 + structure gs_35 = CacheRef
7442 + ../library/sortedlist.sml
7444 + structure gs_36 = SortedList
7447 + structure Int = gs_5
7448 + signature PRIORITY_QUEUE = gs_29
7449 + ../library/priQueue.sml
7451 + structure gs_37 = PriorityQueue
7456 + signature gs_38 = INTEGER
7459 + signature INTEGER = gs_38
7460 + ../library/freq.sig
7462 + signature gs_39 = FREQ
7465 + signature FREQ = gs_39
7466 + structure Int = gs_5
7467 + ../library/freq.sml
7469 + structure gs_40 = Freq
7472 + signature ANNOTATIONS = gs_31
7473 + signature ARRAY_NONEQ = gs_0
7474 + structure Annotations = gs_32
7475 + signature BITSET = gs_11
7476 + structure BitSet = gs_12
7477 + signature CACHE_REF = gs_34
7478 + signature CATNETABLE_LIST = gs_27
7479 + structure CacheRef = gs_35
7480 + structure CatnetableList = gs_28
7481 + structure DynArray = gs_6
7482 + signature FREQ = gs_39
7483 + structure Freq = gs_40
7484 + structure HashArray = gs_33
7485 + signature LINE_BREAK = gs_15
7486 + structure LineBreak = gs_16
7487 + signature PRIORITY_QUEUE = gs_29
7488 + signature PROBABILITY = gs_20
7489 + structure PriorityHeap = gs_30
7490 + structure PriorityQueue = gs_37
7491 + structure Probability = gs_21
7492 + signature STRING_OUTSTREAM = gs_14
7493 + structure SortedList = gs_36
7494 + structure StringOutStream = gs_26
7499 diff --git a/mlb/MLRISC.mlb b/mlb/MLRISC.mlb
7500 new file mode 100644
7501 index 0000000..4b1a3fa
7503 +++ b/mlb/MLRISC.mlb
7507 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
7508 + "redundantBind warn" "redundantMatch warn"
7509 + "sequenceNonUnit ignore"
7510 + "warnUnused false" "forceUsed"
7511 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
7517 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
7521 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
7525 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
7529 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
7533 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
7537 + $(SML_LIB)/basis/pervasive.mlb
7541 + structure gs_0 = Graph
7546 + structure gs_1 = Annotations
7551 + structure gs_2 = TextIO
7556 + signature gs_3 = MONO_HASH_TABLE
7561 + structure gs_4 = Array
7564 + structure Annotations = gs_1
7565 + structure Array = gs_4
7566 + signature MONO_HASH_TABLE = gs_3
7567 + ../instructions/cells-basis.sig
7569 + signature gs_5 = CELLS_BASIS
7574 + functor gs_6 = HashTableFn
7579 + structure gs_7 = String
7584 + structure gs_8 = Word
7589 + structure gs_9 = List
7594 + signature gs_10 = MLRISC_ERROR_MSG
7595 + structure gs_11 = MLRiscErrorMsg
7600 + structure gs_12 = Int
7603 + structure Annotations = gs_1
7604 + structure Array = gs_4
7605 + signature CELLS_BASIS = gs_5
7606 + functor HashTableFn = gs_6
7607 + structure Int = gs_12
7608 + structure List = gs_9
7609 + signature MLRISC_ERROR_MSG = gs_10
7610 + structure MLRiscErrorMsg = gs_11
7611 + structure String = gs_7
7612 + structure Word = gs_8
7613 + ../instructions/cells-basis.sml
7615 + structure gs_13 = CellsBasis
7618 + structure CellsBasis = gs_13
7619 + ../instructions/cells.sig
7621 + signature gs_14 = CELLS
7624 + structure Annotations = gs_1
7625 + signature CELLS = gs_14
7626 + signature CELLS_BASIS = gs_5
7627 + structure CellsBasis = gs_13
7628 + ../instructions/instructions.sig
7630 + signature gs_15 = INSTRUCTIONS
7635 + structure gs_16 = Word8
7640 + structure gs_17 = Int32
7645 + structure gs_18 = IntInf
7650 + structure gs_19 = Int64
7655 + structure gs_20 = Word32
7658 + structure Int32 = gs_17
7659 + structure Int64 = gs_19
7660 + structure IntInf = gs_18
7661 + structure Word32 = gs_20
7662 + ../mltree/machine-int.sig
7664 + signature gs_21 = MACHINE_INT
7667 + ../mltree/mltree-extension.sig
7669 + signature gs_22 = MLTREE_EXTENSION
7672 + ../mltree/mltree-basis.sig
7674 + signature gs_23 = MLTREE_BASIS
7677 + ../instructions/region.sig
7679 + signature gs_24 = REGION
7682 + ../instructions/constant.sig
7684 + signature gs_25 = CONSTANT
7687 + ../instructions/label-sig.sml
7689 + signature gs_26 = LABEL
7692 + signature LABEL = gs_26
7693 + structure Word = gs_8
7694 + ../instructions/label.sml
7696 + structure gs_27 = Label
7699 + structure Annotations = gs_1
7700 + signature CONSTANT = gs_25
7701 + structure CellsBasis = gs_13
7702 + structure Int32 = gs_17
7703 + structure Label = gs_27
7704 + signature MACHINE_INT = gs_21
7705 + signature MLTREE_BASIS = gs_23
7706 + signature MLTREE_EXTENSION = gs_22
7707 + signature REGION = gs_24
7708 + ../mltree/mltree.sig
7710 + signature gs_28 = MLTREE
7715 + structure gs_29 = Atom
7718 + structure Atom = gs_29
7719 + structure Label = gs_27
7720 + ../flowgraph/pseudo-ops-basis-typ.sml
7722 + structure gs_30 = PseudoOpsBasisTyp
7725 + structure Label = gs_27
7726 + signature MLTREE = gs_28
7727 + structure PseudoOpsBasisTyp = gs_30
7728 + structure Word8 = gs_16
7729 + ../flowgraph/pseudo-ops-basis.sig
7731 + signature gs_31 = PSEUDO_OPS_BASIS
7734 + signature PSEUDO_OPS_BASIS = gs_31
7735 + structure Word8 = gs_16
7736 + ../flowgraph/client-pseudo-ops.sig
7738 + signature gs_32 = CLIENT_PSEUDO_OPS
7741 + signature CLIENT_PSEUDO_OPS = gs_32
7742 + signature MLTREE = gs_28
7743 + structure PseudoOpsBasisTyp = gs_30
7744 + structure Word8 = gs_16
7745 + ../flowgraph/pseudo-ops.sig
7747 + signature gs_33 = PSEUDO_OPS
7750 + structure Annotations = gs_1
7751 + structure Graph = gs_0
7752 + signature INSTRUCTIONS = gs_15
7753 + structure Label = gs_27
7754 + signature PSEUDO_OPS = gs_33
7755 + structure TextIO = gs_2
7756 + ../flowgraph/cfg.sig
7758 + signature gs_34 = CONTROL_FLOW_GRAPH
7761 + signature CONTROL_FLOW_GRAPH = gs_34
7762 + ../emit/asmEmit.sig
7764 + signature gs_35 = ASSEMBLY_EMITTER
7767 + structure List = gs_9
7768 + signature MLTREE = gs_28
7769 + ../mltree/mltree-check-ty.sml
7771 + functor gs_36 = MLTreeCheckTy
7776 + signature gs_37 = GRAPH_IMPLEMENTATION
7779 + structure Array = gs_4
7780 + signature GRAPH_IMPLEMENTATION = gs_37
7781 + structure Graph = gs_0
7782 + ../ir-archive/dominator.sig
7784 + signature gs_38 = DOMINATOR_TREE
7787 + structure Array = gs_4
7788 + signature DOMINATOR_TREE = gs_38
7789 + signature GRAPH_IMPLEMENTATION = gs_37
7790 + structure Graph = gs_0
7791 + ../ir-archive/loop-structure.sig
7793 + signature gs_39 = LOOP_STRUCTURE
7798 + structure gs_40 = BitSet
7803 + signature gs_41 = REVERSED_GRAPH_VIEW
7804 + structure gs_42 = ReversedGraphView
7807 + structure Array = gs_4
7808 + structure BitSet = gs_40
7809 + signature DOMINATOR_TREE = gs_38
7810 + signature GRAPH_IMPLEMENTATION = gs_37
7811 + structure Graph = gs_0
7812 + structure List = gs_9
7813 + signature REVERSED_GRAPH_VIEW = gs_41
7814 + structure ReversedGraphView = gs_42
7815 + ../ir-archive/dominator.sml
7817 + functor gs_43 = DominatorTree
7820 + structure Annotations = gs_1
7821 + structure Label = gs_27
7822 + signature PSEUDO_OPS = gs_33
7823 + ../instructions/stream.sig
7825 + signature gs_44 = INSTRUCTION_STREAM
7828 + structure Annotations = gs_1
7829 + signature INSTRUCTION_STREAM = gs_44
7830 + structure Label = gs_27
7831 + signature PSEUDO_OPS = gs_33
7832 + ../instructions/stream.sml
7834 + functor gs_45 = InstructionStream
7837 + signature MLTREE = gs_28
7838 + ../mltree/mltree-size.sig
7840 + signature gs_46 = MLTREE_SIZE
7843 + structure Annotations = gs_1
7844 + structure CellsBasis = gs_13
7845 + signature MLTREE = gs_28
7846 + signature MLTREE_SIZE = gs_46
7847 + ../mltree/mltree-gen.sig
7849 + signature gs_47 = MLTREEGEN
7852 + signature INSTRUCTION_STREAM = gs_44
7853 + signature MLTREE = gs_28
7854 + ../mltree/mltree-stream.sig
7856 + signature gs_48 = MLTREE_STREAM
7859 + signature CONTROL_FLOW_GRAPH = gs_34
7860 + structure CellsBasis = gs_13
7861 + signature INSTRUCTIONS = gs_15
7862 + signature MLTREE = gs_28
7863 + signature MLTREEGEN = gs_47
7864 + signature MLTREE_STREAM = gs_48
7865 + ../mltree/mltreecomp.sig
7867 + signature gs_49 = MLTREECOMP
7868 + signature gs_50 = MLTREE_EXTENSION_COMP
7873 + structure gs_51 = Format
7876 + structure TextIO = gs_2
7877 + ../emit/asmStream.sml
7879 + signature gs_52 = ASM_STREAM
7880 + structure gs_53 = AsmStream
7883 + structure Annotations = gs_1
7884 + signature INSTRUCTIONS = gs_15
7885 + signature INSTRUCTION_STREAM = gs_44
7886 + ../emit/instruction-emitter.sig
7888 + signature gs_54 = INSTRUCTION_EMITTER
7891 + signature ASM_STREAM = gs_52
7892 + structure AsmStream = gs_53
7893 + signature CONTROL_FLOW_GRAPH = gs_34
7894 + structure Format = gs_51
7895 + structure Graph = gs_0
7896 + signature INSTRUCTION_EMITTER = gs_54
7897 + structure Int = gs_12
7898 + structure List = gs_9
7899 + structure TextIO = gs_2
7900 + ../flowgraph/printFlowgraph.sml
7902 + signature gs_55 = PRINT_FLOWGRAPH
7903 + functor gs_56 = PrintFlowgraph
7906 + structure Array = gs_4
7909 + signature gs_57 = GETREG
7912 + structure Array = gs_4
7913 + signature GETREG = gs_57
7916 + functor gs_58 = GetReg
7919 + signature INSTRUCTIONS = gs_15
7920 + structure Label = gs_27
7921 + ../backpatch/delaySlotProps.sig
7923 + signature gs_59 = DELAY_SLOT_PROPERTIES
7926 + structure Int = gs_12
7927 + structure List = gs_9
7928 + ../c-calls/c-types.sml
7930 + structure gs_60 = CTypes
7933 + structure CTypes = gs_60
7934 + signature MLTREE = gs_28
7935 + ../c-calls/c-calls.sig
7937 + signature gs_61 = C_CALLS
7940 + signature C_CALLS = gs_61
7941 + signature MLTREE = gs_28
7942 + ../c-calls/unimplemented-c-calls.sml
7944 + functor gs_62 = UnimplementedCCallsFn
7949 + signature gs_63 = MLRISC_CONTROL
7950 + structure gs_64 = MLRiscControl
7955 + structure gs_65 = ListMergeSort
7958 + signature CELLS_BASIS = gs_5
7959 + structure CellsBasis = gs_13
7960 + ../aliasing/pointsTo.sig
7962 + signature gs_66 = POINTS_TO
7965 + structure CellsBasis = gs_13
7966 + structure Int = gs_12
7967 + structure ListMergeSort = gs_65
7968 + signature MLRISC_CONTROL = gs_63
7969 + signature MLRISC_ERROR_MSG = gs_10
7970 + structure MLRiscControl = gs_64
7971 + structure MLRiscErrorMsg = gs_11
7972 + signature POINTS_TO = gs_66
7973 + ../aliasing/pointsTo.sml
7975 + structure gs_67 = PointsTo
7980 + structure gs_68 = Char
7983 + signature MLTREE = gs_28
7984 + structure PseudoOpsBasisTyp = gs_30
7985 + structure Word8 = gs_16
7986 + ../flowgraph/pseudo-ops-endian.sig
7988 + signature gs_69 = PSEUDO_OPS_ENDIAN
7991 + structure IntInf = gs_18
7992 + structure Label = gs_27
7993 + signature MLTREE = gs_28
7994 + ../mltree/mltree-eval.sig
7996 + signature gs_70 = MLTREE_EVAL
7999 + structure Char = gs_68
8000 + structure Int = gs_12
8001 + structure IntInf = gs_18
8002 + structure Label = gs_27
8003 + signature MLRISC_ERROR_MSG = gs_10
8004 + structure MLRiscErrorMsg = gs_11
8005 + signature MLTREE = gs_28
8006 + signature MLTREE_EVAL = gs_70
8007 + signature PSEUDO_OPS_ENDIAN = gs_69
8008 + structure PseudoOpsBasisTyp = gs_30
8009 + structure String = gs_7
8010 + structure Word = gs_8
8011 + structure Word32 = gs_20
8012 + structure Word8 = gs_16
8013 + ../flowgraph/pseudo-ops-big.sml
8015 + functor gs_71 = PseudoOpsBig
8018 + signature CONTROL_FLOW_GRAPH = gs_34
8019 + ../backpatch/bbsched.sig
8021 + signature gs_72 = BBSCHED
8024 + structure Annotations = gs_1
8025 + signature CELLS = gs_14
8026 + structure CellsBasis = gs_13
8027 + signature INSTRUCTIONS = gs_15
8028 + structure Label = gs_27
8029 + ../instructions/insnProps.sig
8031 + signature gs_73 = INSN_PROPERTIES
8034 + signature CELLS = gs_14
8035 + signature INSTRUCTIONS = gs_15
8036 + structure Label = gs_27
8037 + ../backpatch/sdi-jumps.sig
8039 + signature gs_74 = SDI_JUMPS
8042 + structure Array = gs_4
8043 + signature BBSCHED = gs_72
8044 + signature CONTROL_FLOW_GRAPH = gs_34
8045 + signature DELAY_SLOT_PROPERTIES = gs_59
8046 + structure Graph = gs_0
8047 + signature INSN_PROPERTIES = gs_73
8048 + signature INSTRUCTION_EMITTER = gs_54
8049 + structure Label = gs_27
8050 + structure List = gs_9
8051 + signature MLRISC_CONTROL = gs_63
8052 + signature MLRISC_ERROR_MSG = gs_10
8053 + structure MLRiscControl = gs_64
8054 + structure MLRiscErrorMsg = gs_11
8055 + signature SDI_JUMPS = gs_74
8056 + ../backpatch/spanDep.sml
8058 + functor gs_75 = SpanDependencyResolution
8061 + structure Label = gs_27
8062 + signature MLTREE = gs_28
8063 + structure PseudoOpsBasisTyp = gs_30
8064 + ../flowgraph/as-pseudo-ops.sig
8066 + signature gs_76 = AS_PSEUDO_OPS
8069 + signature AS_PSEUDO_OPS = gs_76
8070 + structure Atom = gs_29
8071 + structure Format = gs_51
8072 + structure Int = gs_12
8073 + structure IntInf = gs_18
8074 + structure Label = gs_27
8075 + signature MLRISC_ERROR_MSG = gs_10
8076 + structure MLRiscErrorMsg = gs_11
8077 + signature MLTREE = gs_28
8078 + structure PseudoOpsBasisTyp = gs_30
8079 + structure String = gs_7
8080 + ../flowgraph/darwin-pseudo-ops.sml
8082 + functor gs_77 = DarwinPseudoOps
8085 + signature CELLS = gs_14
8086 + structure CellsBasis = gs_13
8087 + ../ra/ra-flowgraph-part.sig
8089 + signature gs_78 = RA_FLOWGRAPH_PARTITIONER
8092 + structure Word8 = gs_16
8093 + ../emit/code-string.sig
8095 + signature gs_79 = CODE_STRING
8100 + signature gs_80 = PROBABILITY
8101 + structure gs_81 = Probability
8106 + structure gs_82 = Real
8109 + signature CONTROL_FLOW_GRAPH = gs_34
8110 + ../frequencies/compute-execution-freqs.sig
8112 + signature gs_83 = COMPUTE_EXECUTION_FREQUENCIES
8115 + structure Annotations = gs_1
8116 + signature CELLS_BASIS = gs_5
8117 + structure CellsBasis = gs_13
8118 + signature PROBABILITY = gs_80
8119 + structure Probability = gs_81
8120 + ../instructions/mlriscAnnotations.sig
8122 + signature gs_84 = MLRISC_ANNOTATIONS
8125 + structure Annotations = gs_1
8126 + structure CellsBasis = gs_13
8127 + structure Int = gs_12
8128 + signature MLRISC_ANNOTATIONS = gs_84
8129 + signature PROBABILITY = gs_80
8130 + structure Probability = gs_81
8131 + ../instructions/mlriscAnnotations.sml
8133 + structure gs_85 = MLRiscAnnotations
8136 + signature CONTROL_FLOW_GRAPH = gs_34
8137 + structure Graph = gs_0
8138 + structure List = gs_9
8139 + signature MLRISC_CONTROL = gs_63
8140 + structure MLRiscAnnotations = gs_85
8141 + structure MLRiscControl = gs_64
8142 + signature PROBABILITY = gs_80
8143 + structure Probability = gs_81
8144 + ../frequencies/complete-probs-fn.sml
8146 + functor gs_86 = CompleteProbsFn
8149 + structure Array = gs_4
8150 + signature COMPUTE_EXECUTION_FREQUENCIES = gs_83
8151 + signature CONTROL_FLOW_GRAPH = gs_34
8152 + functor CompleteProbsFn = gs_86
8153 + structure Format = gs_51
8154 + structure Graph = gs_0
8155 + structure Int = gs_12
8156 + structure List = gs_9
8157 + signature MLRISC_CONTROL = gs_63
8158 + structure MLRiscControl = gs_64
8159 + signature PROBABILITY = gs_80
8160 + structure Probability = gs_81
8161 + structure Real = gs_82
8162 + structure TextIO = gs_2
8163 + ../frequencies/compute-freqs-fn.sml
8165 + functor gs_87 = ComputeFreqsFn
8168 + signature MLTREE = gs_28
8169 + ../mltree/mltree-hash.sig
8171 + signature gs_88 = MLTREE_HASH
8174 + ../aliasing/mlriscRegion.sig
8176 + signature gs_89 = MLRISC_REGION
8179 + ../instructions/mlriscOptimization.sig
8181 + signature gs_90 = MLRISC_OPTIMIZATION
8184 + structure CellsBasis = gs_13
8185 + signature INSTRUCTIONS = gs_15
8186 + ../instructions/shuffle.sig
8188 + signature gs_91 = SHUFFLE
8191 + signature CELLS_BASIS = gs_5
8192 + structure CellsBasis = gs_13
8193 + signature INSTRUCTIONS = gs_15
8194 + ../ra/arch-spill-instr.sig
8196 + signature gs_92 = ARCH_SPILL_INSTR
8199 + signature AS_PSEUDO_OPS = gs_76
8200 + structure Atom = gs_29
8201 + structure Format = gs_51
8202 + structure Int = gs_12
8203 + structure IntInf = gs_18
8204 + structure Label = gs_27
8205 + signature MLRISC_ERROR_MSG = gs_10
8206 + structure MLRiscErrorMsg = gs_11
8207 + signature MLTREE = gs_28
8208 + structure PseudoOpsBasisTyp = gs_30
8209 + structure String = gs_7
8210 + ../flowgraph/gasPseudoOps.sml
8212 + functor gs_93 = GasPseudoOps
8215 + structure Array = gs_4
8216 + ../ra/ra-bitmatrix.sig
8218 + signature gs_94 = RA_BITMATRIX
8221 + ../ra/ra-priqueue.sig
8223 + signature gs_95 = RA_PRIORITY_QUEUE
8228 + structure gs_96 = Unsafe
8231 + structure Array = gs_4
8232 + signature RA_BITMATRIX = gs_94
8233 + structure Unsafe = gs_96
8234 + structure Word = gs_8
8235 + ../ra/raBitmatrix.sml
8237 + structure gs_97 = RaBitmatrix
8240 + signature CONTROL_FLOW_GRAPH = gs_34
8241 + structure Graph = gs_0
8242 + signature INSN_PROPERTIES = gs_73
8243 + structure Label = gs_27
8244 + structure List = gs_9
8245 + signature MLRISC_CONTROL = gs_63
8246 + signature MLRISC_ERROR_MSG = gs_10
8247 + structure MLRiscControl = gs_64
8248 + structure MLRiscErrorMsg = gs_11
8249 + structure TextIO = gs_2
8250 + ../block-placement/jump-chain-elim-fn.sml
8252 + functor gs_98 = JumpChainElimFn
8255 + signature CONTROL_FLOW_GRAPH = gs_34
8256 + ../flowgraph/cfg-optimization.sig
8258 + signature gs_99 = CFG_OPTIMIZATION
8261 + signature CFG_OPTIMIZATION = gs_99
8262 + signature CONTROL_FLOW_GRAPH = gs_34
8263 + structure CellsBasis = gs_13
8264 + structure Graph = gs_0
8265 + structure List = gs_9
8266 + signature MLRISC_ERROR_MSG = gs_10
8267 + structure MLRiscErrorMsg = gs_11
8268 + signature SHUFFLE = gs_91
8269 + ../flowgraph/cfgExpandCopies.sml
8271 + functor gs_100 = CFGExpandCopies
8274 + signature INSTRUCTION_STREAM = gs_44
8275 + signature MLTREE = gs_28
8276 + signature MLTREE_STREAM = gs_48
8277 + ../mltree/mltree-stream.sml
8279 + functor gs_101 = MLTreeStream
8282 + structure Char = gs_68
8283 + structure Int = gs_12
8284 + structure IntInf = gs_18
8285 + structure Label = gs_27
8286 + signature MLRISC_ERROR_MSG = gs_10
8287 + structure MLRiscErrorMsg = gs_11
8288 + signature MLTREE = gs_28
8289 + signature MLTREE_EVAL = gs_70
8290 + signature PSEUDO_OPS_ENDIAN = gs_69
8291 + structure PseudoOpsBasisTyp = gs_30
8292 + structure String = gs_7
8293 + structure Word = gs_8
8294 + structure Word32 = gs_20
8295 + structure Word8 = gs_16
8296 + ../flowgraph/pseudo-ops-little.sml
8298 + functor gs_102 = PseudoOpsLittle
8301 + signature MLTREE = gs_28
8302 + signature MLTREE_SIZE = gs_46
8303 + ../mltree/mltree-size.sml
8305 + functor gs_103 = MLTreeSize
8308 + signature CELLS = gs_14
8309 + structure CellsBasis = gs_13
8310 + structure Int = gs_12
8311 + structure Label = gs_27
8312 + signature MLRISC_ERROR_MSG = gs_10
8313 + structure MLRiscErrorMsg = gs_11
8314 + signature MLTREE = gs_28
8315 + signature MLTREEGEN = gs_47
8316 + functor MLTreeSize = gs_103
8317 + ../mltree/mltree-gen.sml
8319 + functor gs_104 = MLTreeGen
8322 + signature MLRISC_ERROR_MSG = gs_10
8323 + structure MLRiscErrorMsg = gs_11
8324 + signature MLTREE_BASIS = gs_23
8325 + ../mltree/mltree-basis.sml
8327 + structure gs_105 = MLTreeBasis
8330 + signature CLIENT_PSEUDO_OPS = gs_32
8331 + signature PSEUDO_OPS = gs_33
8332 + structure PseudoOpsBasisTyp = gs_30
8333 + ../flowgraph/pseudo-ops.sml
8335 + functor gs_106 = PseudoOps
8338 + signature CONTROL_FLOW_GRAPH = gs_34
8339 + ../block-placement/block-placement.sig
8341 + signature gs_107 = BLOCK_PLACEMENT
8346 + structure gs_108 = IntHashTable
8349 + structure Array = gs_4
8350 + signature CELLS_BASIS = gs_5
8351 + structure IntHashTable = gs_108
8352 + signature MONO_HASH_TABLE = gs_3
8353 + signature RA_BITMATRIX = gs_94
8354 + structure RaBitmatrix = gs_97
8355 + ../ra/ra-graph.sig
8357 + signature gs_109 = RA_GRAPH
8360 + structure Array = gs_4
8361 + structure CellsBasis = gs_13
8362 + functor HashTableFn = gs_6
8363 + structure IntHashTable = gs_108
8364 + signature MLRISC_ERROR_MSG = gs_10
8365 + structure MLRiscErrorMsg = gs_11
8366 + signature RA_GRAPH = gs_109
8367 + structure RaBitmatrix = gs_97
8368 + structure Word = gs_8
8369 + ../ra/ra-graph.sml
8371 + structure gs_110 = RAGraph
8374 + structure Annotations = gs_1
8375 + signature CELLS = gs_14
8376 + signature CELLS_BASIS = gs_5
8377 + structure CellsBasis = gs_13
8378 + signature INSTRUCTIONS = gs_15
8379 + structure RAGraph = gs_110
8380 + signature RA_GRAPH = gs_109
8381 + ../ra/ra-spill.sig
8383 + signature gs_111 = RA_SPILL
8386 + signature INSTRUCTIONS = gs_15
8387 + signature PROBABILITY = gs_80
8388 + structure Probability = gs_81
8389 + ../instructions/freqProps.sig
8391 + signature gs_112 = FREQUENCY_PROPERTIES
8394 + signature FREQUENCY_PROPERTIES = gs_112
8395 + signature INSN_PROPERTIES = gs_73
8396 + structure MLRiscAnnotations = gs_85
8397 + signature PROBABILITY = gs_80
8398 + structure Probability = gs_81
8399 + ../instructions/freqProps.sml
8401 + functor gs_113 = FreqProps
8404 + structure Annotations = gs_1
8405 + signature CONTROL_FLOW_GRAPH = gs_34
8406 + structure Format = gs_51
8407 + structure Graph = gs_0
8408 + signature INSN_PROPERTIES = gs_73
8409 + signature INSTRUCTIONS = gs_15
8410 + signature INSTRUCTION_STREAM = gs_44
8411 + structure IntHashTable = gs_108
8412 + structure Label = gs_27
8413 + structure List = gs_9
8414 + signature MLRISC_CONTROL = gs_63
8415 + signature MLRISC_ERROR_MSG = gs_10
8416 + structure MLRiscAnnotations = gs_85
8417 + structure MLRiscControl = gs_64
8418 + structure MLRiscErrorMsg = gs_11
8419 + signature PSEUDO_OPS = gs_33
8420 + structure PseudoOpsBasisTyp = gs_30
8421 + structure Word = gs_8
8422 + ../flowgraph/buildFlowgraph.sml
8424 + functor gs_114 = BuildFlowgraph
8425 + signature gs_115 = CONTROL_FLOWGRAPH_GEN
8428 + structure RAGraph = gs_110
8429 + signature RA_GRAPH = gs_109
8430 + ../ra/ra-spillheur.sig
8432 + signature gs_116 = RA_SPILL_HEURISTICS
8435 + signature MLRISC_CONTROL = gs_63
8436 + structure MLRiscControl = gs_64
8437 + ../emit/asm-flags.sml
8439 + structure gs_117 = AsmFlags
8442 + structure Annotations = gs_1
8443 + structure IntInf = gs_18
8444 + ../gc-safety/gc-type.sig
8446 + signature gs_118 = GC_TYPE
8449 + structure Annotations = gs_1
8450 + signature CELLS = gs_14
8451 + signature CELLS_BASIS = gs_5
8452 + structure CellsBasis = gs_13
8453 + signature GC_TYPE = gs_118
8454 + ../gc-safety/gc-cells.sig
8456 + signature gs_119 = GC_CELLS
8459 + structure Annotations = gs_1
8460 + signature CELLS = gs_14
8461 + structure CellsBasis = gs_13
8462 + signature INSTRUCTIONS = gs_15
8463 + structure RAGraph = gs_110
8464 + signature RA_GRAPH = gs_109
8465 + signature RA_SPILL = gs_111
8466 + structure TextIO = gs_2
8467 + ../ra/ra-flowgraph.sig
8469 + signature gs_120 = RA_FLOWGRAPH
8472 + structure Array = gs_4
8473 + signature CELLS = gs_14
8474 + signature CELLS_BASIS = gs_5
8475 + structure CellsBasis = gs_13
8476 + signature INSTRUCTIONS = gs_15
8477 + structure RAGraph = gs_110
8478 + signature RA_FLOWGRAPH = gs_120
8481 + signature gs_121 = RA
8486 + structure gs_122 = Word8Array
8489 + structure RAGraph = gs_110
8490 + signature RA_BITMATRIX = gs_94
8491 + signature RA_GRAPH = gs_109
8492 + signature RA_PRIORITY_QUEUE = gs_95
8493 + structure TextIO = gs_2
8496 + signature gs_123 = RA_CORE
8499 + signature RA_PRIORITY_QUEUE = gs_95
8500 + ../ra/raPriQueue.sml
8502 + functor gs_124 = RaPriQueue
8505 + structure Array = gs_4
8506 + structure Int = gs_12
8507 + structure IntHashTable = gs_108
8508 + structure List = gs_9
8509 + structure ListMergeSort = gs_65
8510 + signature MLRISC_CONTROL = gs_63
8511 + signature MLRISC_ERROR_MSG = gs_10
8512 + structure MLRiscControl = gs_64
8513 + structure MLRiscErrorMsg = gs_11
8514 + structure RAGraph = gs_110
8515 + signature RA_CORE = gs_123
8516 + functor RaPriQueue = gs_124
8517 + structure Real = gs_82
8518 + structure TextIO = gs_2
8519 + structure Unsafe = gs_96
8520 + structure Word = gs_8
8521 + structure Word8 = gs_16
8522 + structure Word8Array = gs_122
8525 + structure gs_125 = RACore
8528 + structure Array = gs_4
8529 + structure CellsBasis = gs_13
8530 + structure Int = gs_12
8531 + structure IntHashTable = gs_108
8532 + signature MLRISC_CONTROL = gs_63
8533 + signature MLRISC_ERROR_MSG = gs_10
8534 + structure MLRiscControl = gs_64
8535 + structure MLRiscErrorMsg = gs_11
8536 + signature RA = gs_121
8537 + structure RACore = gs_125
8538 + signature RA_FLOWGRAPH = gs_120
8539 + signature RA_SPILL_HEURISTICS = gs_116
8540 + structure Real = gs_82
8541 + structure TextIO = gs_2
8542 + structure Word = gs_8
8545 + functor gs_126 = RegisterAllocator
8548 + structure CellsBasis = gs_13
8549 + structure IntHashTable = gs_108
8550 + structure RACore = gs_125
8551 + signature RA_FLOWGRAPH = gs_120
8552 + structure Word = gs_8
8553 + ../ra/ra-deadCodeE.sml
8555 + functor gs_127 = RADeadCodeElim
8560 + structure gs_128 = URef
8563 + structure Array = gs_4
8564 + signature DOMINATOR_TREE = gs_38
8565 + signature GRAPH_IMPLEMENTATION = gs_37
8566 + structure Graph = gs_0
8567 + signature LOOP_STRUCTURE = gs_39
8568 + structure List = gs_9
8569 + structure URef = gs_128
8570 + ../ir-archive/loop-structure.sml
8572 + functor gs_129 = LoopStructure
8575 + signature CONTROL_FLOW_GRAPH = gs_34
8576 + structure Graph = gs_0
8577 + signature INSN_PROPERTIES = gs_73
8578 + signature INSTRUCTION_EMITTER = gs_54
8579 + structure Label = gs_27
8580 + structure List = gs_9
8581 + signature MLRISC_ERROR_MSG = gs_10
8582 + structure MLRiscErrorMsg = gs_11
8583 + signature SDI_JUMPS = gs_74
8584 + ../backpatch/backpatch.sml
8586 + functor gs_130 = BBSched2
8589 + structure Array = gs_4
8590 + signature CONTROL_FLOW_GRAPH = gs_34
8591 + structure CellsBasis = gs_13
8592 + structure Graph = gs_0
8593 + signature INSN_PROPERTIES = gs_73
8594 + signature INSTRUCTION_EMITTER = gs_54
8595 + structure Int = gs_12
8596 + structure IntHashTable = gs_108
8597 + structure List = gs_9
8598 + structure ListMergeSort = gs_65
8599 + signature MLRISC_CONTROL = gs_63
8600 + signature MLRISC_ERROR_MSG = gs_10
8601 + structure MLRiscControl = gs_64
8602 + structure MLRiscErrorMsg = gs_11
8603 + structure RACore = gs_125
8604 + structure RAGraph = gs_110
8605 + signature RA_FLOWGRAPH = gs_120
8606 + signature RA_SPILL = gs_111
8607 + structure TextIO = gs_2
8608 + structure Unsafe = gs_96
8609 + structure Word = gs_8
8610 + ../ra/cluster-ra.sml
8612 + functor gs_131 = ClusterRA
8615 + structure RACore = gs_125
8616 + structure RAGraph = gs_110
8617 + signature RA_SPILL_HEURISTICS = gs_116
8618 + ../ra/chaitin-spillheur.sml
8620 + structure gs_132 = ChaitinSpillHeur
8625 + functor gs_133 = LeftPriorityQFn
8628 + signature BLOCK_PLACEMENT = gs_107
8629 + signature CONTROL_FLOW_GRAPH = gs_34
8630 + structure Graph = gs_0
8631 + signature INSN_PROPERTIES = gs_73
8632 + structure Int = gs_12
8633 + structure IntHashTable = gs_108
8634 + functor LeftPriorityQFn = gs_133
8635 + structure List = gs_9
8636 + signature MLRISC_CONTROL = gs_63
8637 + structure MLRiscControl = gs_64
8638 + structure Real = gs_82
8639 + structure TextIO = gs_2
8640 + structure URef = gs_128
8641 + ../block-placement/weighted-block-placement-fn.sml
8643 + functor gs_134 = WeightedBlockPlacementFn
8646 + structure Array = gs_4
8647 + signature BLOCK_PLACEMENT = gs_107
8648 + signature CONTROL_FLOW_GRAPH = gs_34
8649 + structure Graph = gs_0
8650 + structure Int = gs_12
8651 + structure List = gs_9
8652 + signature MLRISC_CONTROL = gs_63
8653 + signature MLRISC_ERROR_MSG = gs_10
8654 + structure MLRiscControl = gs_64
8655 + structure MLRiscErrorMsg = gs_11
8656 + structure TextIO = gs_2
8657 + ../block-placement/default-block-placement.sml
8659 + functor gs_135 = DefaultBlockPlacement
8662 + signature BLOCK_PLACEMENT = gs_107
8663 + signature CONTROL_FLOW_GRAPH = gs_34
8664 + functor DefaultBlockPlacement = gs_135
8665 + structure Graph = gs_0
8666 + signature INSN_PROPERTIES = gs_73
8667 + signature MLRISC_CONTROL = gs_63
8668 + structure MLRiscControl = gs_64
8669 + functor WeightedBlockPlacementFn = gs_134
8670 + ../block-placement/block-placement.sml
8672 + functor gs_136 = BlockPlacement
8675 + signature CELLS = gs_14
8676 + structure CellsBasis = gs_13
8677 + signature INSTRUCTIONS = gs_15
8678 + signature MLTREE = gs_28
8679 + ../mltree/mltree-mult.sig
8681 + signature gs_137 = MLTREE_MULT_DIV
8684 + structure Array = gs_4
8685 + signature CELLS_BASIS = gs_5
8686 + structure CellsBasis = gs_13
8687 + signature INSTRUCTIONS = gs_15
8688 + signature MLRISC_ERROR_MSG = gs_10
8689 + structure MLRiscErrorMsg = gs_11
8690 + signature MLTREE = gs_28
8691 + signature MLTREE_MULT_DIV = gs_137
8692 + structure Word = gs_8
8693 + ../mltree/mltree-mult.sml
8695 + functor gs_138 = MLTreeMult
8698 + structure CellsBasis = gs_13
8699 + structure Char = gs_68
8700 + structure Int = gs_12
8701 + structure Label = gs_27
8702 + signature MLRISC_ERROR_MSG = gs_10
8703 + structure MLRiscErrorMsg = gs_11
8704 + signature MLTREE = gs_28
8705 + signature MLTREE_HASH = gs_88
8706 + structure String = gs_7
8707 + structure Word = gs_8
8708 + ../mltree/mltree-hash.sml
8710 + functor gs_139 = MLTreeHash
8713 + structure CellsBasis = gs_13
8714 + structure IntInf = gs_18
8715 + structure Label = gs_27
8716 + signature MLTREE = gs_28
8717 + signature MLTREE_EVAL = gs_70
8718 + ../mltree/mltree-eval.sml
8720 + functor gs_140 = MLTreeEval
8723 + structure Annotations = gs_1
8724 + signature CELLS = gs_14
8725 + structure CellsBasis = gs_13
8726 + signature GC_CELLS = gs_119
8727 + signature GC_TYPE = gs_118
8728 + ../gc-safety/gc-cells.sml
8730 + functor gs_141 = GCCells
8733 + structure Array = gs_4
8734 + signature CONTROL_FLOW_GRAPH = gs_34
8735 + structure Graph = gs_0
8736 + signature INSN_PROPERTIES = gs_73
8737 + structure Int = gs_12
8738 + structure List = gs_9
8739 + signature MLRISC_CONTROL = gs_63
8740 + signature MLRISC_ERROR_MSG = gs_10
8741 + structure MLRiscControl = gs_64
8742 + structure MLRiscErrorMsg = gs_11
8743 + structure TextIO = gs_2
8744 + ../block-placement/check-placement-fn.sml
8746 + functor gs_142 = CheckPlacementFn
8749 + structure Array = gs_4
8750 + signature CELLS = gs_14
8751 + structure CellsBasis = gs_13
8752 + structure Int = gs_12
8753 + signature MLRISC_ERROR_MSG = gs_10
8754 + structure MLRiscErrorMsg = gs_11
8755 + ../instructions/cells.sml
8757 + functor gs_143 = Cells
8760 + signature DELAY_SLOT_PROPERTIES = gs_59
8761 + signature INSTRUCTIONS = gs_15
8762 + ../backpatch/noDelaySlots.sml
8764 + functor gs_144 = NoDelaySlots
8767 + structure Annotations = gs_1
8768 + signature CELLS_BASIS = gs_5
8769 + structure CellsBasis = gs_13
8770 + structure Label = gs_27
8771 + structure List = gs_9
8772 + structure MLRiscAnnotations = gs_85
8773 + ../emit/asmUtil.sml
8775 + signature gs_145 = ASM_FORMAT_UTIL
8776 + structure gs_146 = AsmFormatUtil
8781 + structure gs_147 = ListPair
8786 + structure gs_148 = Option
8789 + structure CellsBasis = gs_13
8790 + signature INSTRUCTIONS = gs_15
8791 + structure List = gs_9
8792 + structure ListPair = gs_147
8793 + structure Option = gs_148
8794 + ../instructions/shuffle.sml
8796 + functor gs_149 = Shuffle
8801 + functor gs_150 = DirectedGraph
8802 + structure gs_151 = DirectedGraph
8805 + structure Annotations = gs_1
8806 + signature CONTROL_FLOW_GRAPH = gs_34
8807 + functor DirectedGraph = gs_150
8808 + structure DirectedGraph = gs_151
8809 + functor DominatorTree = gs_43
8810 + structure Graph = gs_0
8811 + structure List = gs_9
8812 + functor LoopStructure = gs_129
8813 + signature MLRISC_CONTROL = gs_63
8814 + structure MLRiscAnnotations = gs_85
8815 + structure MLRiscControl = gs_64
8816 + signature PROBABILITY = gs_80
8817 + structure Probability = gs_81
8818 + ../frequencies/estimate-loop-probs-fn.sml
8820 + functor gs_152 = EstimateLoopProbsFn
8825 + structure gs_153 = StringCvt
8828 + structure Array = gs_4
8829 + structure Int32 = gs_17
8830 + structure Int64 = gs_19
8831 + structure IntInf = gs_18
8832 + signature MACHINE_INT = gs_21
8833 + structure String = gs_7
8834 + structure StringCvt = gs_153
8835 + structure Word = gs_8
8836 + structure Word32 = gs_20
8837 + ../mltree/machine-int.sml
8839 + structure gs_154 = MachineInt
8842 + structure Array = gs_4
8843 + structure Int = gs_12
8844 + structure IntHashTable = gs_108
8845 + structure List = gs_9
8846 + signature MLRISC_CONTROL = gs_63
8847 + signature MLRISC_ERROR_MSG = gs_10
8848 + structure MLRiscControl = gs_64
8849 + structure MLRiscErrorMsg = gs_11
8850 + structure RACore = gs_125
8851 + structure RAGraph = gs_110
8852 + signature RA_FLOWGRAPH = gs_120
8853 + structure Real = gs_82
8854 + structure Word = gs_8
8857 + functor gs_155 = MemoryRA
8860 + structure Annotations = gs_1
8861 + structure CellsBasis = gs_13
8862 + signature INSTRUCTIONS = gs_15
8863 + structure RAGraph = gs_110
8864 + ../ra/ra-spill-types.sml
8866 + functor gs_156 = RASpillTypes
8871 + structure gs_157 = Word8Vector
8874 + signature INSTRUCTIONS = gs_15
8875 + structure Word8Vector = gs_157
8876 + ../emit/mc-emit.sig
8878 + signature gs_158 = MC_EMIT
8881 + signature CODE_STRING = gs_79
8882 + signature CONTROL_FLOW_GRAPH = gs_34
8883 + structure Graph = gs_0
8884 + signature INSN_PROPERTIES = gs_73
8885 + signature INSTRUCTION_EMITTER = gs_54
8886 + structure Label = gs_27
8887 + structure List = gs_9
8888 + signature MC_EMIT = gs_158
8889 + signature MLRISC_CONTROL = gs_63
8890 + signature MLRISC_ERROR_MSG = gs_10
8891 + structure MLRiscControl = gs_64
8892 + structure MLRiscErrorMsg = gs_11
8893 + signature SDI_JUMPS = gs_74
8894 + structure Word8 = gs_16
8895 + structure Word8Vector = gs_157
8896 + ../backpatch/vlBackPatch.sml
8898 + functor gs_159 = BackPatch
8903 + structure gs_160 = PriorityHeap
8906 + structure IntHashTable = gs_108
8907 + structure Option = gs_148
8908 + structure PriorityHeap = gs_160
8909 + structure RACore = gs_125
8910 + structure RAGraph = gs_110
8911 + signature RA_SPILL_HEURISTICS = gs_116
8912 + structure Real = gs_82
8913 + ../ra/chow-hennessy-spillheur.sml
8915 + structure gs_161 = ChowHennessySpillHeur
8920 + signature gs_162 = LINE_BREAK
8921 + structure gs_163 = LineBreak
8926 + structure gs_164 = StringOutStream
8931 + signature gs_165 = UPDATE_GRAPH_INFO
8932 + structure gs_166 = UpdateGraphInfo
8937 + structure gs_167 = Bool
8940 + signature ASM_STREAM = gs_52
8941 + structure Annotations = gs_1
8942 + structure Array = gs_4
8943 + structure AsmStream = gs_53
8944 + structure Bool = gs_167
8945 + signature CONTROL_FLOW_GRAPH = gs_34
8946 + structure CellsBasis = gs_13
8947 + structure Char = gs_68
8948 + structure Format = gs_51
8949 + signature GRAPH_IMPLEMENTATION = gs_37
8950 + structure Graph = gs_0
8951 + signature INSN_PROPERTIES = gs_73
8952 + signature INSTRUCTIONS = gs_15
8953 + signature INSTRUCTION_EMITTER = gs_54
8954 + structure Int = gs_12
8955 + structure IntHashTable = gs_108
8956 + signature LINE_BREAK = gs_162
8957 + structure Label = gs_27
8958 + structure LineBreak = gs_163
8959 + structure List = gs_9
8960 + structure ListMergeSort = gs_65
8961 + signature MLRISC_ERROR_MSG = gs_10
8962 + structure MLRiscErrorMsg = gs_11
8963 + structure Real = gs_82
8964 + structure String = gs_7
8965 + structure StringOutStream = gs_164
8966 + structure TextIO = gs_2
8967 + signature UPDATE_GRAPH_INFO = gs_165
8968 + structure UpdateGraphInfo = gs_166
8969 + ../flowgraph/cfg.sml
8971 + functor gs_168 = ControlFlowGraph
8974 + structure Annotations = gs_1
8975 + signature CONSTANT = gs_25
8976 + structure CellsBasis = gs_13
8977 + structure Int32 = gs_17
8978 + structure Label = gs_27
8979 + signature MLTREE = gs_28
8980 + signature MLTREE_EXTENSION = gs_22
8981 + structure MLTreeBasis = gs_105
8982 + structure MachineInt = gs_154
8983 + signature REGION = gs_24
8984 + ../mltree/mltree.sml
8986 + functor gs_169 = MLTreeF
8991 + structure gs_170 = General
8994 + signature CONTROL_FLOW_GRAPH = gs_34
8995 + structure CellsBasis = gs_13
8996 + structure General = gs_170
8997 + structure Graph = gs_0
8998 + structure Int = gs_12
8999 + structure IntHashTable = gs_108
9000 + signature MLRISC_ERROR_MSG = gs_10
9001 + structure MLRiscErrorMsg = gs_11
9002 + ../ra/liveness.sml
9004 + signature gs_171 = LIVENESS
9005 + functor gs_172 = Liveness
9008 + structure CellsBasis = gs_13
9009 + signature INSTRUCTIONS = gs_15
9010 + ../instructions/rewrite.sig
9012 + signature gs_173 = REWRITE_INSTRUCTIONS
9015 + signature ARCH_SPILL_INSTR = gs_92
9016 + structure Annotations = gs_1
9017 + structure Array = gs_4
9018 + signature CFG_OPTIMIZATION = gs_99
9019 + signature CONTROL_FLOW_GRAPH = gs_34
9020 + structure CellsBasis = gs_13
9021 + functor ClusterRA = gs_131
9022 + functor GetReg = gs_58
9023 + signature INSN_PROPERTIES = gs_73
9024 + signature INSTRUCTIONS = gs_15
9025 + signature INSTRUCTION_EMITTER = gs_54
9026 + structure List = gs_9
9027 + signature MLRISC_CONTROL = gs_63
9028 + signature MLRISC_ERROR_MSG = gs_10
9029 + structure MLRiscControl = gs_64
9030 + structure MLRiscErrorMsg = gs_11
9031 + structure RAGraph = gs_110
9032 + signature RA_SPILL = gs_111
9033 + signature RA_SPILL_HEURISTICS = gs_116
9034 + signature REWRITE_INSTRUCTIONS = gs_173
9035 + functor RegisterAllocator = gs_126
9036 + structure Word = gs_8
9039 + functor gs_174 = RISC_RA
9042 + signature CFG_OPTIMIZATION = gs_99
9043 + signature CONTROL_FLOW_GRAPH = gs_34
9044 + structure Graph = gs_0
9045 + signature INSN_PROPERTIES = gs_73
9046 + signature MLRISC_CONTROL = gs_63
9047 + structure MLRiscControl = gs_64
9048 + signature SDI_JUMPS = gs_74
9049 + ../flowgraph/cfgCountCopies.sml
9051 + functor gs_175 = CFGCountCopies
9054 + signature ASSEMBLY_EMITTER = gs_35
9055 + structure Annotations = gs_1
9056 + signature CONTROL_FLOW_GRAPH = gs_34
9057 + structure Graph = gs_0
9058 + signature INSTRUCTION_EMITTER = gs_54
9059 + structure List = gs_9
9060 + structure PseudoOpsBasisTyp = gs_30
9061 + ../emit/cfgEmit.sml
9063 + functor gs_176 = CFGEmit
9066 + structure Array = gs_4
9067 + signature GETREG = gs_57
9070 + functor gs_177 = GetReg2
9073 + signature CONTROL_FLOW_GRAPH = gs_34
9074 + structure CellsBasis = gs_13
9075 + signature INSTRUCTIONS = gs_15
9076 + structure Int32 = gs_17
9077 + ../omit-frameptr/omit-frame-pointer.sig
9079 + signature gs_178 = OMIT_FRAME_POINTER
9082 + signature MLRISC_CONTROL = gs_63
9083 + structure MLRiscControl = gs_64
9084 + signature RA = gs_121
9085 + structure RACore = gs_125
9086 + signature RA_FLOWGRAPH_PARTITIONER = gs_78
9087 + ../ra/region-based-ra.sml
9089 + functor gs_179 = RegionBasedRA
9092 + signature MLRISC_REGION = gs_89
9093 + structure String = gs_7
9094 + ../aliasing/mlriscRegion.sml
9096 + structure gs_180 = MLRiscRegion
9099 + structure CellsBasis = gs_13
9100 + signature INSN_PROPERTIES = gs_73
9101 + signature INSTRUCTION_EMITTER = gs_54
9102 + structure Int = gs_12
9103 + structure IntHashTable = gs_108
9104 + signature MLRISC_CONTROL = gs_63
9105 + signature MLRISC_ERROR_MSG = gs_10
9106 + structure MLRiscControl = gs_64
9107 + structure MLRiscErrorMsg = gs_11
9108 + structure RACore = gs_125
9109 + functor RASpillTypes = gs_156
9110 + signature RA_SPILL = gs_111
9111 + structure Word = gs_8
9112 + ../ra/ra-spill.sml
9114 + functor gs_181 = RASpill
9117 + signature ARCH_SPILL_INSTR = gs_92
9118 + signature ASM_FORMAT_UTIL = gs_145
9119 + signature ASM_STREAM = gs_52
9120 + signature ASSEMBLY_EMITTER = gs_35
9121 + signature AS_PSEUDO_OPS = gs_76
9122 + structure AsmFlags = gs_117
9123 + structure AsmFormatUtil = gs_146
9124 + structure AsmStream = gs_53
9125 + signature BBSCHED = gs_72
9126 + functor BBSched2 = gs_130
9127 + signature BLOCK_PLACEMENT = gs_107
9128 + functor BackPatch = gs_159
9129 + functor BlockPlacement = gs_136
9130 + functor BuildFlowgraph = gs_114
9131 + signature CELLS = gs_14
9132 + signature CELLS_BASIS = gs_5
9133 + functor CFGCountCopies = gs_175
9134 + functor CFGEmit = gs_176
9135 + functor CFGExpandCopies = gs_100
9136 + signature CFG_OPTIMIZATION = gs_99
9137 + signature CLIENT_PSEUDO_OPS = gs_32
9138 + signature CODE_STRING = gs_79
9139 + signature COMPUTE_EXECUTION_FREQUENCIES = gs_83
9140 + signature CONSTANT = gs_25
9141 + signature CONTROL_FLOWGRAPH_GEN = gs_115
9142 + signature CONTROL_FLOW_GRAPH = gs_34
9143 + structure CTypes = gs_60
9144 + signature C_CALLS = gs_61
9145 + functor Cells = gs_143
9146 + structure CellsBasis = gs_13
9147 + structure ChaitinSpillHeur = gs_132
9148 + functor CheckPlacementFn = gs_142
9149 + structure ChowHennessySpillHeur = gs_161
9150 + functor ClusterRA = gs_131
9151 + functor CompleteProbsFn = gs_86
9152 + functor ComputeFreqsFn = gs_87
9153 + functor ControlFlowGraph = gs_168
9154 + signature DELAY_SLOT_PROPERTIES = gs_59
9155 + signature DOMINATOR_TREE = gs_38
9156 + functor DarwinPseudoOps = gs_77
9157 + functor DefaultBlockPlacement = gs_135
9158 + functor DominatorTree = gs_43
9159 + functor EstimateLoopProbsFn = gs_152
9160 + signature FREQUENCY_PROPERTIES = gs_112
9161 + functor FreqProps = gs_113
9162 + functor GCCells = gs_141
9163 + signature GC_CELLS = gs_119
9164 + signature GC_TYPE = gs_118
9165 + signature GETREG = gs_57
9166 + functor GasPseudoOps = gs_93
9167 + functor GetReg = gs_58
9168 + functor GetReg2 = gs_177
9169 + signature INSN_PROPERTIES = gs_73
9170 + signature INSTRUCTIONS = gs_15
9171 + signature INSTRUCTION_EMITTER = gs_54
9172 + signature INSTRUCTION_STREAM = gs_44
9173 + functor InstructionStream = gs_45
9174 + functor JumpChainElimFn = gs_98
9175 + signature LABEL = gs_26
9176 + signature LIVENESS = gs_171
9177 + signature LOOP_STRUCTURE = gs_39
9178 + structure Label = gs_27
9179 + functor Liveness = gs_172
9180 + functor LoopStructure = gs_129
9181 + signature MACHINE_INT = gs_21
9182 + signature MC_EMIT = gs_158
9183 + signature MLRISC_ANNOTATIONS = gs_84
9184 + signature MLRISC_OPTIMIZATION = gs_90
9185 + signature MLRISC_REGION = gs_89
9186 + structure MLRiscAnnotations = gs_85
9187 + structure MLRiscRegion = gs_180
9188 + signature MLTREE = gs_28
9189 + signature MLTREECOMP = gs_49
9190 + signature MLTREEGEN = gs_47
9191 + signature MLTREE_BASIS = gs_23
9192 + signature MLTREE_EVAL = gs_70
9193 + signature MLTREE_EXTENSION = gs_22
9194 + signature MLTREE_EXTENSION_COMP = gs_50
9195 + signature MLTREE_HASH = gs_88
9196 + signature MLTREE_MULT_DIV = gs_137
9197 + signature MLTREE_SIZE = gs_46
9198 + signature MLTREE_STREAM = gs_48
9199 + structure MLTreeBasis = gs_105
9200 + functor MLTreeCheckTy = gs_36
9201 + functor MLTreeEval = gs_140
9202 + functor MLTreeF = gs_169
9203 + functor MLTreeGen = gs_104
9204 + functor MLTreeHash = gs_139
9205 + functor MLTreeMult = gs_138
9206 + functor MLTreeSize = gs_103
9207 + functor MLTreeStream = gs_101
9208 + structure MachineInt = gs_154
9209 + functor MemoryRA = gs_155
9210 + functor NoDelaySlots = gs_144
9211 + signature OMIT_FRAME_POINTER = gs_178
9212 + signature POINTS_TO = gs_66
9213 + signature PRINT_FLOWGRAPH = gs_55
9214 + signature PSEUDO_OPS = gs_33
9215 + signature PSEUDO_OPS_BASIS = gs_31
9216 + signature PSEUDO_OPS_ENDIAN = gs_69
9217 + structure PointsTo = gs_67
9218 + functor PrintFlowgraph = gs_56
9219 + functor PseudoOps = gs_106
9220 + structure PseudoOpsBasisTyp = gs_30
9221 + functor PseudoOpsBig = gs_71
9222 + functor PseudoOpsLittle = gs_102
9223 + signature RA = gs_121
9224 + structure RACore = gs_125
9225 + functor RADeadCodeElim = gs_127
9226 + structure RAGraph = gs_110
9227 + functor RASpill = gs_181
9228 + functor RASpillTypes = gs_156
9229 + signature RA_BITMATRIX = gs_94
9230 + signature RA_CORE = gs_123
9231 + signature RA_FLOWGRAPH = gs_120
9232 + signature RA_FLOWGRAPH_PARTITIONER = gs_78
9233 + signature RA_GRAPH = gs_109
9234 + signature RA_PRIORITY_QUEUE = gs_95
9235 + signature RA_SPILL = gs_111
9236 + signature RA_SPILL_HEURISTICS = gs_116
9237 + signature REGION = gs_24
9238 + signature REWRITE_INSTRUCTIONS = gs_173
9239 + functor RISC_RA = gs_174
9240 + structure RaBitmatrix = gs_97
9241 + functor RaPriQueue = gs_124
9242 + functor RegionBasedRA = gs_179
9243 + functor RegisterAllocator = gs_126
9244 + signature SDI_JUMPS = gs_74
9245 + signature SHUFFLE = gs_91
9246 + functor Shuffle = gs_149
9247 + functor SpanDependencyResolution = gs_75
9248 + functor UnimplementedCCallsFn = gs_62
9249 + functor WeightedBlockPlacementFn = gs_134
9254 diff --git a/mlb/MLTREE.mlb b/mlb/MLTREE.mlb
9255 new file mode 100644
9256 index 0000000..16030cf
9258 +++ b/mlb/MLTREE.mlb
9262 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
9263 + "redundantBind warn" "redundantMatch warn"
9264 + "sequenceNonUnit ignore"
9265 + "warnUnused false" "forceUsed"
9266 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
9272 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
9276 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
9280 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
9284 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
9288 + $(SML_LIB)/basis/pervasive.mlb
9292 + signature gs_0 = MLTREE
9295 + signature MLTREE = gs_0
9296 + ../mltree/mltree-rewrite.sig
9298 + signature gs_1 = MLTREE_REWRITE
9301 + signature MLTREE = gs_0
9302 + signature MLTREE_REWRITE = gs_1
9303 + ../mltree/mltree-rewrite.sml
9305 + functor gs_2 = MLTreeRewrite
9308 + signature MLTREE = gs_0
9309 + ../mltree/mltree-fold.sig
9311 + signature gs_3 = MLTREE_FOLD
9316 + structure gs_4 = Word
9321 + structure gs_5 = CellsBasis
9326 + structure gs_6 = IntInf
9331 + structure gs_7 = Label
9336 + structure gs_8 = String
9341 + structure gs_9 = List
9346 + structure gs_10 = Char
9351 + signature gs_11 = MLRISC_ERROR_MSG
9352 + structure gs_12 = MLRiscErrorMsg
9357 + structure gs_13 = Int
9360 + signature MLTREE = gs_0
9361 + ../mltree/mltree-utils.sig
9363 + signature gs_14 = MLTREE_UTILS
9366 + structure CellsBasis = gs_5
9367 + structure Char = gs_10
9368 + structure Int = gs_13
9369 + structure IntInf = gs_6
9370 + structure Label = gs_7
9371 + structure List = gs_9
9372 + signature MLRISC_ERROR_MSG = gs_11
9373 + structure MLRiscErrorMsg = gs_12
9374 + signature MLTREE = gs_0
9375 + signature MLTREE_UTILS = gs_14
9376 + structure String = gs_8
9377 + structure Word = gs_4
9378 + ../mltree/mltree-utils.sml
9380 + functor gs_15 = MLTreeUtils
9385 + signature gs_16 = CONTROL_FLOW_GRAPH
9390 + signature gs_17 = INSTRUCTION_STREAM
9395 + signature gs_18 = INSTRUCTIONS
9400 + signature gs_19 = CELLS
9405 + structure gs_20 = Annotations
9408 + structure Annotations = gs_20
9409 + signature CELLS = gs_19
9410 + signature CONTROL_FLOW_GRAPH = gs_16
9411 + signature INSTRUCTIONS = gs_18
9412 + signature INSTRUCTION_STREAM = gs_17
9413 + ../mltree/instr-gen.sig
9415 + signature gs_21 = INSTR_GEN
9418 + signature MLTREE = gs_0
9419 + signature MLTREE_FOLD = gs_3
9420 + ../mltree/mltree-fold.sml
9422 + functor gs_22 = MLTreeFold
9425 + signature CONTROL_FLOW_GRAPH = gs_16
9426 + signature INSTRUCTIONS = gs_18
9427 + signature INSTRUCTION_STREAM = gs_17
9428 + signature INSTR_GEN = gs_21
9429 + signature MLRISC_ERROR_MSG = gs_11
9430 + structure MLRiscErrorMsg = gs_12
9431 + ../mltree/instr-gen.sml
9433 + functor gs_23 = InstrGen
9436 + signature MLTREE = gs_0
9437 + ../mltree/mltree-simplify.sig
9439 + signature gs_24 = MLTREE_SIMPLIFIER
9444 + signature gs_25 = MLTREE_SIZE
9447 + structure IntInf = gs_6
9448 + signature MLTREE = gs_0
9449 + signature MLTREE_SIMPLIFIER = gs_24
9450 + signature MLTREE_SIZE = gs_25
9451 + functor MLTreeRewrite = gs_2
9452 + ../mltree/mltree-simplify.sml
9454 + functor gs_26 = MLTreeSimplifier
9457 + signature INSTR_GEN = gs_21
9458 + functor InstrGen = gs_23
9459 + signature MLTREE_FOLD = gs_3
9460 + signature MLTREE_REWRITE = gs_1
9461 + signature MLTREE_SIMPLIFIER = gs_24
9462 + signature MLTREE_UTILS = gs_14
9463 + functor MLTreeFold = gs_22
9464 + functor MLTreeRewrite = gs_2
9465 + functor MLTreeSimplifier = gs_26
9466 + functor MLTreeUtils = gs_15
9471 diff --git a/mlb/PPC.mlb b/mlb/PPC.mlb
9472 new file mode 100644
9473 index 0000000..22161b0
9479 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
9480 + "redundantBind warn" "redundantMatch warn"
9481 + "sequenceNonUnit ignore"
9482 + "warnUnused false" "forceUsed"
9483 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
9489 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
9493 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
9497 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
9501 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
9505 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
9509 + $(SML_LIB)/basis/pervasive.mlb
9513 + signature gs_0 = FREQUENCY_PROPERTIES
9518 + signature gs_1 = PROBABILITY
9519 + structure gs_2 = Probability
9524 + structure gs_3 = MLRiscAnnotations
9529 + signature gs_4 = REGION
9534 + signature gs_5 = CONSTANT
9539 + signature gs_6 = MLTREE
9544 + signature gs_7 = CELLS_BASIS
9549 + structure gs_8 = CellsBasis
9554 + structure gs_9 = Label
9559 + structure gs_10 = Annotations
9564 + functor gs_11 = Cells
9569 + structure gs_12 = Int
9574 + signature gs_13 = CELLS
9579 + signature gs_14 = MLRISC_ERROR_MSG
9580 + structure gs_15 = MLRiscErrorMsg
9585 + signature gs_16 = MLRISC_CONTROL
9586 + structure gs_17 = MLRiscControl
9589 + signature MLRISC_CONTROL = gs_16
9590 + structure MLRiscControl = gs_17
9591 + ../ppc/emit/ppcAsmSyntax.sml
9593 + structure gs_18 = PPCAsmSyntax
9596 + signature CELLS = gs_13
9597 + functor Cells = gs_11
9598 + structure CellsBasis = gs_8
9599 + structure Int = gs_12
9600 + signature MLRISC_ERROR_MSG = gs_14
9601 + structure MLRiscErrorMsg = gs_15
9602 + structure PPCAsmSyntax = gs_18
9603 + ../ppc/instructions/ppcCells.sml
9605 + signature gs_19 = PPCCELLS
9606 + structure gs_20 = PPCCells
9609 + structure Annotations = gs_10
9610 + signature CELLS_BASIS = gs_7
9611 + signature CONSTANT = gs_5
9612 + structure CellsBasis = gs_8
9613 + structure Label = gs_9
9614 + signature MLTREE = gs_6
9615 + signature PPCCELLS = gs_19
9616 + structure PPCCells = gs_20
9617 + signature REGION = gs_4
9618 + ../ppc/instructions/ppcInstr.sml
9620 + signature gs_21 = PPCINSTR
9621 + functor gs_22 = PPCInstr
9624 + signature FREQUENCY_PROPERTIES = gs_0
9625 + structure MLRiscAnnotations = gs_3
9626 + signature PPCINSTR = gs_21
9627 + functor PPCInstr = gs_22
9628 + signature PROBABILITY = gs_1
9629 + structure Probability = gs_2
9630 + ../ppc/instructions/ppcFreqProps.sml
9632 + functor gs_23 = PPCFreqProps
9637 + signature gs_24 = INSTRUCTION_EMITTER
9642 + signature gs_25 = ASM_FORMAT_UTIL
9643 + structure gs_26 = AsmFormatUtil
9648 + signature gs_27 = ASM_STREAM
9649 + structure gs_28 = AsmStream
9654 + structure gs_29 = TextIO
9659 + structure gs_30 = String
9664 + structure gs_31 = AsmFlags
9669 + signature gs_32 = MLTREE_EVAL
9674 + signature gs_33 = INSTRUCTION_STREAM
9677 + structure CellsBasis = gs_8
9678 + signature PPCINSTR = gs_21
9679 + functor PPCInstr = gs_22
9680 + ../ppc/instructions/ppcShuffle.sig
9682 + signature gs_34 = PPCSHUFFLE
9685 + signature ASM_FORMAT_UTIL = gs_25
9686 + signature ASM_STREAM = gs_27
9687 + structure Annotations = gs_10
9688 + structure AsmFlags = gs_31
9689 + structure AsmFormatUtil = gs_26
9690 + structure AsmStream = gs_28
9691 + structure CellsBasis = gs_8
9692 + signature INSTRUCTION_EMITTER = gs_24
9693 + signature INSTRUCTION_STREAM = gs_33
9694 + structure Int = gs_12
9695 + signature MLRISC_ERROR_MSG = gs_14
9696 + structure MLRiscErrorMsg = gs_15
9697 + signature MLTREE_EVAL = gs_32
9698 + signature PPCINSTR = gs_21
9699 + functor PPCInstr = gs_22
9700 + signature PPCSHUFFLE = gs_34
9701 + structure String = gs_30
9702 + structure TextIO = gs_29
9703 + ../ppc/emit/ppcAsm.sml
9705 + functor gs_35 = PPCAsmEmitter
9708 + structure CellsBasis = gs_8
9709 + signature PPCINSTR = gs_21
9710 + functor PPCInstr = gs_22
9711 + ../ppc/mltree/ppcPseudoInstr.sig
9713 + signature gs_36 = PPC_PSEUDO_INSTR
9718 + signature gs_37 = PSEUDO_OPS_BASIS
9723 + functor gs_38 = PseudoOpsBig
9728 + structure gs_39 = Format
9733 + structure gs_40 = PseudoOpsBasisTyp
9738 + structure gs_41 = IntInf
9743 + structure gs_42 = Word32
9748 + structure gs_43 = Atom
9751 + structure Atom = gs_43
9752 + structure Format = gs_39
9753 + structure Int = gs_12
9754 + structure IntInf = gs_41
9755 + structure Label = gs_9
9756 + signature MLRISC_ERROR_MSG = gs_14
9757 + structure MLRiscErrorMsg = gs_15
9758 + signature MLTREE = gs_6
9759 + signature MLTREE_EVAL = gs_32
9760 + signature PSEUDO_OPS_BASIS = gs_37
9761 + structure PseudoOpsBasisTyp = gs_40
9762 + functor PseudoOpsBig = gs_38
9763 + structure String = gs_30
9764 + structure Word32 = gs_42
9765 + ../ppc/flowgraph/ppcDarwinPseudoOps.sml
9767 + functor gs_44 = PPCDarwinPseudoOps
9772 + signature gs_45 = ARCH_SPILL_INSTR
9775 + structure CellsBasis = gs_8
9776 + signature MLRISC_ERROR_MSG = gs_14
9777 + structure MLRiscErrorMsg = gs_15
9778 + signature PPCINSTR = gs_21
9779 + functor PPCInstr = gs_22
9780 + ../ppc/ra/ppcRewrite.sml
9782 + functor gs_46 = PPCRewrite
9785 + signature ARCH_SPILL_INSTR = gs_45
9786 + structure CellsBasis = gs_8
9787 + signature MLRISC_ERROR_MSG = gs_14
9788 + structure MLRiscErrorMsg = gs_15
9789 + signature PPCINSTR = gs_21
9790 + functor PPCInstr = gs_22
9791 + functor PPCRewrite = gs_46
9792 + ../ppc/ra/ppcSpillInstr.sml
9794 + functor gs_47 = PPCSpillInstr
9799 + functor gs_48 = GasPseudoOps
9802 + structure Format = gs_39
9803 + functor GasPseudoOps = gs_48
9804 + signature MLRISC_ERROR_MSG = gs_14
9805 + structure MLRiscErrorMsg = gs_15
9806 + signature MLTREE = gs_6
9807 + signature MLTREE_EVAL = gs_32
9808 + signature PSEUDO_OPS_BASIS = gs_37
9809 + structure PseudoOpsBasisTyp = gs_40
9810 + functor PseudoOpsBig = gs_38
9811 + structure Word32 = gs_42
9812 + ../ppc/flowgraph/ppcGasPseudoOps.sml
9814 + functor gs_49 = PPCGasPseudoOps
9819 + signature gs_50 = INSN_PROPERTIES
9824 + structure gs_51 = Word
9829 + signature gs_52 = MLTREE_HASH
9832 + structure CellsBasis = gs_8
9833 + signature INSN_PROPERTIES = gs_50
9834 + structure IntInf = gs_41
9835 + structure Label = gs_9
9836 + signature MLRISC_ERROR_MSG = gs_14
9837 + structure MLRiscErrorMsg = gs_15
9838 + signature MLTREE_EVAL = gs_32
9839 + signature MLTREE_HASH = gs_52
9840 + signature PPCINSTR = gs_21
9841 + functor PPCInstr = gs_22
9842 + structure Word = gs_51
9843 + ../ppc/instructions/ppcProps.sml
9845 + functor gs_53 = PPCProps
9850 + signature gs_54 = SDI_JUMPS
9853 + structure CellsBasis = gs_8
9854 + signature MLRISC_CONTROL = gs_16
9855 + signature MLRISC_ERROR_MSG = gs_14
9856 + structure MLRiscControl = gs_17
9857 + structure MLRiscErrorMsg = gs_15
9858 + signature MLTREE_EVAL = gs_32
9859 + signature PPCINSTR = gs_21
9860 + functor PPCInstr = gs_22
9861 + signature PPCSHUFFLE = gs_34
9862 + signature SDI_JUMPS = gs_54
9863 + structure Word = gs_51
9864 + ../ppc/backpatch/ppcJumps.sml
9866 + functor gs_55 = PPCJumps
9869 + ../ppc/instructions/ppcInstrExt.sml
9871 + structure gs_56 = PPCInstrExt
9876 + signature gs_57 = CONTROL_FLOW_GRAPH
9881 + signature gs_58 = MLTREE_STREAM
9884 + signature CONTROL_FLOW_GRAPH = gs_57
9885 + signature MLRISC_ERROR_MSG = gs_14
9886 + structure MLRiscErrorMsg = gs_15
9887 + signature MLTREE_STREAM = gs_58
9888 + signature PPCINSTR = gs_21
9889 + functor PPCInstr = gs_22
9890 + structure PPCInstrExt = gs_56
9891 + ../ppc/instructions/ppcCompInstrExt.sml
9893 + signature gs_59 = PPCCOMP_INSTR_EXT
9894 + functor gs_60 = PPCCompInstrExt
9899 + signature gs_61 = DELAY_SLOT_PROPERTIES
9902 + signature DELAY_SLOT_PROPERTIES = gs_61
9903 + signature INSN_PROPERTIES = gs_50
9904 + signature MLRISC_ERROR_MSG = gs_14
9905 + structure MLRiscErrorMsg = gs_15
9906 + signature PPCINSTR = gs_21
9907 + functor PPCInstr = gs_22
9908 + ../ppc/backpatch/ppcDelaySlots.sml
9910 + functor gs_62 = PPCDelaySlots
9915 + structure gs_63 = CTypes
9920 + structure gs_64 = List
9925 + signature gs_65 = C_CALLS
9928 + structure CTypes = gs_63
9929 + signature C_CALLS = gs_65
9930 + structure Int = gs_12
9931 + structure IntInf = gs_41
9932 + structure List = gs_64
9933 + signature MLRISC_ERROR_MSG = gs_14
9934 + structure MLRiscAnnotations = gs_3
9935 + structure MLRiscErrorMsg = gs_15
9936 + signature MLTREE = gs_6
9937 + signature PPCCELLS = gs_19
9938 + structure PPCCells = gs_20
9939 + structure String = gs_30
9940 + structure Word = gs_51
9941 + ../ppc/c-calls/ppc-macosx.sml
9943 + functor gs_66 = PPCMacOSX_CCalls
9944 + signature gs_67 = PPC_MACOSX_C_CALLS
9949 + functor gs_68 = Shuffle
9952 + structure CellsBasis = gs_8
9953 + signature MLRISC_ERROR_MSG = gs_14
9954 + structure MLRiscErrorMsg = gs_15
9955 + signature PPCINSTR = gs_21
9956 + functor PPCInstr = gs_22
9957 + functor Shuffle = gs_68
9958 + ../ppc/instructions/ppcShuffle.sml
9960 + functor gs_69 = PPCShuffle
9965 + structure gs_70 = Word8
9970 + signature gs_71 = CODE_STRING
9973 + signature CODE_STRING = gs_71
9974 + structure CellsBasis = gs_8
9975 + signature INSTRUCTION_EMITTER = gs_24
9976 + signature INSTRUCTION_STREAM = gs_33
9977 + structure Label = gs_9
9978 + signature MLRISC_ERROR_MSG = gs_14
9979 + structure MLRiscErrorMsg = gs_15
9980 + signature MLTREE_EVAL = gs_32
9981 + signature PPCINSTR = gs_21
9982 + functor PPCInstr = gs_22
9983 + structure Word32 = gs_42
9984 + structure Word8 = gs_70
9985 + ../ppc/emit/ppcMC.sml
9987 + functor gs_72 = PPCMCEmitter
9992 + functor gs_73 = MLTreeMult
9997 + functor gs_74 = MLTreeGen
10002 + signature gs_75 = MLTREECOMP
10003 + signature gs_76 = MLTREE_EXTENSION_COMP
10006 + structure CellsBasis = gs_8
10007 + structure Int = gs_12
10008 + structure Label = gs_9
10009 + signature MLRISC_ERROR_MSG = gs_14
10010 + structure MLRiscAnnotations = gs_3
10011 + structure MLRiscErrorMsg = gs_15
10012 + signature MLTREECOMP = gs_75
10013 + signature MLTREE_EXTENSION_COMP = gs_76
10014 + functor MLTreeGen = gs_74
10015 + functor MLTreeMult = gs_73
10016 + signature PPCINSTR = gs_21
10017 + functor PPCInstr = gs_22
10018 + signature PPC_PSEUDO_INSTR = gs_36
10019 + structure Word32 = gs_42
10020 + ../ppc/mltree/ppc.sml
10022 + functor gs_77 = PPC
10025 + functor PPC = gs_77
10026 + functor PPCAsmEmitter = gs_35
10027 + structure PPCAsmSyntax = gs_18
10028 + signature PPCCELLS = gs_19
10029 + signature PPCCOMP_INSTR_EXT = gs_59
10030 + structure PPCCells = gs_20
10031 + functor PPCCompInstrExt = gs_60
10032 + functor PPCDarwinPseudoOps = gs_44
10033 + functor PPCDelaySlots = gs_62
10034 + functor PPCFreqProps = gs_23
10035 + functor PPCGasPseudoOps = gs_49
10036 + signature PPCINSTR = gs_21
10037 + functor PPCInstr = gs_22
10038 + structure PPCInstrExt = gs_56
10039 + functor PPCJumps = gs_55
10040 + functor PPCMCEmitter = gs_72
10041 + functor PPCMacOSX_CCalls = gs_66
10042 + functor PPCProps = gs_53
10043 + functor PPCRewrite = gs_46
10044 + signature PPCSHUFFLE = gs_34
10045 + functor PPCShuffle = gs_69
10046 + functor PPCSpillInstr = gs_47
10047 + signature PPC_PSEUDO_INSTR = gs_36
10052 diff --git a/mlb/Peephole.mlb b/mlb/Peephole.mlb
10053 new file mode 100644
10054 index 0000000..7fd857c
10056 +++ b/mlb/Peephole.mlb
10060 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10061 + "redundantBind warn" "redundantMatch warn"
10062 + "sequenceNonUnit ignore"
10063 + "warnUnused false" "forceUsed"
10064 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10070 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10074 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
10078 + $(SML_LIB)/basis/pervasive.mlb
10082 + signature gs_0 = INSTRUCTIONS
10085 + signature INSTRUCTIONS = gs_0
10086 + ../instructions/peephole.sig
10088 + signature gs_1 = PEEPHOLE
10093 + signature gs_2 = CFG_OPTIMIZATION
10098 + structure gs_3 = Graph
10103 + signature gs_4 = CONTROL_FLOW_GRAPH
10106 + signature CFG_OPTIMIZATION = gs_2
10107 + signature CONTROL_FLOW_GRAPH = gs_4
10108 + structure Graph = gs_3
10109 + signature PEEPHOLE = gs_1
10110 + ../flowgraph/cfgPeephole.sml
10112 + functor gs_5 = CFGPeephole
10115 + functor CFGPeephole = gs_5
10116 + signature PEEPHOLE = gs_1
10121 diff --git a/mlb/RA.mlb b/mlb/RA.mlb
10122 new file mode 100644
10123 index 0000000..17f5023
10129 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10130 + "redundantBind warn" "redundantMatch warn"
10131 + "sequenceNonUnit ignore"
10132 + "warnUnused false" "forceUsed"
10133 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10139 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10143 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
10147 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10151 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
10155 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
10159 + $(SML_LIB)/basis/pervasive.mlb
10163 + signature gs_0 = RA_SPILL_HEURISTICS
10168 + structure gs_1 = RACore
10173 + structure gs_2 = Real
10178 + structure gs_3 = RAGraph
10181 + structure RACore = gs_1
10182 + structure RAGraph = gs_3
10183 + signature RA_SPILL_HEURISTICS = gs_0
10184 + structure Real = gs_2
10185 + ../ra/chaitin-spillheur2.sml
10187 + functor gs_4 = ImprovedChaitinSpillHeur
10192 + structure gs_5 = IntHashTable
10197 + structure gs_6 = Option
10202 + structure gs_7 = PriorityHeap
10205 + structure IntHashTable = gs_5
10206 + structure Option = gs_6
10207 + structure PriorityHeap = gs_7
10208 + structure RACore = gs_1
10209 + structure RAGraph = gs_3
10210 + signature RA_SPILL_HEURISTICS = gs_0
10211 + structure Real = gs_2
10212 + ../ra/chow-hennessy-spillheur2.sml
10214 + functor gs_8 = ImprovedChowHennessySpillHeur
10219 + signature gs_9 = RA_SPILL
10224 + structure gs_10 = Int
10229 + functor gs_11 = RASpillTypes
10234 + structure gs_12 = CellsBasis
10239 + structure gs_13 = Word
10244 + signature gs_14 = MLRISC_ERROR_MSG
10245 + structure gs_15 = MLRiscErrorMsg
10250 + signature gs_16 = INSTRUCTION_EMITTER
10255 + signature gs_17 = INSN_PROPERTIES
10258 + structure CellsBasis = gs_12
10259 + signature INSN_PROPERTIES = gs_17
10260 + signature INSTRUCTION_EMITTER = gs_16
10261 + structure Int = gs_10
10262 + structure IntHashTable = gs_5
10263 + signature MLRISC_ERROR_MSG = gs_14
10264 + structure MLRiscErrorMsg = gs_15
10265 + structure RACore = gs_1
10266 + functor RASpillTypes = gs_11
10267 + signature RA_SPILL = gs_9
10268 + structure Word = gs_13
10269 + ../ra/ra-spill-with-renaming.sml
10271 + functor gs_18 = RASpillWithRenaming
10274 + functor ImprovedChaitinSpillHeur = gs_4
10275 + functor ImprovedChowHennessySpillHeur = gs_8
10276 + functor RASpillWithRenaming = gs_18
10281 diff --git a/mlb/SPARC.mlb b/mlb/SPARC.mlb
10282 new file mode 100644
10283 index 0000000..79a0cfb
10285 +++ b/mlb/SPARC.mlb
10289 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10290 + "redundantBind warn" "redundantMatch warn"
10291 + "sequenceNonUnit ignore"
10292 + "warnUnused false" "forceUsed"
10293 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10299 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10303 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
10307 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10311 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
10315 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
10319 + $(SML_LIB)/basis/pervasive.mlb
10323 + signature gs_0 = CONTROL_FLOW_GRAPH
10328 + signature gs_1 = MLTREE_STREAM
10333 + signature gs_2 = MLTREE
10338 + signature gs_3 = REGION
10343 + signature gs_4 = CONSTANT
10348 + signature gs_5 = CELLS_BASIS
10353 + structure gs_6 = CellsBasis
10358 + structure gs_7 = Label
10363 + structure gs_8 = Annotations
10368 + functor gs_9 = Cells
10373 + structure gs_10 = Int
10378 + signature gs_11 = CELLS
10383 + signature gs_12 = MLRISC_ERROR_MSG
10384 + structure gs_13 = MLRiscErrorMsg
10387 + signature CELLS = gs_11
10388 + functor Cells = gs_9
10389 + structure CellsBasis = gs_6
10390 + structure Int = gs_10
10391 + signature MLRISC_ERROR_MSG = gs_12
10392 + structure MLRiscErrorMsg = gs_13
10393 + ../sparc/instructions/sparcCells.sml
10395 + signature gs_14 = SPARCCELLS
10396 + structure gs_15 = SparcCells
10399 + structure Annotations = gs_8
10400 + signature CELLS_BASIS = gs_5
10401 + signature CONSTANT = gs_4
10402 + structure CellsBasis = gs_6
10403 + structure Label = gs_7
10404 + signature MLTREE = gs_2
10405 + signature REGION = gs_3
10406 + signature SPARCCELLS = gs_14
10407 + structure SparcCells = gs_15
10408 + ../sparc/instructions/sparcInstr.sml
10410 + signature gs_16 = SPARCINSTR
10411 + functor gs_17 = SparcInstr
10414 + ../sparc/instructions/sparcinstr-ext.sml
10416 + structure gs_18 = SparcInstrExt
10419 + signature CONTROL_FLOW_GRAPH = gs_0
10420 + signature MLTREE = gs_2
10421 + signature MLTREE_STREAM = gs_1
10422 + signature SPARCINSTR = gs_16
10423 + functor SparcInstr = gs_17
10424 + structure SparcInstrExt = gs_18
10425 + ../sparc/instructions/sparccomp-instr-ext.sml
10427 + signature gs_19 = SPARCCOMP_INSTR_EXT
10428 + functor gs_20 = SparcCompInstrExt
10433 + signature gs_21 = INSTRUCTION_EMITTER
10438 + structure gs_22 = Word8
10443 + structure gs_23 = Word32
10448 + signature gs_24 = CODE_STRING
10453 + signature gs_25 = INSTRUCTION_STREAM
10458 + signature gs_26 = MLTREE_EVAL
10461 + signature CODE_STRING = gs_24
10462 + structure CellsBasis = gs_6
10463 + signature INSTRUCTION_EMITTER = gs_21
10464 + signature INSTRUCTION_STREAM = gs_25
10465 + structure Label = gs_7
10466 + signature MLRISC_ERROR_MSG = gs_12
10467 + structure MLRiscErrorMsg = gs_13
10468 + signature MLTREE_EVAL = gs_26
10469 + signature SPARCINSTR = gs_16
10470 + functor SparcInstr = gs_17
10471 + structure Word32 = gs_23
10472 + structure Word8 = gs_22
10473 + ../sparc/emit/sparcMC.sml
10475 + functor gs_27 = SparcMCEmitter
10480 + functor gs_28 = Shuffle
10485 + structure gs_29 = Option
10488 + structure CellsBasis = gs_6
10489 + signature SPARCINSTR = gs_16
10490 + functor SparcInstr = gs_17
10491 + ../sparc/instructions/sparcShuffle.sig
10493 + signature gs_30 = SPARCSHUFFLE
10496 + structure CellsBasis = gs_6
10497 + signature MLRISC_ERROR_MSG = gs_12
10498 + structure MLRiscErrorMsg = gs_13
10499 + structure Option = gs_29
10500 + signature SPARCINSTR = gs_16
10501 + signature SPARCSHUFFLE = gs_30
10502 + functor Shuffle = gs_28
10503 + functor SparcInstr = gs_17
10504 + structure Word32 = gs_23
10505 + ../sparc/instructions/sparcShuffle.sml
10507 + functor gs_31 = SparcShuffle
10512 + signature gs_32 = DELAY_SLOT_PROPERTIES
10517 + signature gs_33 = INSN_PROPERTIES
10520 + structure CellsBasis = gs_6
10521 + signature DELAY_SLOT_PROPERTIES = gs_32
10522 + signature INSN_PROPERTIES = gs_33
10523 + signature MLRISC_ERROR_MSG = gs_12
10524 + structure MLRiscErrorMsg = gs_13
10525 + structure Option = gs_29
10526 + signature SPARCINSTR = gs_16
10527 + functor SparcInstr = gs_17
10528 + ../sparc/backpatch/sparcDelaySlotProps.sml
10530 + functor gs_34 = SparcDelaySlots
10535 + signature gs_35 = FREQUENCY_PROPERTIES
10540 + signature gs_36 = PROBABILITY
10541 + structure gs_37 = Probability
10546 + structure gs_38 = MLRiscAnnotations
10549 + signature FREQUENCY_PROPERTIES = gs_35
10550 + structure MLRiscAnnotations = gs_38
10551 + signature PROBABILITY = gs_36
10552 + structure Probability = gs_37
10553 + signature SPARCINSTR = gs_16
10554 + functor SparcInstr = gs_17
10555 + ../sparc/instructions/sparcFreqProps.sml
10557 + functor gs_39 = SparcFreqProps
10562 + signature gs_40 = PSEUDO_OPS_BASIS
10567 + functor gs_41 = GasPseudoOps
10572 + functor gs_42 = PseudoOpsBig
10577 + structure gs_43 = Format
10582 + structure gs_44 = PseudoOpsBasisTyp
10585 + structure Format = gs_43
10586 + functor GasPseudoOps = gs_41
10587 + signature MLRISC_ERROR_MSG = gs_12
10588 + structure MLRiscErrorMsg = gs_13
10589 + signature MLTREE = gs_2
10590 + signature MLTREE_EVAL = gs_26
10591 + signature PSEUDO_OPS_BASIS = gs_40
10592 + structure PseudoOpsBasisTyp = gs_44
10593 + functor PseudoOpsBig = gs_42
10594 + structure Word32 = gs_23
10595 + ../sparc/flowgraph/sparcGasPseudoOps.sml
10597 + functor gs_45 = SparcGasPseudoOps
10602 + functor gs_46 = MLTreeMult
10607 + functor gs_47 = MLTreeGen
10612 + signature gs_48 = MLTREECOMP
10613 + signature gs_49 = MLTREE_EXTENSION_COMP
10616 + structure CellsBasis = gs_6
10617 + signature SPARCINSTR = gs_16
10618 + functor SparcInstr = gs_17
10619 + ../sparc/mltree/sparcPseudoInstr.sig
10621 + signature gs_50 = SPARC_PSEUDO_INSTR
10624 + structure CellsBasis = gs_6
10625 + signature MLRISC_ERROR_MSG = gs_12
10626 + structure MLRiscAnnotations = gs_38
10627 + structure MLRiscErrorMsg = gs_13
10628 + signature MLTREECOMP = gs_48
10629 + signature MLTREE_EXTENSION_COMP = gs_49
10630 + functor MLTreeGen = gs_47
10631 + functor MLTreeMult = gs_46
10632 + signature SPARCINSTR = gs_16
10633 + signature SPARC_PSEUDO_INSTR = gs_50
10634 + functor SparcInstr = gs_17
10635 + structure Word32 = gs_23
10636 + ../sparc/mltree/sparc.sml
10638 + functor gs_51 = Sparc
10643 + structure gs_52 = IntInf
10648 + structure gs_53 = Word
10653 + signature gs_54 = MLTREE_HASH
10656 + structure CellsBasis = gs_6
10657 + signature INSN_PROPERTIES = gs_33
10658 + structure IntInf = gs_52
10659 + structure Label = gs_7
10660 + signature MLRISC_ERROR_MSG = gs_12
10661 + structure MLRiscErrorMsg = gs_13
10662 + signature MLTREE_EVAL = gs_26
10663 + signature MLTREE_HASH = gs_54
10664 + structure Option = gs_29
10665 + signature SPARCINSTR = gs_16
10666 + functor SparcInstr = gs_17
10667 + structure Word = gs_53
10668 + ../sparc/instructions/sparcProps.sml
10670 + functor gs_55 = SparcProps
10675 + signature gs_56 = SDI_JUMPS
10678 + structure CellsBasis = gs_6
10679 + signature MLRISC_ERROR_MSG = gs_12
10680 + structure MLRiscErrorMsg = gs_13
10681 + signature MLTREE_EVAL = gs_26
10682 + signature SDI_JUMPS = gs_56
10683 + signature SPARCINSTR = gs_16
10684 + signature SPARCSHUFFLE = gs_30
10685 + functor SparcInstr = gs_17
10686 + structure Word32 = gs_23
10687 + ../sparc/backpatch/sparcJumps.sml
10689 + functor gs_57 = SparcJumps
10694 + signature gs_58 = C_CALLS
10699 + structure gs_59 = CTypes
10704 + structure gs_60 = String
10709 + structure gs_61 = List
10712 + structure CTypes = gs_59
10713 + signature C_CALLS = gs_58
10714 + structure Int = gs_10
10715 + structure List = gs_61
10716 + signature MLRISC_ERROR_MSG = gs_12
10717 + structure MLRiscAnnotations = gs_38
10718 + structure MLRiscErrorMsg = gs_13
10719 + signature MLTREE = gs_2
10720 + signature SPARCCELLS = gs_14
10721 + structure SparcCells = gs_15
10722 + structure SparcInstrExt = gs_18
10723 + structure String = gs_60
10724 + ../sparc/c-calls/sparc-c-calls.sml
10726 + functor gs_62 = Sparc_CCalls
10731 + signature gs_63 = ASM_FORMAT_UTIL
10732 + structure gs_64 = AsmFormatUtil
10737 + signature gs_65 = ASM_STREAM
10738 + structure gs_66 = AsmStream
10743 + structure gs_67 = TextIO
10748 + structure gs_68 = AsmFlags
10751 + signature ASM_FORMAT_UTIL = gs_63
10752 + signature ASM_STREAM = gs_65
10753 + structure Annotations = gs_8
10754 + structure AsmFlags = gs_68
10755 + structure AsmFormatUtil = gs_64
10756 + structure AsmStream = gs_66
10757 + structure CellsBasis = gs_6
10758 + signature INSTRUCTION_EMITTER = gs_21
10759 + signature INSTRUCTION_STREAM = gs_25
10760 + structure Int = gs_10
10761 + signature MLRISC_ERROR_MSG = gs_12
10762 + structure MLRiscErrorMsg = gs_13
10763 + signature MLTREE_EVAL = gs_26
10764 + signature SPARCINSTR = gs_16
10765 + signature SPARCSHUFFLE = gs_30
10766 + functor SparcInstr = gs_17
10767 + structure String = gs_60
10768 + structure TextIO = gs_67
10769 + structure Word32 = gs_23
10770 + ../sparc/emit/sparcAsm.sml
10772 + functor gs_69 = SparcAsmEmitter
10775 + structure CellsBasis = gs_6
10776 + signature MLRISC_ERROR_MSG = gs_12
10777 + structure MLRiscErrorMsg = gs_13
10778 + signature SPARCINSTR = gs_16
10779 + functor SparcInstr = gs_17
10780 + ../sparc/ra/sparcRewrite.sml
10782 + functor gs_70 = SparcRewrite
10787 + signature gs_71 = ARCH_SPILL_INSTR
10790 + signature ARCH_SPILL_INSTR = gs_71
10791 + structure CellsBasis = gs_6
10792 + signature MLRISC_ERROR_MSG = gs_12
10793 + structure MLRiscErrorMsg = gs_13
10794 + signature SPARCINSTR = gs_16
10795 + functor SparcInstr = gs_17
10796 + functor SparcRewrite = gs_70
10797 + ../sparc/ra/sparcSpillInstr.sml
10799 + functor gs_72 = SparcSpillInstr
10802 + signature SPARCCELLS = gs_14
10803 + signature SPARCCOMP_INSTR_EXT = gs_19
10804 + signature SPARCINSTR = gs_16
10805 + signature SPARCSHUFFLE = gs_30
10806 + signature SPARC_PSEUDO_INSTR = gs_50
10807 + functor Sparc = gs_51
10808 + functor SparcAsmEmitter = gs_69
10809 + structure SparcCells = gs_15
10810 + functor SparcCompInstrExt = gs_20
10811 + functor SparcDelaySlots = gs_34
10812 + functor SparcFreqProps = gs_39
10813 + functor SparcGasPseudoOps = gs_45
10814 + functor SparcInstr = gs_17
10815 + structure SparcInstrExt = gs_18
10816 + functor SparcJumps = gs_57
10817 + functor SparcMCEmitter = gs_27
10818 + functor SparcProps = gs_55
10819 + functor SparcRewrite = gs_70
10820 + functor SparcShuffle = gs_31
10821 + functor SparcSpillInstr = gs_72
10822 + functor Sparc_CCalls = gs_62
10827 diff --git a/mlb/StagedAlloc.mlb b/mlb/StagedAlloc.mlb
10828 new file mode 100644
10829 index 0000000..4a9ddf8
10831 +++ b/mlb/StagedAlloc.mlb
10835 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10836 + "redundantBind warn" "redundantMatch warn"
10837 + "sequenceNonUnit ignore"
10838 + "warnUnused false" "forceUsed"
10839 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10845 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10849 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
10853 + $(SML_LIB)/basis/pervasive.mlb
10855 + ../staged-alloc/conventions/c-loc-kind.sml
10857 + structure gs_0 = CLocKind
10860 + ../staged-alloc/allocator/staged-allocation-sig.sml
10862 + signature gs_1 = STAGED_ALLOCATION
10867 + structure gs_2 = List
10872 + structure gs_3 = Int
10875 + structure CLocKind = gs_0
10876 + structure Int = gs_3
10877 + structure List = gs_2
10878 + signature STAGED_ALLOCATION = gs_1
10879 + ../staged-alloc/conventions/sparc-c-fn.sml
10881 + functor gs_4 = SparcCConventionFn
10884 + structure CLocKind = gs_0
10885 + structure Int = gs_3
10886 + structure List = gs_2
10887 + signature STAGED_ALLOCATION = gs_1
10888 + ../staged-alloc/conventions/x86-c-fn.sml
10890 + functor gs_5 = X86CConventionFn
10893 + structure CLocKind = gs_0
10894 + structure Int = gs_3
10895 + structure List = gs_2
10896 + signature STAGED_ALLOCATION = gs_1
10897 + ../staged-alloc/conventions/x86-64-c-fn.sml
10899 + functor gs_6 = X86_64CConventionFn
10904 + structure gs_7 = IntBinaryMap
10907 + structure Int = gs_3
10908 + structure IntBinaryMap = gs_7
10909 + structure List = gs_2
10910 + signature STAGED_ALLOCATION = gs_1
10911 + ../staged-alloc/allocator/staged-allocation-fn.sml
10913 + functor gs_8 = StagedAllocationFn
10916 + structure CLocKind = gs_0
10917 + signature STAGED_ALLOCATION = gs_1
10918 + functor SparcCConventionFn = gs_4
10919 + functor StagedAllocationFn = gs_8
10920 + functor X86CConventionFn = gs_5
10921 + functor X86_64CConventionFn = gs_6
10926 diff --git a/mlb/Visual.mlb b/mlb/Visual.mlb
10927 new file mode 100644
10928 index 0000000..7b85fd5
10930 +++ b/mlb/Visual.mlb
10934 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10935 + "redundantBind warn" "redundantMatch warn"
10936 + "sequenceNonUnit ignore"
10937 + "warnUnused false" "forceUsed"
10938 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10944 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10948 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
10952 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
10956 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
10960 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10964 + $(SML_LIB)/basis/pervasive.mlb
10968 + signature gs_0 = MLRISC_CONTROL
10969 + structure gs_1 = MLRiscControl
10974 + signature gs_2 = ISOMORPHIC_GRAPH_VIEW
10975 + structure gs_3 = IsomorphicGraphView
10980 + structure gs_4 = Graph
10985 + structure gs_5 = Annotations
10990 + structure gs_6 = Int
10993 + structure Annotations = gs_5
10994 + structure Graph = gs_4
10995 + signature ISOMORPHIC_GRAPH_VIEW = gs_2
10996 + structure Int = gs_6
10997 + structure IsomorphicGraphView = gs_3
10998 + ../visualization/graphLayout.sml
11000 + structure gs_7 = GraphLayout
11003 + structure GraphLayout = gs_7
11004 + ../visualization/graphDisplay.sig
11006 + signature gs_8 = GRAPH_DISPLAY
11011 + structure gs_9 = String
11016 + structure gs_10 = List
11019 + signature GRAPH_DISPLAY = gs_8
11020 + structure Graph = gs_4
11021 + structure GraphLayout = gs_7
11022 + structure Int = gs_6
11023 + structure List = gs_10
11024 + structure String = gs_9
11025 + ../visualization/daVinci.sml
11027 + structure gs_11 = daVinci
11030 + signature GRAPH_DISPLAY = gs_8
11031 + structure Graph = gs_4
11032 + structure GraphLayout = gs_7
11033 + structure Int = gs_6
11034 + structure String = gs_9
11035 + ../visualization/vcg.sml
11037 + structure gs_12 = VCG
11040 + signature GRAPH_DISPLAY = gs_8
11041 + structure Graph = gs_4
11042 + structure GraphLayout = gs_7
11043 + structure Int = gs_6
11044 + structure String = gs_9
11045 + ../visualization/dot.sml
11047 + structure gs_13 = Dot
11050 + structure Dot = gs_13
11051 + signature GRAPH_DISPLAY = gs_8
11052 + signature MLRISC_CONTROL = gs_0
11053 + structure MLRiscControl = gs_1
11054 + structure VCG = gs_12
11055 + structure daVinci = gs_11
11056 + ../visualization/allDisplays.sml
11058 + structure gs_14 = AllDisplays
11063 + structure gs_15 = TextIO
11068 + structure gs_16 = OS
11071 + structure GraphLayout = gs_7
11072 + ../visualization/graphViewer.sig
11074 + signature gs_17 = GRAPH_VIEWER
11077 + signature GRAPH_DISPLAY = gs_8
11078 + signature GRAPH_VIEWER = gs_17
11079 + structure Graph = gs_4
11080 + structure GraphLayout = gs_7
11081 + structure Int = gs_6
11082 + signature MLRISC_CONTROL = gs_0
11083 + structure MLRiscControl = gs_1
11084 + structure OS = gs_16
11085 + structure TextIO = gs_15
11086 + ../visualization/graphViewer.sml
11088 + functor gs_18 = GraphViewer
11093 + structure gs_19 = Label
11098 + structure gs_20 = Array
11103 + structure gs_21 = Real
11108 + structure gs_22 = Math
11113 + signature gs_23 = INSTRUCTION_EMITTER
11118 + signature gs_24 = CONTROL_FLOW_GRAPH
11123 + structure gs_25 = StringOutStream
11128 + signature gs_26 = ASM_STREAM
11129 + structure gs_27 = AsmStream
11134 + signature gs_28 = INSTRUCTIONS
11137 + signature ASM_STREAM = gs_26
11138 + structure Annotations = gs_5
11139 + structure AsmStream = gs_27
11140 + signature INSTRUCTIONS = gs_28
11141 + signature INSTRUCTION_EMITTER = gs_23
11142 + structure String = gs_9
11143 + structure StringOutStream = gs_25
11144 + ../visualization/mlrisc-format-insn.sml
11146 + signature gs_29 = FORMAT_INSTRUCTION
11147 + functor gs_30 = FormatInstruction
11150 + structure Annotations = gs_5
11151 + structure Array = gs_20
11152 + signature CONTROL_FLOW_GRAPH = gs_24
11153 + signature FORMAT_INSTRUCTION = gs_29
11154 + functor FormatInstruction = gs_30
11155 + signature GRAPH_VIEWER = gs_17
11156 + structure Graph = gs_4
11157 + structure GraphLayout = gs_7
11158 + signature INSTRUCTION_EMITTER = gs_23
11159 + structure Int = gs_6
11160 + structure Label = gs_19
11161 + structure List = gs_10
11162 + signature MLRISC_CONTROL = gs_0
11163 + structure MLRiscControl = gs_1
11164 + structure Math = gs_22
11165 + structure Real = gs_21
11166 + structure String = gs_9
11167 + ../visualization/cfgViewer.sml
11169 + functor gs_31 = CFGViewer
11172 + structure AllDisplays = gs_14
11173 + functor CFGViewer = gs_31
11174 + structure Dot = gs_13
11175 + functor FormatInstruction = gs_30
11176 + signature GRAPH_DISPLAY = gs_8
11177 + signature GRAPH_VIEWER = gs_17
11178 + structure GraphLayout = gs_7
11179 + functor GraphViewer = gs_18
11180 + structure VCG = gs_12
11181 + structure daVinci = gs_11
11186 diff --git a/mlrisc-lib.mlb b/mlrisc-lib.mlb
11187 new file mode 100644
11188 index 0000000..3545999
11190 +++ b/mlrisc-lib.mlb
11192 +(* DO NOT USE. Only suitable for type-checking purposes. *)
11196 +mlb/AMD64-Peephole.mlb
11198 +mlb/CCall-sparc.mlb
11199 +mlb/CCall-x86-64.mlb
11205 +mlb/IA32-Peephole.mlb
11213 +mlb/StagedAlloc.mlb
11216 diff --git a/mltree/instr-gen.sig b/mltree/instr-gen.sig
11217 index a46af29..c04db90 100644
11218 --- a/mltree/instr-gen.sig
11219 +++ b/mltree/instr-gen.sig
11220 @@ -8,8 +8,29 @@ sig
11221 structure S : INSTRUCTION_STREAM
11222 structure CFG : CONTROL_FLOW_GRAPH
11225 - sharing CFG.P = S.P
11226 + (* sharing I.C = C *)
11227 + (* sharing CFG.P = S.P *)
11228 + where type P.Client.pseudo_op = S.P.Client.pseudo_op
11229 + and type P.T.Basis.cond = S.P.T.Basis.cond
11230 + and type P.T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
11231 + and type P.T.Basis.ext = S.P.T.Basis.ext
11232 + and type P.T.Basis.fcond = S.P.T.Basis.fcond
11233 + and type P.T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
11234 + and type P.T.Constant.const = S.P.T.Constant.const
11235 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
11236 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
11237 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
11238 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
11239 + and type P.T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
11240 + and type P.T.Region.region = S.P.T.Region.region
11241 + and type P.T.ccexp = S.P.T.ccexp
11242 + and type P.T.fexp = S.P.T.fexp
11243 + (* and type P.T.labexp = S.P.T.labexp *)
11244 + and type P.T.mlrisc = S.P.T.mlrisc
11245 + and type P.T.oper = S.P.T.oper
11246 + and type P.T.rep = S.P.T.rep
11247 + and type P.T.rexp = S.P.T.rexp
11248 + and type P.T.stm = S.P.T.stm
11251 * This function creates an instruction stream, which can be
11252 diff --git a/mltree/instr-gen.sml b/mltree/instr-gen.sml
11253 index 4b5d6cd..d31db49 100644
11254 --- a/mltree/instr-gen.sml
11255 +++ b/mltree/instr-gen.sml
11258 (structure I : INSTRUCTIONS
11259 structure Stream : INSTRUCTION_STREAM
11260 - structure CFG : CONTROL_FLOW_GRAPH
11263 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = Stream.P *)
11264 + where type I.addressing_mode = I.addressing_mode
11265 + and type I.ea = I.ea
11266 + and type I.instr = I.instr
11267 + and type I.instruction = I.instruction
11268 + and type I.operand = I.operand
11269 + where type P.Client.pseudo_op = Stream.P.Client.pseudo_op
11270 + and type P.T.Basis.cond = Stream.P.T.Basis.cond
11271 + and type P.T.Basis.div_rounding_mode = Stream.P.T.Basis.div_rounding_mode
11272 + and type P.T.Basis.ext = Stream.P.T.Basis.ext
11273 + and type P.T.Basis.fcond = Stream.P.T.Basis.fcond
11274 + and type P.T.Basis.rounding_mode = Stream.P.T.Basis.rounding_mode
11275 + and type P.T.Constant.const = Stream.P.T.Constant.const
11276 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Stream.P.T.Extension.ccx
11277 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Stream.P.T.Extension.fx
11278 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Stream.P.T.Extension.rx
11279 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Stream.P.T.Extension.sx
11280 + and type P.T.I.div_rounding_mode = Stream.P.T.I.div_rounding_mode
11281 + and type P.T.Region.region = Stream.P.T.Region.region
11282 + and type P.T.ccexp = Stream.P.T.ccexp
11283 + and type P.T.fexp = Stream.P.T.fexp
11284 + (* and type P.T.labexp = Stream.P.T.labexp *)
11285 + and type P.T.mlrisc = Stream.P.T.mlrisc
11286 + and type P.T.oper = Stream.P.T.oper
11287 + and type P.T.rep = Stream.P.T.rep
11288 + and type P.T.rexp = Stream.P.T.rexp
11289 + and type P.T.stm = Stream.P.T.stm
11293 diff --git a/mltree/mltree-gen.sig b/mltree/mltree-gen.sig
11294 index f2d1937..757c6d1 100644
11295 --- a/mltree/mltree-gen.sig
11296 +++ b/mltree/mltree-gen.sig
11297 @@ -9,8 +9,27 @@ signature MLTREEGEN =
11300 structure T : MLTREE
11301 - structure Size : MLTREE_SIZE
11303 + structure Size : MLTREE_SIZE (* where T = T *)
11304 + where type T.Basis.cond = T.Basis.cond
11305 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
11306 + and type T.Basis.ext = T.Basis.ext
11307 + and type T.Basis.fcond = T.Basis.fcond
11308 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
11309 + and type T.Constant.const = T.Constant.const
11310 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
11311 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
11312 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
11313 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
11314 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
11315 + and type T.Region.region = T.Region.region
11316 + and type T.ccexp = T.ccexp
11317 + and type T.fexp = T.fexp
11318 + (* and type T.labexp = T.labexp *)
11319 + and type T.mlrisc = T.mlrisc
11320 + and type T.oper = T.oper
11321 + and type T.rep = T.rep
11322 + and type T.rexp = T.rexp
11323 + and type T.stm = T.stm
11325 val condOf : T.ccexp -> T.Basis.cond
11326 val fcondOf : T.ccexp -> T.Basis.fcond
11327 diff --git a/mltree/mltree-mult.sig b/mltree/mltree-mult.sig
11328 index 827c051..a69f5a6 100644
11329 --- a/mltree/mltree-mult.sig
11330 +++ b/mltree/mltree-mult.sig
11331 @@ -8,7 +8,7 @@ sig
11333 structure T : MLTREE
11334 structure C : CELLS
11335 - structure I : INSTRUCTIONS where C=C
11336 + structure I : INSTRUCTIONS (* where C = C *)
11338 exception TooComplex
11340 diff --git a/mltree/mltree-mult.sml b/mltree/mltree-mult.sml
11341 index 41c26eb..e0e0609 100644
11342 --- a/mltree/mltree-mult.sml
11343 +++ b/mltree/mltree-mult.sml
11344 @@ -8,7 +8,16 @@ functor MLTreeMult
11345 (structure I : INSTRUCTIONS
11346 structure T : MLTREE
11348 - structure CB : CELLS_BASIS = CellsBasis
11349 + structure CB : CELLS_BASIS (* = CellsBasis *)
11350 + where type CellSet.cellset = CellsBasis.CellSet.cellset
11351 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
11352 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
11353 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
11354 + and type cell = CellsBasis.cell
11355 + and type cellColor = CellsBasis.cellColor
11356 + and type cellkind = CellsBasis.cellkind
11357 + and type cellkindDesc = CellsBasis.cellkindDesc
11358 + and type cellkindInfo = CellsBasis.cellkindInfo
11359 val intTy : int (* width of integer type *)
11361 type argi = {r:CB.cell, i:int, d:CB.cell}
11362 @@ -20,8 +29,8 @@ functor MLTreeMult
11363 val slli : argi -> I.instruction list
11364 val srli : argi -> I.instruction list
11365 val srai : argi -> I.instruction list
11367 - (val trapping : bool (* trap on overflow? *)
11369 + val trapping : bool (* trap on overflow? *)
11370 val multCost : int ref (* cost of multiplication *)
11372 (* basic ops; these have to implemented by the architecture *)
11373 @@ -37,8 +46,8 @@ functor MLTreeMult
11374 val sh1addv : (arg -> I.instruction list) option (* a*2 + b *)
11375 val sh2addv : (arg -> I.instruction list) option (* a*4 + b *)
11376 val sh3addv : (arg -> I.instruction list) option (* a*8 + b *)
11378 - (val signed : bool (* signed? *)
11380 + val signed : bool (* signed? *)
11381 ) : MLTREE_MULT_DIV =
11384 diff --git a/mltree/mltree-simplify.in b/mltree/mltree-simplify.in
11385 index 0e8de12..63ebbc2 100644
11386 --- a/mltree/mltree-simplify.in
11387 +++ b/mltree/mltree-simplify.in
11388 @@ -14,8 +14,27 @@ in
11390 functor MLTreeSimplifier
11391 (structure T : MLTREE
11392 - structure Size : MLTREE_SIZE
11394 + structure Size : MLTREE_SIZE (* where T = T *)
11395 + where type T.Basis.cond = T.Basis.cond
11396 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
11397 + and type T.Basis.ext = T.Basis.ext
11398 + and type T.Basis.fcond = T.Basis.fcond
11399 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
11400 + and type T.Constant.const = T.Constant.const
11401 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
11402 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
11403 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
11404 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
11405 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
11406 + and type T.Region.region = T.Region.region
11407 + and type T.ccexp = T.ccexp
11408 + and type T.fexp = T.fexp
11409 + (* and type T.labexp = T.labexp *)
11410 + and type T.mlrisc = T.mlrisc
11411 + and type T.oper = T.oper
11412 + and type T.rep = T.rep
11413 + and type T.rexp = T.rexp
11414 + and type T.stm = T.stm
11416 val sext : T.rewriter -> T.sext -> T.sext
11417 val rext : T.rewriter -> T.rext -> T.rext
11418 diff --git a/mltree/mltree-simplify.sml b/mltree/mltree-simplify.sml
11419 index 75e2867..5a15b04 100644
11420 --- a/mltree/mltree-simplify.sml
11421 +++ b/mltree/mltree-simplify.sml
11422 @@ -9,7 +9,27 @@ functor MLTreeSimplifier(
11423 structure T : MLTREE
11425 (*#line 17.4 "mltree-simplify.in"*)
11426 - structure Size : MLTREE_SIZE where T=T
11427 + structure Size : MLTREE_SIZE (* where T=T *)
11428 + where type T.Basis.cond = T.Basis.cond
11429 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
11430 + and type T.Basis.ext = T.Basis.ext
11431 + and type T.Basis.fcond = T.Basis.fcond
11432 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
11433 + and type T.Constant.const = T.Constant.const
11434 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
11435 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
11436 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
11437 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
11438 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
11439 + and type T.Region.region = T.Region.region
11440 + and type T.ccexp = T.ccexp
11441 + and type T.fexp = T.fexp
11442 + (* and type T.labexp = T.labexp *)
11443 + and type T.mlrisc = T.mlrisc
11444 + and type T.oper = T.oper
11445 + and type T.rep = T.rep
11446 + and type T.rexp = T.rexp
11447 + and type T.stm = T.stm
11449 (*#line 20.4 "mltree-simplify.in"*)
11450 val sext : T.rewriter -> T.sext -> T.sext
11451 diff --git a/mltree/mltree.sig b/mltree/mltree.sig
11452 index 90f25e9..554c25e 100644
11453 --- a/mltree/mltree.sig
11454 +++ b/mltree/mltree.sig
11455 @@ -30,6 +30,10 @@ signature MLTREE = sig
11456 * extension type. Unfortunately, this has to be made polymorphic to make
11457 * it possible for recursive type definitions to work.
11459 + type controlflow = Label.label list (* control flow info *)
11460 + type ctrl = var (* control dependence info *)
11461 + type ctrls = ctrl list
11465 MV of ty * dst * rexp
11466 @@ -211,10 +215,7 @@ signature MLTREE = sig
11470 - withtype controlflow = Label.label list (* control flow info *)
11471 - and ctrl = var (* control dependence info *)
11472 - and ctrls = ctrl list
11473 - and sext = (stm, rexp, fexp, ccexp) Extension.sx
11474 + withtype sext = (stm, rexp, fexp, ccexp) Extension.sx
11475 and rext = (stm, rexp, fexp, ccexp) Extension.rx
11476 and fext = (stm, rexp, fexp, ccexp) Extension.fx
11477 and ccext = (stm, rexp, fexp, ccexp) Extension.ccx
11478 diff --git a/mltree/mltree.sml b/mltree/mltree.sml
11479 index 7f5f1b1..b250ce2 100644
11480 --- a/mltree/mltree.sml
11481 +++ b/mltree/mltree.sml
11482 @@ -32,6 +32,10 @@ struct
11483 * extension type. Unfortunately, this has to be made polymorphic to make
11484 * it possible for recursive type definitions to work.
11486 + type controlflow = Label.label list (* control flow info *)
11487 + type ctrl = var (* control dependence info *)
11488 + type ctrls = ctrl list
11492 MV of ty * dst * rexp
11493 @@ -199,10 +203,7 @@ struct
11497 - withtype controlflow = Label.label list (* control flow info *)
11498 - and ctrl = var (* control dependence info *)
11499 - and ctrls = ctrl list
11500 - and sext = (stm, rexp, fexp, ccexp) Extension.sx
11501 + withtype sext = (stm, rexp, fexp, ccexp) Extension.sx
11502 and rext = (stm, rexp, fexp, ccexp) Extension.rx
11503 and fext = (stm, rexp, fexp, ccexp) Extension.fx
11504 and ccext = (stm, rexp, fexp, ccexp) Extension.ccx
11505 diff --git a/mltree/mltreecomp.sig b/mltree/mltreecomp.sig
11506 index 79ceab5..f6b72e1 100644
11507 --- a/mltree/mltreecomp.sig
11508 +++ b/mltree/mltreecomp.sig
11510 signature MLTREE_EXTENSION_COMP =
11512 structure T : MLTREE
11513 - structure TS : MLTREE_STREAM where T = T
11514 + structure TS : MLTREE_STREAM (* where T = T *)
11515 + where type T.Basis.cond = T.Basis.cond
11516 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
11517 + and type T.Basis.ext = T.Basis.ext
11518 + and type T.Basis.fcond = T.Basis.fcond
11519 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
11520 + and type T.Constant.const = T.Constant.const
11521 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
11522 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
11523 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
11524 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
11525 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
11526 + and type T.Region.region = T.Region.region
11527 + and type T.ccexp = T.ccexp
11528 + and type T.fexp = T.fexp
11529 + (* and type T.labexp = T.labexp *)
11530 + and type T.mlrisc = T.mlrisc
11531 + and type T.oper = T.oper
11532 + and type T.rep = T.rep
11533 + and type T.rexp = T.rexp
11534 + and type T.stm = T.stm
11535 structure I : INSTRUCTIONS
11536 - structure CFG : CONTROL_FLOW_GRAPH
11539 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = TS.S.P *)
11540 + where type I.addressing_mode = I.addressing_mode
11541 + and type I.ea = I.ea
11542 + and type I.instr = I.instr
11543 + and type I.instruction = I.instruction
11544 + and type I.operand = I.operand
11545 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
11546 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
11547 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
11548 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
11549 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
11550 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
11551 + and type P.T.Constant.const = TS.S.P.T.Constant.const
11552 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
11553 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
11554 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
11555 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
11556 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
11557 + and type P.T.Region.region = TS.S.P.T.Region.region
11558 + and type P.T.ccexp = TS.S.P.T.ccexp
11559 + and type P.T.fexp = TS.S.P.T.fexp
11560 + (* and type P.T.labexp = TS.S.P.T.labexp *)
11561 + and type P.T.mlrisc = TS.S.P.T.mlrisc
11562 + and type P.T.oper = TS.S.P.T.oper
11563 + and type P.T.rep = TS.S.P.T.rep
11564 + and type P.T.rexp = TS.S.P.T.rexp
11565 + and type P.T.stm = TS.S.P.T.stm
11568 * The reducer is given to the client during the compilation of
11569 * the user extensions.
11570 @@ -34,11 +79,54 @@ signature MLTREECOMP =
11572 structure TS : MLTREE_STREAM
11573 structure I : INSTRUCTIONS
11574 - structure CFG : CONTROL_FLOW_GRAPH
11577 - structure Gen : MLTREEGEN
11579 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = TS.S.P *)
11580 + where type I.addressing_mode = I.addressing_mode
11581 + and type I.ea = I.ea
11582 + and type I.instr = I.instr
11583 + and type I.instruction = I.instruction
11584 + and type I.operand = I.operand
11585 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
11586 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
11587 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
11588 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
11589 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
11590 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
11591 + and type P.T.Constant.const = TS.S.P.T.Constant.const
11592 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
11593 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
11594 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
11595 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
11596 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
11597 + and type P.T.Region.region = TS.S.P.T.Region.region
11598 + and type P.T.ccexp = TS.S.P.T.ccexp
11599 + and type P.T.fexp = TS.S.P.T.fexp
11600 + (* and type P.T.labexp = TS.S.P.T.labexp *)
11601 + and type P.T.mlrisc = TS.S.P.T.mlrisc
11602 + and type P.T.oper = TS.S.P.T.oper
11603 + and type P.T.rep = TS.S.P.T.rep
11604 + and type P.T.rexp = TS.S.P.T.rexp
11605 + and type P.T.stm = TS.S.P.T.stm
11606 + structure Gen : MLTREEGEN (* where T = TS.T *)
11607 + where type T.Basis.cond = TS.T.Basis.cond
11608 + and type T.Basis.div_rounding_mode = TS.T.Basis.div_rounding_mode
11609 + and type T.Basis.ext = TS.T.Basis.ext
11610 + and type T.Basis.fcond = TS.T.Basis.fcond
11611 + and type T.Basis.rounding_mode = TS.T.Basis.rounding_mode
11612 + and type T.Constant.const = TS.T.Constant.const
11613 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) TS.T.Extension.ccx
11614 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) TS.T.Extension.fx
11615 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) TS.T.Extension.rx
11616 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) TS.T.Extension.sx
11617 + and type T.I.div_rounding_mode = TS.T.I.div_rounding_mode
11618 + and type T.Region.region = TS.T.Region.region
11619 + and type T.ccexp = TS.T.ccexp
11620 + and type T.fexp = TS.T.fexp
11621 + (* and type T.labexp = TS.T.labexp *)
11622 + and type T.mlrisc = TS.T.mlrisc
11623 + and type T.oper = TS.T.oper
11624 + and type T.rep = TS.T.rep
11625 + and type T.rexp = TS.T.rexp
11626 + and type T.stm = TS.T.stm
11628 type instrStream = (I.instruction, I.C.cellset, CFG.cfg) TS.stream
11629 type mltreeStream = (TS.T.stm, TS.T.mlrisc list, CFG.cfg) TS.stream
11630 diff --git a/omit-frameptr/omit-frame-pointer.sig b/omit-frameptr/omit-frame-pointer.sig
11631 index dc0fb5b..e4ec806 100644
11632 --- a/omit-frameptr/omit-frame-pointer.sig
11633 +++ b/omit-frameptr/omit-frame-pointer.sig
11636 signature OMIT_FRAME_POINTER = sig
11637 structure I : INSTRUCTIONS
11638 - structure CFG : CONTROL_FLOW_GRAPH where I = I
11639 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I *)
11640 + where type I.addressing_mode = I.addressing_mode
11641 + and type I.ea = I.ea
11642 + and type I.instr = I.instr
11643 + and type I.instruction = I.instruction
11644 + and type I.operand = I.operand
11646 (* idelta is the intial displacement between the fp and sp. *)
11647 val omitframeptr : {vfp:CellsBasis.cell, idelta:Int32.int option, cfg:CFG.cfg} -> unit
11648 diff --git a/ppc/backpatch/ppcDelaySlots.sml b/ppc/backpatch/ppcDelaySlots.sml
11649 index 69823c1..a01898a 100644
11650 --- a/ppc/backpatch/ppcDelaySlots.sml
11651 +++ b/ppc/backpatch/ppcDelaySlots.sml
11655 functor PPCDelaySlots(structure I : PPCINSTR
11656 - structure P : INSN_PROPERTIES
11658 + structure P : INSN_PROPERTIES (* where I = I *)
11659 + where type I.addressing_mode = I.addressing_mode
11660 + and type I.ea = I.ea
11661 + and type I.instr = I.instr
11662 + and type I.instruction = I.instruction
11663 + and type I.operand = I.operand
11664 ) : DELAY_SLOT_PROPERTIES =
11667 diff --git a/ppc/backpatch/ppcJumps.sml b/ppc/backpatch/ppcJumps.sml
11668 index e12d7d2..7f27356 100644
11669 --- a/ppc/backpatch/ppcJumps.sml
11670 +++ b/ppc/backpatch/ppcJumps.sml
11673 (structure Instr: PPCINSTR
11674 - structure Shuffle : PPCSHUFFLE where I = Instr
11675 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
11676 + structure Shuffle : PPCSHUFFLE (* where I = Instr *)
11677 + where type I.Constant.const = Instr.Constant.const
11678 + and type I.Region.region = Instr.Region.region
11679 + and type I.T.Basis.cond = Instr.T.Basis.cond
11680 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
11681 + and type I.T.Basis.ext = Instr.T.Basis.ext
11682 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
11683 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
11684 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
11685 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
11686 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
11687 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
11688 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
11689 + and type I.T.ccexp = Instr.T.ccexp
11690 + and type I.T.fexp = Instr.T.fexp
11691 + (* and type I.T.labexp = Instr.T.labexp *)
11692 + and type I.T.mlrisc = Instr.T.mlrisc
11693 + and type I.T.oper = Instr.T.oper
11694 + and type I.T.rep = Instr.T.rep
11695 + and type I.T.rexp = Instr.T.rexp
11696 + and type I.T.stm = Instr.T.stm
11697 + and type I.arith = Instr.arith
11698 + and type I.arithi = Instr.arithi
11699 + and type I.bit = Instr.bit
11700 + and type I.bo = Instr.bo
11701 + and type I.ccarith = Instr.ccarith
11702 + and type I.cmp = Instr.cmp
11703 + and type I.ea = Instr.ea
11704 + and type I.farith = Instr.farith
11705 + and type I.farith3 = Instr.farith3
11706 + and type I.fcmp = Instr.fcmp
11707 + and type I.fload = Instr.fload
11708 + and type I.fstore = Instr.fstore
11709 + and type I.funary = Instr.funary
11710 + and type I.instr = Instr.instr
11711 + and type I.instruction = Instr.instruction
11712 + and type I.load = Instr.load
11713 + and type I.operand = Instr.operand
11714 + and type I.rotate = Instr.rotate
11715 + and type I.rotatei = Instr.rotatei
11716 + and type I.spr = Instr.spr
11717 + and type I.store = Instr.store
11718 + and type I.unary = Instr.unary
11719 + and type I.xerbit = Instr.xerbit
11720 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
11721 + where type T.Basis.cond = Instr.T.Basis.cond
11722 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
11723 + and type T.Basis.ext = Instr.T.Basis.ext
11724 + and type T.Basis.fcond = Instr.T.Basis.fcond
11725 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
11726 + and type T.Constant.const = Instr.T.Constant.const
11727 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
11728 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
11729 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
11730 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
11731 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
11732 + and type T.Region.region = Instr.T.Region.region
11733 + and type T.ccexp = Instr.T.ccexp
11734 + and type T.fexp = Instr.T.fexp
11735 + (* and type T.labexp = Instr.T.labexp *)
11736 + and type T.mlrisc = Instr.T.mlrisc
11737 + and type T.oper = Instr.T.oper
11738 + and type T.rep = Instr.T.rep
11739 + and type T.rexp = Instr.T.rexp
11740 + and type T.stm = Instr.T.stm
11743 structure I = Instr
11744 diff --git a/ppc/emit/ppcAsm.sml b/ppc/emit/ppcAsm.sml
11745 index 646f56e..1eeb794 100644
11746 --- a/ppc/emit/ppcAsm.sml
11747 +++ b/ppc/emit/ppcAsm.sml
11751 functor PPCAsmEmitter(structure S : INSTRUCTION_STREAM
11752 - structure Instr : PPCINSTR
11754 - structure Shuffle : PPCSHUFFLE
11756 - structure MLTreeEval : MLTREE_EVAL
11757 - where T = Instr.T
11758 + structure Instr : PPCINSTR (* where T = S.P.T *)
11759 + where type T.Basis.cond = S.P.T.Basis.cond
11760 + and type T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
11761 + and type T.Basis.ext = S.P.T.Basis.ext
11762 + and type T.Basis.fcond = S.P.T.Basis.fcond
11763 + and type T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
11764 + and type T.Constant.const = S.P.T.Constant.const
11765 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
11766 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
11767 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
11768 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
11769 + and type T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
11770 + and type T.Region.region = S.P.T.Region.region
11771 + and type T.ccexp = S.P.T.ccexp
11772 + and type T.fexp = S.P.T.fexp
11773 + (* and type T.labexp = S.P.T.labexp *)
11774 + and type T.mlrisc = S.P.T.mlrisc
11775 + and type T.oper = S.P.T.oper
11776 + and type T.rep = S.P.T.rep
11777 + and type T.rexp = S.P.T.rexp
11778 + and type T.stm = S.P.T.stm
11779 + structure Shuffle : PPCSHUFFLE (* where I = Instr *)
11780 + where type I.Constant.const = Instr.Constant.const
11781 + and type I.Region.region = Instr.Region.region
11782 + and type I.T.Basis.cond = Instr.T.Basis.cond
11783 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
11784 + and type I.T.Basis.ext = Instr.T.Basis.ext
11785 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
11786 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
11787 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
11788 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
11789 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
11790 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
11791 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
11792 + and type I.T.ccexp = Instr.T.ccexp
11793 + and type I.T.fexp = Instr.T.fexp
11794 + (* and type I.T.labexp = Instr.T.labexp *)
11795 + and type I.T.mlrisc = Instr.T.mlrisc
11796 + and type I.T.oper = Instr.T.oper
11797 + and type I.T.rep = Instr.T.rep
11798 + and type I.T.rexp = Instr.T.rexp
11799 + and type I.T.stm = Instr.T.stm
11800 + and type I.arith = Instr.arith
11801 + and type I.arithi = Instr.arithi
11802 + and type I.bit = Instr.bit
11803 + and type I.bo = Instr.bo
11804 + and type I.ccarith = Instr.ccarith
11805 + and type I.cmp = Instr.cmp
11806 + and type I.ea = Instr.ea
11807 + and type I.farith = Instr.farith
11808 + and type I.farith3 = Instr.farith3
11809 + and type I.fcmp = Instr.fcmp
11810 + and type I.fload = Instr.fload
11811 + and type I.fstore = Instr.fstore
11812 + and type I.funary = Instr.funary
11813 + and type I.instr = Instr.instr
11814 + and type I.instruction = Instr.instruction
11815 + and type I.load = Instr.load
11816 + and type I.operand = Instr.operand
11817 + and type I.rotate = Instr.rotate
11818 + and type I.rotatei = Instr.rotatei
11819 + and type I.spr = Instr.spr
11820 + and type I.store = Instr.store
11821 + and type I.unary = Instr.unary
11822 + and type I.xerbit = Instr.xerbit
11823 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
11824 + where type T.Basis.cond = Instr.T.Basis.cond
11825 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
11826 + and type T.Basis.ext = Instr.T.Basis.ext
11827 + and type T.Basis.fcond = Instr.T.Basis.fcond
11828 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
11829 + and type T.Constant.const = Instr.T.Constant.const
11830 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
11831 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
11832 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
11833 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
11834 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
11835 + and type T.Region.region = Instr.T.Region.region
11836 + and type T.ccexp = Instr.T.ccexp
11837 + and type T.fexp = Instr.T.fexp
11838 + (* and type T.labexp = Instr.T.labexp *)
11839 + and type T.mlrisc = Instr.T.mlrisc
11840 + and type T.oper = Instr.T.oper
11841 + and type T.rep = Instr.T.rep
11842 + and type T.rexp = Instr.T.rexp
11843 + and type T.stm = Instr.T.stm
11844 ) : INSTRUCTION_EMITTER =
11846 structure I = Instr
11847 diff --git a/ppc/emit/ppcMC.sml b/ppc/emit/ppcMC.sml
11848 index 1951264..29ee9cb 100644
11849 --- a/ppc/emit/ppcMC.sml
11850 +++ b/ppc/emit/ppcMC.sml
11854 functor PPCMCEmitter(structure Instr : PPCINSTR
11855 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
11856 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
11857 + where type T.Basis.cond = Instr.T.Basis.cond
11858 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
11859 + and type T.Basis.ext = Instr.T.Basis.ext
11860 + and type T.Basis.fcond = Instr.T.Basis.fcond
11861 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
11862 + and type T.Constant.const = Instr.T.Constant.const
11863 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
11864 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
11865 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
11866 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
11867 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
11868 + and type T.Region.region = Instr.T.Region.region
11869 + and type T.ccexp = Instr.T.ccexp
11870 + and type T.fexp = Instr.T.fexp
11871 + (* and type T.labexp = Instr.T.labexp *)
11872 + and type T.mlrisc = Instr.T.mlrisc
11873 + and type T.oper = Instr.T.oper
11874 + and type T.rep = Instr.T.rep
11875 + and type T.rexp = Instr.T.rexp
11876 + and type T.stm = Instr.T.stm
11877 structure Stream : INSTRUCTION_STREAM
11878 structure CodeString : CODE_STRING
11879 ) : INSTRUCTION_EMITTER =
11880 @@ -47,6 +67,7 @@ struct
11881 (* note: fromLargeWord strips the high order bits! *)
11884 + val w = W.toLargeWord w
11885 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
11887 fun doNothing _ = ()
11888 diff --git a/ppc/flowgraph/ppcDarwinPseudoOps.sml b/ppc/flowgraph/ppcDarwinPseudoOps.sml
11889 index daf6933..533b845 100644
11890 --- a/ppc/flowgraph/ppcDarwinPseudoOps.sml
11891 +++ b/ppc/flowgraph/ppcDarwinPseudoOps.sml
11894 functor PPCDarwinPseudoOps (
11895 structure T : MLTREE
11896 - structure MLTreeEval : MLTREE_EVAL where T = T
11897 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
11898 + where type T.Basis.cond = T.Basis.cond
11899 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
11900 + and type T.Basis.ext = T.Basis.ext
11901 + and type T.Basis.fcond = T.Basis.fcond
11902 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
11903 + and type T.Constant.const = T.Constant.const
11904 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
11905 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
11906 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
11907 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
11908 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
11909 + and type T.Region.region = T.Region.region
11910 + and type T.ccexp = T.ccexp
11911 + and type T.fexp = T.fexp
11912 + (* and type T.labexp = T.labexp *)
11913 + and type T.mlrisc = T.mlrisc
11914 + and type T.oper = T.oper
11915 + and type T.rep = T.rep
11916 + and type T.rexp = T.rexp
11917 + and type T.stm = T.stm
11918 ) : PSEUDO_OPS_BASIS = struct
11921 diff --git a/ppc/flowgraph/ppcGasPseudoOps.sml b/ppc/flowgraph/ppcGasPseudoOps.sml
11922 index e627bfa..267246d 100644
11923 --- a/ppc/flowgraph/ppcGasPseudoOps.sml
11924 +++ b/ppc/flowgraph/ppcGasPseudoOps.sml
11926 functor PPCGasPseudoOps
11927 ( structure T : MLTREE
11928 - structure MLTreeEval : MLTREE_EVAL where T = T
11929 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
11930 + where type T.Basis.cond = T.Basis.cond
11931 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
11932 + and type T.Basis.ext = T.Basis.ext
11933 + and type T.Basis.fcond = T.Basis.fcond
11934 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
11935 + and type T.Constant.const = T.Constant.const
11936 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
11937 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
11938 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
11939 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
11940 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
11941 + and type T.Region.region = T.Region.region
11942 + and type T.ccexp = T.ccexp
11943 + and type T.fexp = T.fexp
11944 + (* and type T.labexp = T.labexp *)
11945 + and type T.mlrisc = T.mlrisc
11946 + and type T.oper = T.oper
11947 + and type T.rep = T.rep
11948 + and type T.rexp = T.rexp
11949 + and type T.stm = T.stm
11950 ) : PSEUDO_OPS_BASIS =
11953 diff --git a/ppc/instructions/ppcCompInstrExt.sml b/ppc/instructions/ppcCompInstrExt.sml
11954 index b2354cd..d7b6562 100644
11955 --- a/ppc/instructions/ppcCompInstrExt.sml
11956 +++ b/ppc/instructions/ppcCompInstrExt.sml
11958 signature PPCCOMP_INSTR_EXT =
11960 structure I : PPCINSTR
11961 - structure TS : MLTREE_STREAM
11963 - structure CFG : CONTROL_FLOW_GRAPH
11966 + structure TS : MLTREE_STREAM (* where T = I.T *)
11967 + where type T.Basis.cond = I.T.Basis.cond
11968 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
11969 + and type T.Basis.ext = I.T.Basis.ext
11970 + and type T.Basis.fcond = I.T.Basis.fcond
11971 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
11972 + and type T.Constant.const = I.T.Constant.const
11973 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
11974 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
11975 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
11976 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
11977 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
11978 + and type T.Region.region = I.T.Region.region
11979 + and type T.ccexp = I.T.ccexp
11980 + and type T.fexp = I.T.fexp
11981 + (* and type T.labexp = I.T.labexp *)
11982 + and type T.mlrisc = I.T.mlrisc
11983 + and type T.oper = I.T.oper
11984 + and type T.rep = I.T.rep
11985 + and type T.rexp = I.T.rexp
11986 + and type T.stm = I.T.stm
11987 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and and P = TS.S.P *)
11988 + where type I.addressing_mode = I.addressing_mode
11989 + and type I.ea = I.ea
11990 + and type I.instr = I.instr
11991 + and type I.instruction = I.instruction
11992 + and type I.operand = I.operand
11993 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
11994 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
11995 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
11996 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
11997 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
11998 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
11999 + and type P.T.Constant.const = TS.S.P.T.Constant.const
12000 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
12001 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
12002 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
12003 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
12004 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
12005 + and type P.T.Region.region = TS.S.P.T.Region.region
12006 + and type P.T.ccexp = TS.S.P.T.ccexp
12007 + and type P.T.fexp = TS.S.P.T.fexp
12008 + (* and type P.T.labexp = TS.S.P.T.labexp *)
12009 + and type P.T.mlrisc = TS.S.P.T.mlrisc
12010 + and type P.T.oper = TS.S.P.T.oper
12011 + and type P.T.rep = TS.S.P.T.rep
12012 + and type P.T.rexp = TS.S.P.T.rexp
12013 + and type P.T.stm = TS.S.P.T.stm
12016 (I.instruction, I.C.cellset, I.operand, I.addressing_mode, CFG.cfg) TS.reducer
12017 @@ -28,12 +71,54 @@ signature PPCCOMP_INSTR_EXT =
12018 functor PPCCompInstrExt (
12020 structure I : PPCINSTR
12021 - structure TS : MLTREE_STREAM
12023 - structure CFG : CONTROL_FLOW_GRAPH
12027 + structure TS : MLTREE_STREAM (* where T = I.T *)
12028 + where type T.Basis.cond = I.T.Basis.cond
12029 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
12030 + and type T.Basis.ext = I.T.Basis.ext
12031 + and type T.Basis.fcond = I.T.Basis.fcond
12032 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
12033 + and type T.Constant.const = I.T.Constant.const
12034 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
12035 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
12036 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
12037 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
12038 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
12039 + and type T.Region.region = I.T.Region.region
12040 + and type T.ccexp = I.T.ccexp
12041 + and type T.fexp = I.T.fexp
12042 + (* and type T.labexp = I.T.labexp *)
12043 + and type T.mlrisc = I.T.mlrisc
12044 + and type T.oper = I.T.oper
12045 + and type T.rep = I.T.rep
12046 + and type T.rexp = I.T.rexp
12047 + and type T.stm = I.T.stm
12048 + structure CFG : CONTROL_FLOW_GRAPH (* where P = TS.S.P and I = I *)
12049 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
12050 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
12051 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
12052 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
12053 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
12054 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
12055 + and type P.T.Constant.const = TS.S.P.T.Constant.const
12056 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
12057 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
12058 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
12059 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
12060 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
12061 + and type P.T.Region.region = TS.S.P.T.Region.region
12062 + and type P.T.ccexp = TS.S.P.T.ccexp
12063 + and type P.T.fexp = TS.S.P.T.fexp
12064 + (* and type P.T.labexp = TS.S.P.T.labexp *)
12065 + and type P.T.mlrisc = TS.S.P.T.mlrisc
12066 + and type P.T.oper = TS.S.P.T.oper
12067 + and type P.T.rep = TS.S.P.T.rep
12068 + and type P.T.rexp = TS.S.P.T.rexp
12069 + and type P.T.stm = TS.S.P.T.stm
12070 + where type I.addressing_mode = I.addressing_mode
12071 + and type I.ea = I.ea
12072 + and type I.instr = I.instr
12073 + and type I.instruction = I.instruction
12074 + and type I.operand = I.operand
12075 ) : PPCCOMP_INSTR_EXT = struct
12077 structure CFG = CFG
12078 diff --git a/ppc/instructions/ppcInstr.sml b/ppc/instructions/ppcInstr.sml
12079 index c6d3ec4..4d654e2 100644
12080 --- a/ppc/instructions/ppcInstr.sml
12081 +++ b/ppc/instructions/ppcInstr.sml
12083 signature PPCINSTR =
12085 structure C : PPCCELLS
12086 - structure CB : CELLS_BASIS = CellsBasis
12087 + structure CB : CELLS_BASIS (* = CellsBasis *)
12088 + where type CellSet.cellset = CellsBasis.CellSet.cellset
12089 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
12090 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
12091 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
12092 + and type cell = CellsBasis.cell
12093 + and type cellColor = CellsBasis.cellColor
12094 + and type cellkind = CellsBasis.cellkind
12095 + and type cellkindDesc = CellsBasis.cellkindDesc
12096 + and type cellkindInfo = CellsBasis.cellkindInfo
12097 structure T : MLTREE
12098 structure Constant: CONSTANT
12099 structure Region : REGION
12100 diff --git a/ppc/instructions/ppcProps.sml b/ppc/instructions/ppcProps.sml
12101 index d1dd455..ee9be9b 100644
12102 --- a/ppc/instructions/ppcProps.sml
12103 +++ b/ppc/instructions/ppcProps.sml
12107 ( structure PPCInstr : PPCINSTR
12108 - structure MLTreeEval : MLTREE_EVAL where T = PPCInstr.T
12109 - structure MLTreeHash : MLTREE_HASH where T = PPCInstr.T
12110 + structure MLTreeEval : MLTREE_EVAL (* where T = PPCInstr.T *)
12111 + where type T.Basis.cond = PPCInstr.T.Basis.cond
12112 + and type T.Basis.div_rounding_mode = PPCInstr.T.Basis.div_rounding_mode
12113 + and type T.Basis.ext = PPCInstr.T.Basis.ext
12114 + and type T.Basis.fcond = PPCInstr.T.Basis.fcond
12115 + and type T.Basis.rounding_mode = PPCInstr.T.Basis.rounding_mode
12116 + and type T.Constant.const = PPCInstr.T.Constant.const
12117 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) PPCInstr.T.Extension.ccx
12118 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) PPCInstr.T.Extension.fx
12119 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) PPCInstr.T.Extension.rx
12120 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) PPCInstr.T.Extension.sx
12121 + and type T.I.div_rounding_mode = PPCInstr.T.I.div_rounding_mode
12122 + and type T.Region.region = PPCInstr.T.Region.region
12123 + and type T.ccexp = PPCInstr.T.ccexp
12124 + and type T.fexp = PPCInstr.T.fexp
12125 + (* and type T.labexp = PPCInstr.T.labexp *)
12126 + and type T.mlrisc = PPCInstr.T.mlrisc
12127 + and type T.oper = PPCInstr.T.oper
12128 + and type T.rep = PPCInstr.T.rep
12129 + and type T.rexp = PPCInstr.T.rexp
12130 + and type T.stm = PPCInstr.T.stm
12131 + structure MLTreeHash : MLTREE_HASH (* where T = PPCInstr.T *)
12132 + where type T.Basis.cond = PPCInstr.T.Basis.cond
12133 + and type T.Basis.div_rounding_mode = PPCInstr.T.Basis.div_rounding_mode
12134 + and type T.Basis.ext = PPCInstr.T.Basis.ext
12135 + and type T.Basis.fcond = PPCInstr.T.Basis.fcond
12136 + and type T.Basis.rounding_mode = PPCInstr.T.Basis.rounding_mode
12137 + and type T.Constant.const = PPCInstr.T.Constant.const
12138 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) PPCInstr.T.Extension.ccx
12139 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) PPCInstr.T.Extension.fx
12140 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) PPCInstr.T.Extension.rx
12141 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) PPCInstr.T.Extension.sx
12142 + and type T.I.div_rounding_mode = PPCInstr.T.I.div_rounding_mode
12143 + and type T.Region.region = PPCInstr.T.Region.region
12144 + and type T.ccexp = PPCInstr.T.ccexp
12145 + and type T.fexp = PPCInstr.T.fexp
12146 + (* and type T.labexp = PPCInstr.T.labexp *)
12147 + and type T.mlrisc = PPCInstr.T.mlrisc
12148 + and type T.oper = PPCInstr.T.oper
12149 + and type T.rep = PPCInstr.T.rep
12150 + and type T.rexp = PPCInstr.T.rexp
12151 + and type T.stm = PPCInstr.T.stm
12152 ) : INSN_PROPERTIES =
12154 structure I = PPCInstr
12155 diff --git a/ppc/mltree/ppc.sml b/ppc/mltree/ppc.sml
12156 index 94d81f6..a749c02 100644
12157 --- a/ppc/mltree/ppc.sml
12158 +++ b/ppc/mltree/ppc.sml
12159 @@ -10,10 +10,76 @@
12162 (structure PPCInstr : PPCINSTR
12163 - structure PseudoInstrs : PPC_PSEUDO_INSTR
12164 - where I = PPCInstr
12165 - structure ExtensionComp : MLTREE_EXTENSION_COMP
12166 - where I = PPCInstr and T = PPCInstr.T
12167 + structure PseudoInstrs : PPC_PSEUDO_INSTR (* where I = PPCInstr *)
12168 + where type I.Constant.const = PPCInstr.Constant.const
12169 + and type I.Region.region = PPCInstr.Region.region
12170 + and type I.T.Basis.cond = PPCInstr.T.Basis.cond
12171 + and type I.T.Basis.div_rounding_mode = PPCInstr.T.Basis.div_rounding_mode
12172 + and type I.T.Basis.ext = PPCInstr.T.Basis.ext
12173 + and type I.T.Basis.fcond = PPCInstr.T.Basis.fcond
12174 + and type I.T.Basis.rounding_mode = PPCInstr.T.Basis.rounding_mode
12175 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) PPCInstr.T.Extension.ccx
12176 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) PPCInstr.T.Extension.fx
12177 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) PPCInstr.T.Extension.rx
12178 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) PPCInstr.T.Extension.sx
12179 + and type I.T.I.div_rounding_mode = PPCInstr.T.I.div_rounding_mode
12180 + and type I.T.ccexp = PPCInstr.T.ccexp
12181 + and type I.T.fexp = PPCInstr.T.fexp
12182 + (* and type I.T.labexp = PPCInstr.T.labexp *)
12183 + and type I.T.mlrisc = PPCInstr.T.mlrisc
12184 + and type I.T.oper = PPCInstr.T.oper
12185 + and type I.T.rep = PPCInstr.T.rep
12186 + and type I.T.rexp = PPCInstr.T.rexp
12187 + and type I.T.stm = PPCInstr.T.stm
12188 + and type I.arith = PPCInstr.arith
12189 + and type I.arithi = PPCInstr.arithi
12190 + and type I.bit = PPCInstr.bit
12191 + and type I.bo = PPCInstr.bo
12192 + and type I.ccarith = PPCInstr.ccarith
12193 + and type I.cmp = PPCInstr.cmp
12194 + and type I.ea = PPCInstr.ea
12195 + and type I.farith = PPCInstr.farith
12196 + and type I.farith3 = PPCInstr.farith3
12197 + and type I.fcmp = PPCInstr.fcmp
12198 + and type I.fload = PPCInstr.fload
12199 + and type I.fstore = PPCInstr.fstore
12200 + and type I.funary = PPCInstr.funary
12201 + and type I.instr = PPCInstr.instr
12202 + and type I.instruction = PPCInstr.instruction
12203 + and type I.load = PPCInstr.load
12204 + and type I.operand = PPCInstr.operand
12205 + and type I.rotate = PPCInstr.rotate
12206 + and type I.rotatei = PPCInstr.rotatei
12207 + and type I.spr = PPCInstr.spr
12208 + and type I.store = PPCInstr.store
12209 + and type I.unary = PPCInstr.unary
12210 + and type I.xerbit = PPCInstr.xerbit
12211 + structure ExtensionComp : MLTREE_EXTENSION_COMP (* where I = PPCInstr and T = PPCInstr.T *)
12212 + where type I.addressing_mode = PPCInstr.addressing_mode
12213 + and type I.ea = PPCInstr.ea
12214 + and type I.instr = PPCInstr.instr
12215 + and type I.instruction = PPCInstr.instruction
12216 + and type I.operand = PPCInstr.operand
12217 + where type T.Basis.cond = PPCInstr.T.Basis.cond
12218 + and type T.Basis.div_rounding_mode = PPCInstr.T.Basis.div_rounding_mode
12219 + and type T.Basis.ext = PPCInstr.T.Basis.ext
12220 + and type T.Basis.fcond = PPCInstr.T.Basis.fcond
12221 + and type T.Basis.rounding_mode = PPCInstr.T.Basis.rounding_mode
12222 + and type T.Constant.const = PPCInstr.T.Constant.const
12223 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) PPCInstr.T.Extension.ccx
12224 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) PPCInstr.T.Extension.fx
12225 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) PPCInstr.T.Extension.rx
12226 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) PPCInstr.T.Extension.sx
12227 + and type T.I.div_rounding_mode = PPCInstr.T.I.div_rounding_mode
12228 + and type T.Region.region = PPCInstr.T.Region.region
12229 + and type T.ccexp = PPCInstr.T.ccexp
12230 + and type T.fexp = PPCInstr.T.fexp
12231 + (* and type T.labexp = PPCInstr.T.labexp *)
12232 + and type T.mlrisc = PPCInstr.T.mlrisc
12233 + and type T.oper = PPCInstr.T.oper
12234 + and type T.rep = PPCInstr.T.rep
12235 + and type T.rexp = PPCInstr.T.rexp
12236 + and type T.stm = PPCInstr.T.stm
12239 * Support 64 bit mode?
12240 @@ -71,7 +137,7 @@ struct
12242 * Integer multiplication
12244 - functor Multiply32 = MLTreeMult
12245 + structure Mulu32 = MLTreeMult
12248 structure CB = CellsBasis
12249 @@ -84,40 +150,64 @@ struct
12250 fun slli{r,i,d} = [I.INSTR(SLLI32{r=r,i=i,d=d})]
12251 fun srli{r,i,d} = [I.INSTR(SRLI32{r=r,i=i,d=d})]
12252 fun srai{r,i,d} = [I.arithi{oper=I.SRAWI,rt=d,ra=r,im=I.ImmedOp i}]
12255 - structure Mulu32 = Multiply32
12256 - (val trapping = false
12257 + val trapping = false
12258 val multCost = multCost
12259 fun addv{r1,r2,d}=[I.arith{oper=I.ADD,ra=r1,rb=r2,rt=d,Rc=false,OE=false}]
12260 fun subv{r1,r2,d}=[I.arith{oper=I.SUBF,ra=r2,rb=r1,rt=d,Rc=false,OE=false}]
12265 - (val signed = false)
12267 - structure Muls32 = Multiply32
12268 - (val trapping = false
12269 + val signed = false)
12271 + structure Muls32 = MLTreeMult
12274 + structure CB = CellsBasis
12276 + type arg = {r1:CB.cell,r2:CB.cell,d:CB.cell}
12277 + type argi = {r:CB.cell,i:int,d:CB.cell}
12279 + fun mov{r,d} = COPY{dst=[d],src=[r],tmp=NONE}
12280 + fun add{r1,r2,d}= I.arith{oper=I.ADD,ra=r1,rb=r2,rt=d,Rc=false,OE=false}
12281 + fun slli{r,i,d} = [I.INSTR(SLLI32{r=r,i=i,d=d})]
12282 + fun srli{r,i,d} = [I.INSTR(SRLI32{r=r,i=i,d=d})]
12283 + fun srai{r,i,d} = [I.arithi{oper=I.SRAWI,rt=d,ra=r,im=I.ImmedOp i}]
12285 + val trapping = false
12286 val multCost = multCost
12287 fun addv{r1,r2,d}=[I.arith{oper=I.ADD,ra=r1,rb=r2,rt=d,Rc=false,OE=false}]
12288 fun subv{r1,r2,d}=[I.arith{oper=I.SUBF,ra=r2,rb=r1,rt=d,Rc=false,OE=false}]
12293 - (val signed = true)
12295 - structure Mult32 = Multiply32
12296 - (val trapping = true
12297 + val signed = true)
12299 + structure Mult32 = MLTreeMult
12302 + structure CB = CellsBasis
12304 + type arg = {r1:CB.cell,r2:CB.cell,d:CB.cell}
12305 + type argi = {r:CB.cell,i:int,d:CB.cell}
12307 + fun mov{r,d} = COPY{dst=[d],src=[r],tmp=NONE}
12308 + fun add{r1,r2,d}= I.arith{oper=I.ADD,ra=r1,rb=r2,rt=d,Rc=false,OE=false}
12309 + fun slli{r,i,d} = [I.INSTR(SLLI32{r=r,i=i,d=d})]
12310 + fun srli{r,i,d} = [I.INSTR(SRLI32{r=r,i=i,d=d})]
12311 + fun srai{r,i,d} = [I.arithi{oper=I.SRAWI,rt=d,ra=r,im=I.ImmedOp i}]
12313 + val trapping = true
12314 val multCost = multCost
12315 fun addv{r1,r2,d} = error "Mult32.addv"
12316 fun subv{r1,r2,d} = error "Mult32.subv"
12321 - (val signed = true)
12323 + val signed = true)
12325 fun selectInstructions
12327 diff --git a/ra/arch-spill-instr.sig b/ra/arch-spill-instr.sig
12328 index b91475f..a76c52c 100644
12329 --- a/ra/arch-spill-instr.sig
12330 +++ b/ra/arch-spill-instr.sig
12333 signature ARCH_SPILL_INSTR = sig
12334 structure I : INSTRUCTIONS
12335 - structure CB : CELLS_BASIS = CellsBasis
12336 + structure CB : CELLS_BASIS (* = CellsBasis *)
12337 + where type CellSet.cellset = CellsBasis.CellSet.cellset
12338 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
12339 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
12340 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
12341 + and type cell = CellsBasis.cell
12342 + and type cellColor = CellsBasis.cellColor
12343 + and type cellkind = CellsBasis.cellkind
12344 + and type cellkindDesc = CellsBasis.cellkindDesc
12345 + and type cellkindInfo = CellsBasis.cellkindInfo
12349 diff --git a/ra/cluster-ra.sml b/ra/cluster-ra.sml
12350 index 129fe40..edef1e1 100644
12351 --- a/ra/cluster-ra.sml
12352 +++ b/ra/cluster-ra.sml
12353 @@ -14,13 +14,45 @@
12356 (structure Asm : INSTRUCTION_EMITTER
12357 - structure Flowgraph : CONTROL_FLOW_GRAPH
12360 - structure InsnProps : INSN_PROPERTIES
12361 - where I = Flowgraph.I
12362 - structure Spill : RA_SPILL
12363 - where I = Flowgraph.I
12364 + structure Flowgraph : CONTROL_FLOW_GRAPH (* where I = Asm.I and P = Asm.S.P *)
12365 + where type I.addressing_mode = Asm.I.addressing_mode
12366 + and type I.ea = Asm.I.ea
12367 + and type I.instr = Asm.I.instr
12368 + and type I.instruction = Asm.I.instruction
12369 + and type I.operand = Asm.I.operand
12370 + where type P.Client.pseudo_op = Asm.S.P.Client.pseudo_op
12371 + and type P.T.Basis.cond = Asm.S.P.T.Basis.cond
12372 + and type P.T.Basis.div_rounding_mode = Asm.S.P.T.Basis.div_rounding_mode
12373 + and type P.T.Basis.ext = Asm.S.P.T.Basis.ext
12374 + and type P.T.Basis.fcond = Asm.S.P.T.Basis.fcond
12375 + and type P.T.Basis.rounding_mode = Asm.S.P.T.Basis.rounding_mode
12376 + and type P.T.Constant.const = Asm.S.P.T.Constant.const
12377 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Asm.S.P.T.Extension.ccx
12378 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Asm.S.P.T.Extension.fx
12379 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Asm.S.P.T.Extension.rx
12380 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Asm.S.P.T.Extension.sx
12381 + and type P.T.I.div_rounding_mode = Asm.S.P.T.I.div_rounding_mode
12382 + and type P.T.Region.region = Asm.S.P.T.Region.region
12383 + and type P.T.ccexp = Asm.S.P.T.ccexp
12384 + and type P.T.fexp = Asm.S.P.T.fexp
12385 + (* and type P.T.labexp = Asm.S.P.T.labexp *)
12386 + and type P.T.mlrisc = Asm.S.P.T.mlrisc
12387 + and type P.T.oper = Asm.S.P.T.oper
12388 + and type P.T.rep = Asm.S.P.T.rep
12389 + and type P.T.rexp = Asm.S.P.T.rexp
12390 + and type P.T.stm = Asm.S.P.T.stm
12391 + structure InsnProps : INSN_PROPERTIES (* where I = Flowgraph.I *)
12392 + where type I.addressing_mode = Flowgraph.I.addressing_mode
12393 + and type I.ea = Flowgraph.I.ea
12394 + and type I.instr = Flowgraph.I.instr
12395 + and type I.instruction = Flowgraph.I.instruction
12396 + and type I.operand = Flowgraph.I.operand
12397 + structure Spill : RA_SPILL (* where I = Flowgraph.I *)
12398 + where type I.addressing_mode = Flowgraph.I.addressing_mode
12399 + and type I.ea = Flowgraph.I.ea
12400 + and type I.instr = Flowgraph.I.instr
12401 + and type I.instruction = Flowgraph.I.instruction
12402 + and type I.operand = Flowgraph.I.operand
12405 structure CFG = Flowgraph
12406 diff --git a/ra/ra-core.sig b/ra/ra-core.sig
12407 index 3127769..1cecd17 100644
12408 --- a/ra/ra-core.sig
12409 +++ b/ra/ra-core.sig
12411 signature RA_CORE =
12414 - structure G : RA_GRAPH = RAGraph
12415 + structure G : RA_GRAPH (* = RAGraph *)
12416 + where type C.CellSet.cellset = RAGraph.C.CellSet.cellset
12417 + and type 'a C.ColorTable.hash_table = 'a RAGraph.C.ColorTable.hash_table
12418 + and type 'a C.HashTable.hash_table = 'a RAGraph.C.HashTable.hash_table
12419 + and type C.SortedCells.sorted_cells = RAGraph.C.SortedCells.sorted_cells
12420 + and type C.cell = RAGraph.C.cell
12421 + and type C.cellColor = RAGraph.C.cellColor
12422 + and type C.cellkind = RAGraph.C.cellkind
12423 + and type C.cellkindDesc = RAGraph.C.cellkindDesc
12424 + and type C.cellkindInfo = RAGraph.C.cellkindInfo
12425 + and type 'a PPtHashTable.hash_table = 'a RAGraph.PPtHashTable.hash_table
12426 + and type 'a SpillLocHashTable.hash_table = 'a RAGraph.SpillLocHashTable.hash_table
12427 + and type interferenceGraph = RAGraph.interferenceGraph
12428 + and type move = RAGraph.move
12429 + and type moveKind = RAGraph.moveKind
12430 + and type moveStatus = RAGraph.moveStatus
12431 + and type node = RAGraph.node
12432 + and type nodeStatus = RAGraph.nodeStatus
12433 + and type spillLoc = RAGraph.spillLoc
12434 + and type trailInfo = RAGraph.trailInfo
12435 structure BM : RA_BITMATRIX
12436 structure MV : RA_PRIORITY_QUEUE where type elem = G.move
12437 structure FZ : RA_PRIORITY_QUEUE where type elem = G.node
12438 diff --git a/ra/ra-deadCodeE.sml b/ra/ra-deadCodeE.sml
12439 index 8f05f89..a7bb8c8 100644
12440 --- a/ra/ra-deadCodeE.sml
12441 +++ b/ra/ra-deadCodeE.sml
12446 -functor RADeadCodeElim
12447 - (Flowgraph : RA_FLOWGRAPH)
12448 - ( (* check for dead code on these cellkinds only *)
12449 +functor RADeadCodeElim (
12450 + structure Flowgraph : RA_FLOWGRAPH
12451 + (* check for dead code on these cellkinds only *)
12452 val cellkind : CellsBasis.cellkind -> bool
12453 (* Dead registers are stored here. *)
12454 val deadRegs : bool IntHashTable.hash_table
12455 diff --git a/ra/ra-flowgraph.sig b/ra/ra-flowgraph.sig
12456 index 6837166..d7b6981 100644
12457 --- a/ra/ra-flowgraph.sig
12458 +++ b/ra/ra-flowgraph.sig
12459 @@ -12,10 +12,34 @@ sig
12461 structure I : INSTRUCTIONS
12462 structure C : CELLS
12463 - structure G : RA_GRAPH = RAGraph
12464 + structure G : RA_GRAPH (* = RAGraph *)
12465 + where type C.CellSet.cellset = RAGraph.C.CellSet.cellset
12466 + and type 'a C.ColorTable.hash_table = 'a RAGraph.C.ColorTable.hash_table
12467 + and type 'a C.HashTable.hash_table = 'a RAGraph.C.HashTable.hash_table
12468 + and type C.SortedCells.sorted_cells = RAGraph.C.SortedCells.sorted_cells
12469 + and type C.cell = RAGraph.C.cell
12470 + and type C.cellColor = RAGraph.C.cellColor
12471 + and type C.cellkind = RAGraph.C.cellkind
12472 + and type C.cellkindDesc = RAGraph.C.cellkindDesc
12473 + and type C.cellkindInfo = RAGraph.C.cellkindInfo
12474 + and type 'a PPtHashTable.hash_table = 'a RAGraph.PPtHashTable.hash_table
12475 + and type 'a SpillLocHashTable.hash_table = 'a RAGraph.SpillLocHashTable.hash_table
12476 + and type interferenceGraph = RAGraph.interferenceGraph
12477 + and type move = RAGraph.move
12478 + and type moveKind = RAGraph.moveKind
12479 + and type moveStatus = RAGraph.moveStatus
12480 + and type node = RAGraph.node
12481 + and type nodeStatus = RAGraph.nodeStatus
12482 + and type spillLoc = RAGraph.spillLoc
12483 + and type trailInfo = RAGraph.trailInfo
12484 structure Spill : RA_SPILL
12485 - sharing Spill.I = I
12487 + (* sharing Spill.I = I *)
12488 + where type I.addressing_mode = I.addressing_mode
12489 + and type I.ea = I.ea
12490 + and type I.instr = I.instr
12491 + and type I.instruction = I.instruction
12492 + and type I.operand = I.operand
12493 + (* sharing I.C = C *)
12497 diff --git a/ra/ra-graph.sig b/ra/ra-graph.sig
12498 index 67f7d89..db2435b 100644
12499 --- a/ra/ra-graph.sig
12500 +++ b/ra/ra-graph.sig
12501 @@ -11,7 +11,10 @@ signature RA_GRAPH =
12504 structure C : CELLS_BASIS
12505 - structure BM : RA_BITMATRIX = RaBitmatrix
12506 + structure BM : RA_BITMATRIX (* = RaBitmatrix *)
12507 + where type bitMatrix = RaBitmatrix.bitMatrix
12508 + and type bucket = RaBitmatrix.bucket
12509 + and type hashTable = RaBitmatrix.hashTable
12511 * The following are the data structures used in the register allocator.
12513 diff --git a/ra/ra-spill-with-renaming.sml b/ra/ra-spill-with-renaming.sml
12514 index d5d2b8b..ba4dff1 100644
12515 --- a/ra/ra-spill-with-renaming.sml
12516 +++ b/ra/ra-spill-with-renaming.sml
12517 @@ -79,16 +79,14 @@
12523 - val debug = false
12527 functor RASpillWithRenaming
12528 (structure InsnProps : INSN_PROPERTIES
12529 - structure Asm : INSTRUCTION_EMITTER
12530 - where I = InsnProps.I
12531 + structure Asm : INSTRUCTION_EMITTER (* where I = InsnProps.I *)
12532 + where type I.addressing_mode = InsnProps.I.addressing_mode
12533 + and type I.ea = InsnProps.I.ea
12534 + and type I.instr = InsnProps.I.instr
12535 + and type I.instruction = InsnProps.I.instruction
12536 + and type I.operand = InsnProps.I.operand
12538 (* Spilling a variable v creates tiny live-ranges at all its definitions
12539 * and uses. The following parameter is the maximal distance of
12540 @@ -107,6 +105,7 @@ functor RASpillWithRenaming
12541 val keep_multiple_values : bool ref
12544 + val debug = false
12546 structure I = InsnProps.I
12547 structure P = InsnProps
12548 @@ -584,5 +583,3 @@ struct
12554 diff --git a/ra/ra-spill.sig b/ra/ra-spill.sig
12555 index 2d19e00..39279de 100644
12556 --- a/ra/ra-spill.sig
12557 +++ b/ra/ra-spill.sig
12558 @@ -7,11 +7,39 @@ signature RA_SPILL =
12561 structure I : INSTRUCTIONS
12562 - structure G : RA_GRAPH = RAGraph
12563 + structure G : RA_GRAPH (* = RAGraph *)
12564 + where type C.CellSet.cellset = RAGraph.C.CellSet.cellset
12565 + and type 'a C.ColorTable.hash_table = 'a RAGraph.C.ColorTable.hash_table
12566 + and type 'a C.HashTable.hash_table = 'a RAGraph.C.HashTable.hash_table
12567 + and type C.SortedCells.sorted_cells = RAGraph.C.SortedCells.sorted_cells
12568 + and type C.cell = RAGraph.C.cell
12569 + and type C.cellColor = RAGraph.C.cellColor
12570 + and type C.cellkind = RAGraph.C.cellkind
12571 + and type C.cellkindDesc = RAGraph.C.cellkindDesc
12572 + and type C.cellkindInfo = RAGraph.C.cellkindInfo
12573 + and type 'a PPtHashTable.hash_table = 'a RAGraph.PPtHashTable.hash_table
12574 + and type 'a SpillLocHashTable.hash_table = 'a RAGraph.SpillLocHashTable.hash_table
12575 + and type interferenceGraph = RAGraph.interferenceGraph
12576 + and type move = RAGraph.move
12577 + and type moveKind = RAGraph.moveKind
12578 + and type moveStatus = RAGraph.moveStatus
12579 + and type node = RAGraph.node
12580 + and type nodeStatus = RAGraph.nodeStatus
12581 + and type spillLoc = RAGraph.spillLoc
12582 + and type trailInfo = RAGraph.trailInfo
12583 structure C : CELLS
12585 + (* sharing I.C = C *)
12587 - structure CB : CELLS_BASIS = CellsBasis
12588 + structure CB : CELLS_BASIS (* = CellsBasis *)
12589 + where type CellSet.cellset = CellsBasis.CellSet.cellset
12590 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
12591 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
12592 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
12593 + and type cell = CellsBasis.cell
12594 + and type cellColor = CellsBasis.cellColor
12595 + and type cellkind = CellsBasis.cellkind
12596 + and type cellkindDesc = CellsBasis.cellkindDesc
12597 + and type cellkindInfo = CellsBasis.cellkindInfo
12599 (CB.cell list * CB.cell list) * I.instruction -> I.instruction list
12601 diff --git a/ra/ra-spill.sml b/ra/ra-spill.sml
12602 index d89a67a..8df619e 100644
12603 --- a/ra/ra-spill.sml
12604 +++ b/ra/ra-spill.sml
12605 @@ -48,18 +48,17 @@
12611 - val debug = false
12616 (structure InsnProps : INSN_PROPERTIES
12617 - structure Asm : INSTRUCTION_EMITTER
12618 - where I = InsnProps.I
12619 + structure Asm : INSTRUCTION_EMITTER (* where I = InsnProps.I *)
12620 + where type I.addressing_mode = InsnProps.I.addressing_mode
12621 + and type I.ea = InsnProps.I.ea
12622 + and type I.instr = InsnProps.I.instr
12623 + and type I.instruction = InsnProps.I.instruction
12624 + and type I.operand = InsnProps.I.operand
12627 + val debug = false
12629 structure I = InsnProps.I
12630 structure P = InsnProps
12631 @@ -451,5 +450,3 @@ struct
12637 diff --git a/ra/ra-spillheur.sig b/ra/ra-spillheur.sig
12638 index 50f0224..77aeeb5 100644
12639 --- a/ra/ra-spillheur.sig
12640 +++ b/ra/ra-spillheur.sig
12643 signature RA_SPILL_HEURISTICS =
12645 - structure G : RA_GRAPH = RAGraph
12646 + structure G : RA_GRAPH (* = RAGraph *)
12647 + where type C.CellSet.cellset = RAGraph.C.CellSet.cellset
12648 + and type 'a C.ColorTable.hash_table = 'a RAGraph.C.ColorTable.hash_table
12649 + and type 'a C.HashTable.hash_table = 'a RAGraph.C.HashTable.hash_table
12650 + and type C.SortedCells.sorted_cells = RAGraph.C.SortedCells.sorted_cells
12651 + and type C.cell = RAGraph.C.cell
12652 + and type C.cellColor = RAGraph.C.cellColor
12653 + and type C.cellkind = RAGraph.C.cellkind
12654 + and type C.cellkindDesc = RAGraph.C.cellkindDesc
12655 + and type C.cellkindInfo = RAGraph.C.cellkindInfo
12656 + and type 'a PPtHashTable.hash_table = 'a RAGraph.PPtHashTable.hash_table
12657 + and type 'a SpillLocHashTable.hash_table = 'a RAGraph.SpillLocHashTable.hash_table
12658 + and type interferenceGraph = RAGraph.interferenceGraph
12659 + and type move = RAGraph.move
12660 + and type moveKind = RAGraph.moveKind
12661 + and type moveStatus = RAGraph.moveStatus
12662 + and type node = RAGraph.node
12663 + and type nodeStatus = RAGraph.nodeStatus
12664 + and type spillLoc = RAGraph.spillLoc
12665 + and type trailInfo = RAGraph.trailInfo
12667 exception NoCandidate
12669 diff --git a/ra/ra.sig b/ra/ra.sig
12670 index 7fdacac..549c5a4 100644
12673 @@ -9,9 +9,23 @@ sig
12674 structure I : INSTRUCTIONS
12675 structure C : CELLS
12676 structure F : RA_FLOWGRAPH
12679 - structure CB : CELLS_BASIS = CellsBasis
12680 + (* sharing F.I = I *)
12681 + where type I.addressing_mode = I.addressing_mode
12682 + and type I.ea = I.ea
12683 + and type I.instr = I.instr
12684 + and type I.instruction = I.instruction
12685 + and type I.operand = I.operand
12686 + (* sharing I.C = C *)
12687 + structure CB : CELLS_BASIS (* = CellsBasis *)
12688 + where type CellSet.cellset = CellsBasis.CellSet.cellset
12689 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
12690 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
12691 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
12692 + and type cell = CellsBasis.cell
12693 + and type cellColor = CellsBasis.cellColor
12694 + and type cellkind = CellsBasis.cellkind
12695 + and type cellkindDesc = CellsBasis.cellkindDesc
12696 + and type cellkindInfo = CellsBasis.cellkindInfo
12698 type getreg = { pref : CB.cell_id list,
12700 diff --git a/ra/ra.sml b/ra/ra.sml
12701 index 388f0b2..bf66604 100644
12705 * -- Allen Leung (leunga@cs.nyu.edu)
12708 -functor RegisterAllocator
12709 - (SpillHeuristics : RA_SPILL_HEURISTICS)
12710 - (Flowgraph : RA_FLOWGRAPH where C = CellsBasis) : RA =
12711 +functor RegisterAllocator (
12712 + structure SpillHeuristics : RA_SPILL_HEURISTICS
12713 + structure Flowgraph : RA_FLOWGRAPH (* where C = CellsBasis *)
12717 structure F = Flowgraph
12718 diff --git a/ra/region-based-ra.sml b/ra/region-based-ra.sml
12719 index 7166945..e31e981 100644
12720 --- a/ra/region-based-ra.sml
12721 +++ b/ra/region-based-ra.sml
12723 * it into manageable pieces to be allocated.
12725 functor RegionBasedRA
12727 - (FlowgraphPartitioner : RA_FLOWGRAPH_PARTITIONER
12728 + (structure RA : RA
12729 + structure FlowgraphPartitioner : RA_FLOWGRAPH_PARTITIONER
12730 where type flowgraph = RA.F.flowgraph
12732 + (* where C = RA.C *)
12736 diff --git a/ra/risc-ra.sml b/ra/risc-ra.sml
12737 index d5d2ec3..b965871 100644
12738 --- a/ra/risc-ra.sml
12739 +++ b/ra/risc-ra.sml
12743 (structure I : INSTRUCTIONS
12744 - structure Asm : INSTRUCTION_EMITTER
12746 - structure CFG : CONTROL_FLOW_GRAPH
12749 - structure InsnProps : INSN_PROPERTIES
12751 - structure Rewrite : REWRITE_INSTRUCTIONS
12753 - structure SpillInstr : ARCH_SPILL_INSTR
12755 + structure Asm : INSTRUCTION_EMITTER (* where I = I *)
12756 + where type I.addressing_mode = I.addressing_mode
12757 + and type I.ea = I.ea
12758 + and type I.instr = I.instr
12759 + and type I.instruction = I.instruction
12760 + and type I.operand = I.operand
12761 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = Asm.S.P *)
12762 + where type I.addressing_mode = I.addressing_mode
12763 + and type I.ea = I.ea
12764 + and type I.instr = I.instr
12765 + and type I.instruction = I.instruction
12766 + and type I.operand = I.operand
12767 + where type P.Client.pseudo_op = Asm.S.P.Client.pseudo_op
12768 + and type P.T.Basis.cond = Asm.S.P.T.Basis.cond
12769 + and type P.T.Basis.div_rounding_mode = Asm.S.P.T.Basis.div_rounding_mode
12770 + and type P.T.Basis.ext = Asm.S.P.T.Basis.ext
12771 + and type P.T.Basis.fcond = Asm.S.P.T.Basis.fcond
12772 + and type P.T.Basis.rounding_mode = Asm.S.P.T.Basis.rounding_mode
12773 + and type P.T.Constant.const = Asm.S.P.T.Constant.const
12774 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) Asm.S.P.T.Extension.ccx
12775 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) Asm.S.P.T.Extension.fx
12776 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) Asm.S.P.T.Extension.rx
12777 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) Asm.S.P.T.Extension.sx
12778 + and type P.T.I.div_rounding_mode = Asm.S.P.T.I.div_rounding_mode
12779 + and type P.T.Region.region = Asm.S.P.T.Region.region
12780 + and type P.T.ccexp = Asm.S.P.T.ccexp
12781 + and type P.T.fexp = Asm.S.P.T.fexp
12782 + (* and type P.T.labexp = Asm.S.P.T.labexp *)
12783 + and type P.T.mlrisc = Asm.S.P.T.mlrisc
12784 + and type P.T.oper = Asm.S.P.T.oper
12785 + and type P.T.rep = Asm.S.P.T.rep
12786 + and type P.T.rexp = Asm.S.P.T.rexp
12787 + and type P.T.stm = Asm.S.P.T.stm
12788 + structure InsnProps : INSN_PROPERTIES (* where I = I *)
12789 + where type I.addressing_mode = I.addressing_mode
12790 + and type I.ea = I.ea
12791 + and type I.instr = I.instr
12792 + and type I.instruction = I.instruction
12793 + and type I.operand = I.operand
12794 + structure Rewrite : REWRITE_INSTRUCTIONS (* where I = I *)
12795 + where type I.addressing_mode = I.addressing_mode
12796 + and type I.ea = I.ea
12797 + and type I.instr = I.instr
12798 + and type I.instruction = I.instruction
12799 + and type I.operand = I.operand
12800 + structure SpillInstr : ARCH_SPILL_INSTR (* where I = I *)
12801 + where type I.addressing_mode = I.addressing_mode
12802 + and type I.ea = I.ea
12803 + and type I.instr = I.instr
12804 + and type I.instruction = I.instruction
12805 + and type I.operand = I.operand
12807 (* Spilling heuristics determines which node should be spilled.
12808 * You can use Chaitin, ChowHenessey, or one of your own.
12809 @@ -26,7 +66,12 @@ functor RISC_RA
12810 * spill code. You can use RASpill, or RASpillWithRenaming,
12811 * or write your own if you are feeling adventurous.
12813 - structure Spill : RA_SPILL where I = I
12814 + structure Spill : RA_SPILL (* where I = I *)
12815 + where type I.addressing_mode = I.addressing_mode
12816 + and type I.ea = I.ea
12817 + and type I.instr = I.instr
12818 + and type I.instruction = I.instruction
12819 + and type I.operand = I.operand
12821 val architecture : string
12823 @@ -85,9 +130,9 @@ struct
12824 (* The generic register allocator *)
12828 + (structure SpillHeuristics = SpillHeur
12829 (* (ChowHennessySpillHeur) *)
12831 + structure Flowgraph = ClusterRA
12832 (structure Flowgraph = CFG
12833 structure Asm = Asm
12834 structure InsnProps = InsnProps
12835 diff --git a/sparc/backpatch/sparcDelaySlotProps.sml b/sparc/backpatch/sparcDelaySlotProps.sml
12836 index e552cd8..26c9691 100644
12837 --- a/sparc/backpatch/sparcDelaySlotProps.sml
12838 +++ b/sparc/backpatch/sparcDelaySlotProps.sml
12840 functor SparcDelaySlots
12841 (structure I : SPARCINSTR
12842 - structure P : INSN_PROPERTIES where I = I
12843 + structure P : INSN_PROPERTIES (* where I = I *)
12844 + where type I.addressing_mode = I.addressing_mode
12845 + and type I.ea = I.ea
12846 + and type I.instr = I.instr
12847 + and type I.instruction = I.instruction
12848 + and type I.operand = I.operand
12849 (* sharing/defn conflict: sharing P.I = I*)
12850 ) : DELAY_SLOT_PROPERTIES =
12852 diff --git a/sparc/backpatch/sparcJumps.sml b/sparc/backpatch/sparcJumps.sml
12853 index 43763bd..95e3c31 100644
12854 --- a/sparc/backpatch/sparcJumps.sml
12855 +++ b/sparc/backpatch/sparcJumps.sml
12859 (structure Instr:SPARCINSTR
12860 - structure Shuffle:SPARCSHUFFLE where I = Instr
12861 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
12862 + structure Shuffle:SPARCSHUFFLE (* where I = Instr *)
12863 + where type I.Constant.const = Instr.Constant.const
12864 + and type I.Region.region = Instr.Region.region
12865 + and type I.T.Basis.cond = Instr.T.Basis.cond
12866 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
12867 + and type I.T.Basis.ext = Instr.T.Basis.ext
12868 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
12869 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
12870 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
12871 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
12872 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
12873 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
12874 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
12875 + and type I.T.ccexp = Instr.T.ccexp
12876 + and type I.T.fexp = Instr.T.fexp
12877 + (* and type I.T.labexp = Instr.T.labexp *)
12878 + and type I.T.mlrisc = Instr.T.mlrisc
12879 + and type I.T.oper = Instr.T.oper
12880 + and type I.T.rep = Instr.T.rep
12881 + and type I.T.rexp = Instr.T.rexp
12882 + and type I.T.stm = Instr.T.stm
12883 + and type I.arith = Instr.arith
12884 + and type I.branch = Instr.branch
12885 + and type I.cc = Instr.cc
12886 + and type I.ea = Instr.ea
12887 + and type I.farith1 = Instr.farith1
12888 + and type I.farith2 = Instr.farith2
12889 + and type I.fbranch = Instr.fbranch
12890 + and type I.fcmp = Instr.fcmp
12891 + and type I.fload = Instr.fload
12892 + and type I.fsize = Instr.fsize
12893 + and type I.fstore = Instr.fstore
12894 + and type I.instr = Instr.instr
12895 + and type I.instruction = Instr.instruction
12896 + and type I.load = Instr.load
12897 + and type I.operand = Instr.operand
12898 + and type I.prediction = Instr.prediction
12899 + and type I.rcond = Instr.rcond
12900 + and type I.shift = Instr.shift
12901 + and type I.store = Instr.store
12902 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
12903 + where type T.Basis.cond = Instr.T.Basis.cond
12904 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
12905 + and type T.Basis.ext = Instr.T.Basis.ext
12906 + and type T.Basis.fcond = Instr.T.Basis.fcond
12907 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
12908 + and type T.Constant.const = Instr.T.Constant.const
12909 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
12910 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
12911 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
12912 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
12913 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
12914 + and type T.Region.region = Instr.T.Region.region
12915 + and type T.ccexp = Instr.T.ccexp
12916 + and type T.fexp = Instr.T.fexp
12917 + (* and type T.labexp = Instr.T.labexp *)
12918 + and type T.mlrisc = Instr.T.mlrisc
12919 + and type T.oper = Instr.T.oper
12920 + and type T.rep = Instr.T.rep
12921 + and type T.rexp = Instr.T.rexp
12922 + and type T.stm = Instr.T.stm
12925 structure I = Instr
12926 diff --git a/sparc/emit/sparcAsm.sml b/sparc/emit/sparcAsm.sml
12927 index 510b7bb..3c29ded 100644
12928 --- a/sparc/emit/sparcAsm.sml
12929 +++ b/sparc/emit/sparcAsm.sml
12933 functor SparcAsmEmitter(structure S : INSTRUCTION_STREAM
12934 - structure Instr : SPARCINSTR
12936 - structure Shuffle : SPARCSHUFFLE
12938 - structure MLTreeEval : MLTREE_EVAL
12939 - where T = Instr.T
12940 + structure Instr : SPARCINSTR (* where T = S.P.T *)
12941 + where type T.Basis.cond = S.P.T.Basis.cond
12942 + and type T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
12943 + and type T.Basis.ext = S.P.T.Basis.ext
12944 + and type T.Basis.fcond = S.P.T.Basis.fcond
12945 + and type T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
12946 + and type T.Constant.const = S.P.T.Constant.const
12947 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
12948 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
12949 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
12950 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
12951 + and type T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
12952 + and type T.Region.region = S.P.T.Region.region
12953 + and type T.ccexp = S.P.T.ccexp
12954 + and type T.fexp = S.P.T.fexp
12955 + (* and type T.labexp = S.P.T.labexp *)
12956 + and type T.mlrisc = S.P.T.mlrisc
12957 + and type T.oper = S.P.T.oper
12958 + and type T.rep = S.P.T.rep
12959 + and type T.rexp = S.P.T.rexp
12960 + and type T.stm = S.P.T.stm
12961 + structure Shuffle : SPARCSHUFFLE (* where I = Instr *)
12962 + where type I.Constant.const = Instr.Constant.const
12963 + and type I.Region.region = Instr.Region.region
12964 + and type I.T.Basis.cond = Instr.T.Basis.cond
12965 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
12966 + and type I.T.Basis.ext = Instr.T.Basis.ext
12967 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
12968 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
12969 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
12970 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
12971 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
12972 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
12973 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
12974 + and type I.T.ccexp = Instr.T.ccexp
12975 + and type I.T.fexp = Instr.T.fexp
12976 + (* and type I.T.labexp = Instr.T.labexp *)
12977 + and type I.T.mlrisc = Instr.T.mlrisc
12978 + and type I.T.oper = Instr.T.oper
12979 + and type I.T.rep = Instr.T.rep
12980 + and type I.T.rexp = Instr.T.rexp
12981 + and type I.T.stm = Instr.T.stm
12982 + and type I.arith = Instr.arith
12983 + and type I.branch = Instr.branch
12984 + and type I.cc = Instr.cc
12985 + and type I.ea = Instr.ea
12986 + and type I.farith1 = Instr.farith1
12987 + and type I.farith2 = Instr.farith2
12988 + and type I.fbranch = Instr.fbranch
12989 + and type I.fcmp = Instr.fcmp
12990 + and type I.fload = Instr.fload
12991 + and type I.fsize = Instr.fsize
12992 + and type I.fstore = Instr.fstore
12993 + and type I.instr = Instr.instr
12994 + and type I.instruction = Instr.instruction
12995 + and type I.load = Instr.load
12996 + and type I.operand = Instr.operand
12997 + and type I.prediction = Instr.prediction
12998 + and type I.rcond = Instr.rcond
12999 + and type I.shift = Instr.shift
13000 + and type I.store = Instr.store
13001 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
13002 + where type T.Basis.cond = Instr.T.Basis.cond
13003 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13004 + and type T.Basis.ext = Instr.T.Basis.ext
13005 + and type T.Basis.fcond = Instr.T.Basis.fcond
13006 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13007 + and type T.Constant.const = Instr.T.Constant.const
13008 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13009 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13010 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13011 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13012 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13013 + and type T.Region.region = Instr.T.Region.region
13014 + and type T.ccexp = Instr.T.ccexp
13015 + and type T.fexp = Instr.T.fexp
13016 + (* and type T.labexp = Instr.T.labexp *)
13017 + and type T.mlrisc = Instr.T.mlrisc
13018 + and type T.oper = Instr.T.oper
13019 + and type T.rep = Instr.T.rep
13020 + and type T.rexp = Instr.T.rexp
13021 + and type T.stm = Instr.T.stm
13023 (*#line 466.21 "sparc/sparc.mdl"*)
13025 diff --git a/sparc/emit/sparcMC.sml b/sparc/emit/sparcMC.sml
13026 index a90f30c..a6a2f09 100644
13027 --- a/sparc/emit/sparcMC.sml
13028 +++ b/sparc/emit/sparcMC.sml
13032 functor SparcMCEmitter(structure Instr : SPARCINSTR
13033 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
13034 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
13035 + where type T.Basis.cond = Instr.T.Basis.cond
13036 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13037 + and type T.Basis.ext = Instr.T.Basis.ext
13038 + and type T.Basis.fcond = Instr.T.Basis.fcond
13039 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13040 + and type T.Constant.const = Instr.T.Constant.const
13041 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13042 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13043 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13044 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13045 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13046 + and type T.Region.region = Instr.T.Region.region
13047 + and type T.ccexp = Instr.T.ccexp
13048 + and type T.fexp = Instr.T.fexp
13049 + (* and type T.labexp = Instr.T.labexp *)
13050 + and type T.mlrisc = Instr.T.mlrisc
13051 + and type T.oper = Instr.T.oper
13052 + and type T.rep = Instr.T.rep
13053 + and type T.rexp = Instr.T.rexp
13054 + and type T.stm = Instr.T.stm
13055 structure Stream : INSTRUCTION_STREAM
13056 structure CodeString : CODE_STRING
13057 ) : INSTRUCTION_EMITTER =
13058 @@ -47,6 +67,7 @@ struct
13059 (* note: fromLargeWord strips the high order bits! *)
13062 + val w = W.toLargeWord w
13063 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
13065 fun doNothing _ = ()
13066 diff --git a/sparc/flowgraph/sparcGasPseudoOps.sml b/sparc/flowgraph/sparcGasPseudoOps.sml
13067 index 3675d5f..66f08f0 100644
13068 --- a/sparc/flowgraph/sparcGasPseudoOps.sml
13069 +++ b/sparc/flowgraph/sparcGasPseudoOps.sml
13071 functor SparcGasPseudoOps
13072 ( structure T : MLTREE
13073 - structure MLTreeEval : MLTREE_EVAL where T = T
13074 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
13075 + where type T.Basis.cond = T.Basis.cond
13076 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
13077 + and type T.Basis.ext = T.Basis.ext
13078 + and type T.Basis.fcond = T.Basis.fcond
13079 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
13080 + and type T.Constant.const = T.Constant.const
13081 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
13082 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
13083 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
13084 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
13085 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
13086 + and type T.Region.region = T.Region.region
13087 + and type T.ccexp = T.ccexp
13088 + and type T.fexp = T.fexp
13089 + (* and type T.labexp = T.labexp *)
13090 + and type T.mlrisc = T.mlrisc
13091 + and type T.oper = T.oper
13092 + and type T.rep = T.rep
13093 + and type T.rexp = T.rexp
13094 + and type T.stm = T.stm
13095 ) : PSEUDO_OPS_BASIS =
13098 diff --git a/sparc/instructions/sparcInstr.sml b/sparc/instructions/sparcInstr.sml
13099 index dd319d5..0c5f5fc 100644
13100 --- a/sparc/instructions/sparcInstr.sml
13101 +++ b/sparc/instructions/sparcInstr.sml
13103 signature SPARCINSTR =
13105 structure C : SPARCCELLS
13106 - structure CB : CELLS_BASIS = CellsBasis
13107 + structure CB : CELLS_BASIS (* = CellsBasis *)
13108 + where type CellSet.cellset = CellsBasis.CellSet.cellset
13109 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
13110 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
13111 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
13112 + and type cell = CellsBasis.cell
13113 + and type cellColor = CellsBasis.cellColor
13114 + and type cellkind = CellsBasis.cellkind
13115 + and type cellkindDesc = CellsBasis.cellkindDesc
13116 + and type cellkindInfo = CellsBasis.cellkindInfo
13117 structure T : MLTREE
13118 structure Constant: CONSTANT
13119 structure Region : REGION
13120 diff --git a/sparc/instructions/sparcProps.sml b/sparc/instructions/sparcProps.sml
13121 index 8f6c283..b67eda6 100644
13122 --- a/sparc/instructions/sparcProps.sml
13123 +++ b/sparc/instructions/sparcProps.sml
13127 (structure SparcInstr : SPARCINSTR
13128 - structure MLTreeEval : MLTREE_EVAL where T = SparcInstr.T
13129 - structure MLTreeHash : MLTREE_HASH where T = SparcInstr.T
13130 + structure MLTreeEval : MLTREE_EVAL (* where T = SparcInstr.T *)
13131 + where type T.Basis.cond = SparcInstr.T.Basis.cond
13132 + and type T.Basis.div_rounding_mode = SparcInstr.T.Basis.div_rounding_mode
13133 + and type T.Basis.ext = SparcInstr.T.Basis.ext
13134 + and type T.Basis.fcond = SparcInstr.T.Basis.fcond
13135 + and type T.Basis.rounding_mode = SparcInstr.T.Basis.rounding_mode
13136 + and type T.Constant.const = SparcInstr.T.Constant.const
13137 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) SparcInstr.T.Extension.ccx
13138 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) SparcInstr.T.Extension.fx
13139 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) SparcInstr.T.Extension.rx
13140 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) SparcInstr.T.Extension.sx
13141 + and type T.I.div_rounding_mode = SparcInstr.T.I.div_rounding_mode
13142 + and type T.Region.region = SparcInstr.T.Region.region
13143 + and type T.ccexp = SparcInstr.T.ccexp
13144 + and type T.fexp = SparcInstr.T.fexp
13145 + (* and type T.labexp = SparcInstr.T.labexp *)
13146 + and type T.mlrisc = SparcInstr.T.mlrisc
13147 + and type T.oper = SparcInstr.T.oper
13148 + and type T.rep = SparcInstr.T.rep
13149 + and type T.rexp = SparcInstr.T.rexp
13150 + and type T.stm = SparcInstr.T.stm
13151 + structure MLTreeHash : MLTREE_HASH (* where T = SparcInstr.T *)
13152 + where type T.Basis.cond = SparcInstr.T.Basis.cond
13153 + and type T.Basis.div_rounding_mode = SparcInstr.T.Basis.div_rounding_mode
13154 + and type T.Basis.ext = SparcInstr.T.Basis.ext
13155 + and type T.Basis.fcond = SparcInstr.T.Basis.fcond
13156 + and type T.Basis.rounding_mode = SparcInstr.T.Basis.rounding_mode
13157 + and type T.Constant.const = SparcInstr.T.Constant.const
13158 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) SparcInstr.T.Extension.ccx
13159 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) SparcInstr.T.Extension.fx
13160 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) SparcInstr.T.Extension.rx
13161 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) SparcInstr.T.Extension.sx
13162 + and type T.I.div_rounding_mode = SparcInstr.T.I.div_rounding_mode
13163 + and type T.Region.region = SparcInstr.T.Region.region
13164 + and type T.ccexp = SparcInstr.T.ccexp
13165 + and type T.fexp = SparcInstr.T.fexp
13166 + (* and type T.labexp = SparcInstr.T.labexp *)
13167 + and type T.mlrisc = SparcInstr.T.mlrisc
13168 + and type T.oper = SparcInstr.T.oper
13169 + and type T.rep = SparcInstr.T.rep
13170 + and type T.rexp = SparcInstr.T.rexp
13171 + and type T.stm = SparcInstr.T.stm
13172 ) : INSN_PROPERTIES =
13174 structure I = SparcInstr
13175 diff --git a/sparc/instructions/sparccomp-instr-ext.sml b/sparc/instructions/sparccomp-instr-ext.sml
13176 index 918dbaa..7cf7daf 100644
13177 --- a/sparc/instructions/sparccomp-instr-ext.sml
13178 +++ b/sparc/instructions/sparccomp-instr-ext.sml
13181 signature SPARCCOMP_INSTR_EXT = sig
13182 structure T : MLTREE
13183 - structure I : SPARCINSTR
13185 - structure TS : MLTREE_STREAM
13187 - structure CFG : CONTROL_FLOW_GRAPH
13189 + structure I : SPARCINSTR (* where T = T *)
13190 + where type T.Basis.cond = T.Basis.cond
13191 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
13192 + and type T.Basis.ext = T.Basis.ext
13193 + and type T.Basis.fcond = T.Basis.fcond
13194 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
13195 + and type T.Constant.const = T.Constant.const
13196 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
13197 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
13198 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
13199 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
13200 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
13201 + and type T.Region.region = T.Region.region
13202 + and type T.ccexp = T.ccexp
13203 + and type T.fexp = T.fexp
13204 + (* and type T.labexp = T.labexp *)
13205 + and type T.mlrisc = T.mlrisc
13206 + and type T.oper = T.oper
13207 + and type T.rep = T.rep
13208 + and type T.rexp = T.rexp
13209 + and type T.stm = T.stm
13210 + structure TS : MLTREE_STREAM (* where T = I.T *)
13211 + where type T.Basis.cond = I.T.Basis.cond
13212 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
13213 + and type T.Basis.ext = I.T.Basis.ext
13214 + and type T.Basis.fcond = I.T.Basis.fcond
13215 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
13216 + and type T.Constant.const = I.T.Constant.const
13217 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
13218 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
13219 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
13220 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
13221 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
13222 + and type T.Region.region = I.T.Region.region
13223 + and type T.ccexp = I.T.ccexp
13224 + and type T.fexp = I.T.fexp
13225 + (* and type T.labexp = I.T.labexp *)
13226 + and type T.mlrisc = I.T.mlrisc
13227 + and type T.oper = I.T.oper
13228 + and type T.rep = I.T.rep
13229 + and type T.rexp = I.T.rexp
13230 + and type T.stm = I.T.stm
13231 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I *)
13232 + where type I.addressing_mode = I.addressing_mode
13233 + and type I.ea = I.ea
13234 + and type I.instr = I.instr
13235 + and type I.instruction = I.instruction
13236 + and type I.operand = I.operand
13240 @@ -27,11 +69,54 @@ end
13242 functor SparcCompInstrExt
13243 (structure I : SPARCINSTR
13244 - structure TS : MLTREE_STREAM
13246 - structure CFG : CONTROL_FLOW_GRAPH
13249 + structure TS : MLTREE_STREAM (* where T = I.T *)
13250 + where type T.Basis.cond = I.T.Basis.cond
13251 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
13252 + and type T.Basis.ext = I.T.Basis.ext
13253 + and type T.Basis.fcond = I.T.Basis.fcond
13254 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
13255 + and type T.Constant.const = I.T.Constant.const
13256 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
13257 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
13258 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
13259 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
13260 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
13261 + and type T.Region.region = I.T.Region.region
13262 + and type T.ccexp = I.T.ccexp
13263 + and type T.fexp = I.T.fexp
13264 + (* and type T.labexp = I.T.labexp *)
13265 + and type T.mlrisc = I.T.mlrisc
13266 + and type T.oper = I.T.oper
13267 + and type T.rep = I.T.rep
13268 + and type T.rexp = I.T.rexp
13269 + and type T.stm = I.T.stm
13270 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = TS.S.P *)
13271 + where type I.addressing_mode = I.addressing_mode
13272 + and type I.ea = I.ea
13273 + and type I.instr = I.instr
13274 + and type I.instruction = I.instruction
13275 + and type I.operand = I.operand
13276 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
13277 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
13278 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
13279 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
13280 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
13281 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
13282 + and type P.T.Constant.const = TS.S.P.T.Constant.const
13283 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
13284 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
13285 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
13286 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
13287 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
13288 + and type P.T.Region.region = TS.S.P.T.Region.region
13289 + and type P.T.ccexp = TS.S.P.T.ccexp
13290 + and type P.T.fexp = TS.S.P.T.fexp
13291 + (* and type P.T.labexp = TS.S.P.T.labexp *)
13292 + and type P.T.mlrisc = TS.S.P.T.mlrisc
13293 + and type P.T.oper = TS.S.P.T.oper
13294 + and type P.T.rep = TS.S.P.T.rep
13295 + and type P.T.rexp = TS.S.P.T.rexp
13296 + and type P.T.stm = TS.S.P.T.stm
13297 ) : SPARCCOMP_INSTR_EXT =
13299 structure CFG = CFG
13300 diff --git a/sparc/mltree/sparc.sml b/sparc/mltree/sparc.sml
13301 index b8e7e40..792f9f3 100644
13302 --- a/sparc/mltree/sparc.sml
13303 +++ b/sparc/mltree/sparc.sml
13304 @@ -14,12 +14,72 @@
13307 (structure SparcInstr : SPARCINSTR
13308 - structure PseudoInstrs : SPARC_PSEUDO_INSTR
13309 - where I = SparcInstr
13310 - structure ExtensionComp : MLTREE_EXTENSION_COMP
13311 - where I = SparcInstr
13312 - and T = SparcInstr.T
13314 + structure PseudoInstrs : SPARC_PSEUDO_INSTR (* where I = SparcInstr *)
13315 + where type I.Constant.const = SparcInstr.Constant.const
13316 + and type I.Region.region = SparcInstr.Region.region
13317 + and type I.T.Basis.cond = SparcInstr.T.Basis.cond
13318 + and type I.T.Basis.div_rounding_mode = SparcInstr.T.Basis.div_rounding_mode
13319 + and type I.T.Basis.ext = SparcInstr.T.Basis.ext
13320 + and type I.T.Basis.fcond = SparcInstr.T.Basis.fcond
13321 + and type I.T.Basis.rounding_mode = SparcInstr.T.Basis.rounding_mode
13322 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) SparcInstr.T.Extension.ccx
13323 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) SparcInstr.T.Extension.fx
13324 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) SparcInstr.T.Extension.rx
13325 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) SparcInstr.T.Extension.sx
13326 + and type I.T.I.div_rounding_mode = SparcInstr.T.I.div_rounding_mode
13327 + and type I.T.ccexp = SparcInstr.T.ccexp
13328 + and type I.T.fexp = SparcInstr.T.fexp
13329 + (* and type I.T.labexp = SparcInstr.T.labexp *)
13330 + and type I.T.mlrisc = SparcInstr.T.mlrisc
13331 + and type I.T.oper = SparcInstr.T.oper
13332 + and type I.T.rep = SparcInstr.T.rep
13333 + and type I.T.rexp = SparcInstr.T.rexp
13334 + and type I.T.stm = SparcInstr.T.stm
13335 + and type I.arith = SparcInstr.arith
13336 + and type I.branch = SparcInstr.branch
13337 + and type I.cc = SparcInstr.cc
13338 + and type I.ea = SparcInstr.ea
13339 + and type I.farith1 = SparcInstr.farith1
13340 + and type I.farith2 = SparcInstr.farith2
13341 + and type I.fbranch = SparcInstr.fbranch
13342 + and type I.fcmp = SparcInstr.fcmp
13343 + and type I.fload = SparcInstr.fload
13344 + and type I.fsize = SparcInstr.fsize
13345 + and type I.fstore = SparcInstr.fstore
13346 + and type I.instr = SparcInstr.instr
13347 + and type I.instruction = SparcInstr.instruction
13348 + and type I.load = SparcInstr.load
13349 + and type I.operand = SparcInstr.operand
13350 + and type I.prediction = SparcInstr.prediction
13351 + and type I.rcond = SparcInstr.rcond
13352 + and type I.shift = SparcInstr.shift
13353 + and type I.store = SparcInstr.store
13354 + structure ExtensionComp : MLTREE_EXTENSION_COMP (* where I = SparcInstr and T = SparcInstr.T *)
13355 + where type I.addressing_mode = SparcInstr.addressing_mode
13356 + and type I.ea = SparcInstr.ea
13357 + and type I.instr = SparcInstr.instr
13358 + and type I.instruction = SparcInstr.instruction
13359 + and type I.operand = SparcInstr.operand
13360 + where type T.Basis.cond = SparcInstr.T.Basis.cond
13361 + and type T.Basis.div_rounding_mode = SparcInstr.T.Basis.div_rounding_mode
13362 + and type T.Basis.ext = SparcInstr.T.Basis.ext
13363 + and type T.Basis.fcond = SparcInstr.T.Basis.fcond
13364 + and type T.Basis.rounding_mode = SparcInstr.T.Basis.rounding_mode
13365 + and type T.Constant.const = SparcInstr.T.Constant.const
13366 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) SparcInstr.T.Extension.ccx
13367 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) SparcInstr.T.Extension.fx
13368 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) SparcInstr.T.Extension.rx
13369 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) SparcInstr.T.Extension.sx
13370 + and type T.I.div_rounding_mode = SparcInstr.T.I.div_rounding_mode
13371 + and type T.Region.region = SparcInstr.T.Region.region
13372 + and type T.ccexp = SparcInstr.T.ccexp
13373 + and type T.fexp = SparcInstr.T.fexp
13374 + (* and type T.labexp = SparcInstr.T.labexp *)
13375 + and type T.mlrisc = SparcInstr.T.mlrisc
13376 + and type T.oper = SparcInstr.T.oper
13377 + and type T.rep = SparcInstr.T.rep
13378 + and type T.rexp = SparcInstr.T.rexp
13379 + and type T.stm = SparcInstr.T.stm
13382 * The client should also specify these parameters.
13383 @@ -76,8 +136,8 @@ struct
13387 - functor Multiply32 = MLTreeMult
13389 + structure Multiply32 = struct
13392 structure CB = CellsBasis
13393 type arg = {r1:CB.cell,r2:CB.cell,d:CB.cell}
13394 @@ -89,10 +149,10 @@ struct
13395 fun slli{r,i,d} = [I.shift{s=I.SLL,r=r,i=I.IMMED i,d=d}]
13396 fun srli{r,i,d} = [I.shift{s=I.SRL,r=r,i=I.IMMED i,d=d}]
13397 fun srai{r,i,d} = [I.shift{s=I.SRA,r=r,i=I.IMMED i,d=d}]
13401 - functor Multiply64 = MLTreeMult
13403 + structure Multiply64 = struct
13406 structure CB = CellsBasis
13407 type arg = {r1:CB.cell,r2:CB.cell,d:CB.cell}
13408 @@ -104,11 +164,12 @@ struct
13409 fun slli{r,i,d} = [I.shift{s=I.SLLX,r=r,i=I.IMMED i,d=d}]
13410 fun srli{r,i,d} = [I.shift{s=I.SRLX,r=r,i=I.IMMED i,d=d}]
13411 fun srai{r,i,d} = [I.shift{s=I.SRAX,r=r,i=I.IMMED i,d=d}]
13415 (* signed, trapping version of multiply and divide *)
13416 - structure Mult32 = Multiply32
13417 - (val trapping = true
13418 + structure Mult32 = MLTreeMult
13420 + val trapping = true
13421 val multCost = multCost
13422 fun addv{r1,r2,d} =
13423 I.arith{a=I.ADDCC,r=r1,i=I.REG r2,d=d}::PseudoInstrs.overflowtrap32
13424 @@ -117,26 +178,28 @@ struct
13429 - (val signed = true)
13431 + val signed = true)
13433 (* unsigned, non-trapping version of multiply and divide *)
13434 - functor Mul32 = Multiply32
13435 - (val trapping = false
13436 + structure Mul32 = struct
13438 + val trapping = false
13439 val multCost = muluCost
13440 fun addv{r1,r2,d} = [I.arith{a=I.ADD,r=r1,i=I.REG r2,d=d}]
13441 fun subv{r1,r2,d} = [I.arith{a=I.SUB,r=r1,i=I.REG r2,d=d}]
13446 - structure Mulu32 = Mul32(val signed = false)
13448 + structure Mulu32 = MLTreeMult(open Mul32 val signed = false)
13450 - structure Muls32 = Mul32(val signed = true)
13451 + structure Muls32 = MLTreeMult(open Mul32 val signed = true)
13453 (* signed, trapping version of multiply and divide *)
13454 - structure Mult64 = Multiply64
13455 - (val trapping = true
13456 + structure Mult64 = MLTreeMult
13458 + val trapping = true
13459 val multCost = multCost
13460 fun addv{r1,r2,d} =
13461 I.arith{a=I.ADDCC,r=r1,i=I.REG r2,d=d}::PseudoInstrs.overflowtrap64
13462 @@ -145,22 +208,23 @@ struct
13467 - (val signed = true)
13469 + val signed = true)
13471 (* unsigned, non-trapping version of multiply and divide *)
13472 - functor Mul64 = Multiply64
13473 - (val trapping = false
13474 + structure Mul64 = struct
13476 + val trapping = false
13477 val multCost = muluCost
13478 fun addv{r1,r2,d} = [I.arith{a=I.ADD,r=r1,i=I.REG r2,d=d}]
13479 fun subv{r1,r2,d} = [I.arith{a=I.SUB,r=r1,i=I.REG r2,d=d}]
13484 - structure Mulu64 = Mul64(val signed = false)
13486 + structure Mulu64 = MLTreeMult(open Mul64 val signed = false)
13488 - structure Muls64 = Mul64(val signed = true)
13489 + structure Muls64 = MLTreeMult(open Mul64 val signed = true)
13491 datatype commutative = COMMUTE | NOCOMMUTE
13492 datatype cc = REG (* write to register *)
13493 diff --git a/visualization/cfgViewer.sml b/visualization/cfgViewer.sml
13494 index 65c6251..877f496 100644
13495 --- a/visualization/cfgViewer.sml
13496 +++ b/visualization/cfgViewer.sml
13499 (structure CFG : CONTROL_FLOW_GRAPH
13500 structure GraphViewer : GRAPH_VIEWER
13501 - structure Asm : INSTRUCTION_EMITTER where I = CFG.I)
13503 + structure Asm : INSTRUCTION_EMITTER (* where I = CFG.I *)
13504 + where type I.addressing_mode = CFG.I.addressing_mode
13505 + and type I.ea = CFG.I.ea
13506 + and type I.instr = CFG.I.instr
13507 + and type I.instruction = CFG.I.instruction
13508 + and type I.operand = CFG.I.operand
13510 val view : CFG.cfg -> unit
13513 diff --git a/x86/backpatch/x86Jumps.sml b/x86/backpatch/x86Jumps.sml
13514 index 120792e..ddf292e 100644
13515 --- a/x86/backpatch/x86Jumps.sml
13516 +++ b/x86/backpatch/x86Jumps.sml
13520 (structure Instr : X86INSTR
13521 - structure Eval : MLTREE_EVAL where T = Instr.T
13522 - structure Shuffle : X86SHUFFLE where I = Instr
13523 - structure MCEmitter : MC_EMIT where I = Instr) : SDI_JUMPS =
13524 + structure Eval : MLTREE_EVAL (* where T = Instr.T *)
13525 + where type T.Basis.cond = Instr.T.Basis.cond
13526 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13527 + and type T.Basis.ext = Instr.T.Basis.ext
13528 + and type T.Basis.fcond = Instr.T.Basis.fcond
13529 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13530 + and type T.Constant.const = Instr.T.Constant.const
13531 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13532 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13533 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13534 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13535 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13536 + and type T.Region.region = Instr.T.Region.region
13537 + and type T.ccexp = Instr.T.ccexp
13538 + and type T.fexp = Instr.T.fexp
13539 + (* and type T.labexp = Instr.T.labexp *)
13540 + and type T.mlrisc = Instr.T.mlrisc
13541 + and type T.oper = Instr.T.oper
13542 + and type T.rep = Instr.T.rep
13543 + and type T.rexp = Instr.T.rexp
13544 + and type T.stm = Instr.T.stm
13545 + structure Shuffle : X86SHUFFLE (* where I = Instr *)
13546 + where type I.Constant.const = Instr.Constant.const
13547 + and type I.Region.region = Instr.Region.region
13548 + and type I.T.Basis.cond = Instr.T.Basis.cond
13549 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13550 + and type I.T.Basis.ext = Instr.T.Basis.ext
13551 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
13552 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13553 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13554 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13555 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13556 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13557 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13558 + and type I.T.ccexp = Instr.T.ccexp
13559 + and type I.T.fexp = Instr.T.fexp
13560 + (* and type I.T.labexp = Instr.T.labexp *)
13561 + and type I.T.mlrisc = Instr.T.mlrisc
13562 + and type I.T.oper = Instr.T.oper
13563 + and type I.T.rep = Instr.T.rep
13564 + and type I.T.rexp = Instr.T.rexp
13565 + and type I.T.stm = Instr.T.stm
13566 + (* and type I.addressing_mode = Instr.addressing_mode *)
13567 + and type I.binaryOp = Instr.binaryOp
13568 + and type I.bitOp = Instr.bitOp
13569 + and type I.cond = Instr.cond
13570 + and type I.fbinOp = Instr.fbinOp
13571 + and type I.fenvOp = Instr.fenvOp
13572 + and type I.fibinOp = Instr.fibinOp
13573 + and type I.fsize = Instr.fsize
13574 + and type I.funOp = Instr.funOp
13575 + and type I.instr = Instr.instr
13576 + and type I.instruction = Instr.instruction
13577 + and type I.isize = Instr.isize
13578 + and type I.move = Instr.move
13579 + and type I.multDivOp = Instr.multDivOp
13580 + and type I.operand = Instr.operand
13581 + and type I.shiftOp = Instr.shiftOp
13582 + and type I.unaryOp = Instr.unaryOp
13583 + structure MCEmitter : MC_EMIT (* where I = Instr *)
13584 + where type I.addressing_mode = Instr.addressing_mode
13585 + and type I.ea = Instr.ea
13586 + and type I.instr = Instr.instr
13587 + and type I.instruction = Instr.instruction
13588 + and type I.operand = Instr.operand
13591 structure I = Instr
13593 diff --git a/x86/emit/x86Asm.sml b/x86/emit/x86Asm.sml
13594 index a6062a1..c633b83 100644
13595 --- a/x86/emit/x86Asm.sml
13596 +++ b/x86/emit/x86Asm.sml
13600 functor X86AsmEmitter(structure S : INSTRUCTION_STREAM
13601 - structure Instr : X86INSTR
13603 - structure Shuffle : X86SHUFFLE
13605 - structure MLTreeEval : MLTREE_EVAL
13606 - where T = Instr.T
13607 + structure Instr : X86INSTR (* where T = S.P.T *)
13608 + where type T.Basis.cond = S.P.T.Basis.cond
13609 + and type T.Basis.div_rounding_mode = S.P.T.Basis.div_rounding_mode
13610 + and type T.Basis.ext = S.P.T.Basis.ext
13611 + and type T.Basis.fcond = S.P.T.Basis.fcond
13612 + and type T.Basis.rounding_mode = S.P.T.Basis.rounding_mode
13613 + and type T.Constant.const = S.P.T.Constant.const
13614 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) S.P.T.Extension.ccx
13615 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) S.P.T.Extension.fx
13616 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) S.P.T.Extension.rx
13617 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) S.P.T.Extension.sx
13618 + and type T.I.div_rounding_mode = S.P.T.I.div_rounding_mode
13619 + and type T.Region.region = S.P.T.Region.region
13620 + and type T.ccexp = S.P.T.ccexp
13621 + and type T.fexp = S.P.T.fexp
13622 + (* and type T.labexp = S.P.T.labexp *)
13623 + and type T.mlrisc = S.P.T.mlrisc
13624 + and type T.oper = S.P.T.oper
13625 + and type T.rep = S.P.T.rep
13626 + and type T.rexp = S.P.T.rexp
13627 + and type T.stm = S.P.T.stm
13628 + structure Shuffle : X86SHUFFLE (* where I = Instr *)
13629 + where type I.Constant.const = Instr.Constant.const
13630 + and type I.Region.region = Instr.Region.region
13631 + and type I.T.Basis.cond = Instr.T.Basis.cond
13632 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13633 + and type I.T.Basis.ext = Instr.T.Basis.ext
13634 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
13635 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13636 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13637 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13638 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13639 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13640 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13641 + and type I.T.ccexp = Instr.T.ccexp
13642 + and type I.T.fexp = Instr.T.fexp
13643 + (* and type I.T.labexp = Instr.T.labexp *)
13644 + and type I.T.mlrisc = Instr.T.mlrisc
13645 + and type I.T.oper = Instr.T.oper
13646 + and type I.T.rep = Instr.T.rep
13647 + and type I.T.rexp = Instr.T.rexp
13648 + and type I.T.stm = Instr.T.stm
13649 + (* and type I.addressing_mode = Instr.addressing_mode *)
13650 + and type I.binaryOp = Instr.binaryOp
13651 + and type I.bitOp = Instr.bitOp
13652 + and type I.cond = Instr.cond
13653 + and type I.fbinOp = Instr.fbinOp
13654 + and type I.fenvOp = Instr.fenvOp
13655 + and type I.fibinOp = Instr.fibinOp
13656 + and type I.fsize = Instr.fsize
13657 + and type I.funOp = Instr.funOp
13658 + and type I.instr = Instr.instr
13659 + and type I.instruction = Instr.instruction
13660 + and type I.isize = Instr.isize
13661 + and type I.move = Instr.move
13662 + and type I.multDivOp = Instr.multDivOp
13663 + and type I.operand = Instr.operand
13664 + and type I.shiftOp = Instr.shiftOp
13665 + and type I.unaryOp = Instr.unaryOp
13666 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
13667 + where type T.Basis.cond = Instr.T.Basis.cond
13668 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13669 + and type T.Basis.ext = Instr.T.Basis.ext
13670 + and type T.Basis.fcond = Instr.T.Basis.fcond
13671 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13672 + and type T.Constant.const = Instr.T.Constant.const
13673 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13674 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13675 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13676 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13677 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13678 + and type T.Region.region = Instr.T.Region.region
13679 + and type T.ccexp = Instr.T.ccexp
13680 + and type T.fexp = Instr.T.fexp
13681 + (* and type T.labexp = Instr.T.labexp *)
13682 + and type T.mlrisc = Instr.T.mlrisc
13683 + and type T.oper = Instr.T.oper
13684 + and type T.rep = Instr.T.rep
13685 + and type T.rexp = Instr.T.rexp
13686 + and type T.stm = Instr.T.stm
13688 (*#line 512.7 "x86/x86.mdl"*)
13689 - structure MemRegs : MEMORY_REGISTERS where I=Instr
13690 + structure MemRegs : MEMORY_REGISTERS (* where I = Instr *)
13691 + where type I.Constant.const = Instr.Constant.const
13692 + and type I.Region.region = Instr.Region.region
13693 + and type I.T.Basis.cond = Instr.T.Basis.cond
13694 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13695 + and type I.T.Basis.ext = Instr.T.Basis.ext
13696 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
13697 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13698 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13699 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13700 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13701 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13702 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13703 + and type I.T.ccexp = Instr.T.ccexp
13704 + and type I.T.fexp = Instr.T.fexp
13705 + (* and type I.T.labexp = Instr.T.labexp *)
13706 + and type I.T.mlrisc = Instr.T.mlrisc
13707 + and type I.T.oper = Instr.T.oper
13708 + and type I.T.rep = Instr.T.rep
13709 + and type I.T.rexp = Instr.T.rexp
13710 + and type I.T.stm = Instr.T.stm
13711 + (* and type I.addressing_mode = Instr.addressing_mode *)
13712 + and type I.binaryOp = Instr.binaryOp
13713 + and type I.bitOp = Instr.bitOp
13714 + and type I.cond = Instr.cond
13715 + and type I.fbinOp = Instr.fbinOp
13716 + and type I.fenvOp = Instr.fenvOp
13717 + and type I.fibinOp = Instr.fibinOp
13718 + and type I.fsize = Instr.fsize
13719 + and type I.funOp = Instr.funOp
13720 + and type I.instr = Instr.instr
13721 + and type I.instruction = Instr.instruction
13722 + and type I.isize = Instr.isize
13723 + and type I.move = Instr.move
13724 + and type I.multDivOp = Instr.multDivOp
13725 + and type I.operand = Instr.operand
13726 + and type I.shiftOp = Instr.shiftOp
13727 + and type I.unaryOp = Instr.unaryOp
13729 (*#line 513.7 "x86/x86.mdl"*)
13730 val memRegBase : CellsBasis.cell option
13731 diff --git a/x86/flowgraph/x86-darwin-pseudo-ops.sml b/x86/flowgraph/x86-darwin-pseudo-ops.sml
13732 index 2b3db45..d848c1c 100644
13733 --- a/x86/flowgraph/x86-darwin-pseudo-ops.sml
13734 +++ b/x86/flowgraph/x86-darwin-pseudo-ops.sml
13736 functor X86DarwinPseudoOps (
13738 structure T : MLTREE
13739 - structure MLTreeEval : MLTREE_EVAL where T = T
13740 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
13741 + where type T.Basis.cond = T.Basis.cond
13742 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
13743 + and type T.Basis.ext = T.Basis.ext
13744 + and type T.Basis.fcond = T.Basis.fcond
13745 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
13746 + and type T.Constant.const = T.Constant.const
13747 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
13748 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
13749 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
13750 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
13751 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
13752 + and type T.Region.region = T.Region.region
13753 + and type T.ccexp = T.ccexp
13754 + and type T.fexp = T.fexp
13755 + (* and type T.labexp = T.labexp *)
13756 + and type T.mlrisc = T.mlrisc
13757 + and type T.oper = T.oper
13758 + and type T.rep = T.rep
13759 + and type T.rexp = T.rexp
13760 + and type T.stm = T.stm
13762 ) : PSEUDO_OPS_BASIS = struct
13764 diff --git a/x86/flowgraph/x86GasPseudoOps.sml b/x86/flowgraph/x86GasPseudoOps.sml
13765 index 5b441e1..2e79f3e 100644
13766 --- a/x86/flowgraph/x86GasPseudoOps.sml
13767 +++ b/x86/flowgraph/x86GasPseudoOps.sml
13770 functor X86GasPseudoOps
13771 ( structure T : MLTREE
13772 - structure MLTreeEval : MLTREE_EVAL where T = T
13773 + structure MLTreeEval : MLTREE_EVAL (* where T = T *)
13774 + where type T.Basis.cond = T.Basis.cond
13775 + and type T.Basis.div_rounding_mode = T.Basis.div_rounding_mode
13776 + and type T.Basis.ext = T.Basis.ext
13777 + and type T.Basis.fcond = T.Basis.fcond
13778 + and type T.Basis.rounding_mode = T.Basis.rounding_mode
13779 + and type T.Constant.const = T.Constant.const
13780 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) T.Extension.ccx
13781 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) T.Extension.fx
13782 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) T.Extension.rx
13783 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) T.Extension.sx
13784 + and type T.I.div_rounding_mode = T.I.div_rounding_mode
13785 + and type T.Region.region = T.Region.region
13786 + and type T.ccexp = T.ccexp
13787 + and type T.fexp = T.fexp
13788 + (* and type T.labexp = T.labexp *)
13789 + and type T.mlrisc = T.mlrisc
13790 + and type T.oper = T.oper
13791 + and type T.rep = T.rep
13792 + and type T.rexp = T.rexp
13793 + and type T.stm = T.stm
13794 ) : PSEUDO_OPS_BASIS =
13797 diff --git a/x86/instructions/x86Instr.sml b/x86/instructions/x86Instr.sml
13798 index 11da42c..735cc76 100644
13799 --- a/x86/instructions/x86Instr.sml
13800 +++ b/x86/instructions/x86Instr.sml
13802 signature X86INSTR =
13804 structure C : X86CELLS
13805 - structure CB : CELLS_BASIS = CellsBasis
13806 + structure CB : CELLS_BASIS (* = CellsBasis *)
13807 + where type CellSet.cellset = CellsBasis.CellSet.cellset
13808 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
13809 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
13810 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
13811 + and type cell = CellsBasis.cell
13812 + and type cellColor = CellsBasis.cellColor
13813 + and type cellkind = CellsBasis.cellkind
13814 + and type cellkindDesc = CellsBasis.cellkindDesc
13815 + and type cellkindInfo = CellsBasis.cellkindInfo
13816 structure T : MLTREE
13817 structure Constant: CONSTANT
13818 structure Region : REGION
13819 diff --git a/x86/instructions/x86Peephole.peep b/x86/instructions/x86Peephole.peep
13820 index 0859bd3..2a335ac 100644
13821 --- a/x86/instructions/x86Peephole.peep
13822 +++ b/x86/instructions/x86Peephole.peep
13823 @@ -20,7 +20,27 @@ in
13824 functor X86Peephole
13825 (structure Instr : X86INSTR
13826 structure Eval : MLTREE_EVAL
13827 - sharing Instr.T = Eval.T
13828 + (* sharing Instr.T = Eval.T *)
13829 + where type T.Basis.cond = Instr.T.Basis.cond
13830 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13831 + and type T.Basis.ext = Instr.T.Basis.ext
13832 + and type T.Basis.fcond = Instr.T.Basis.fcond
13833 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13834 + and type T.Constant.const = Instr.T.Constant.const
13835 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13836 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13837 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13838 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13839 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13840 + and type T.Region.region = Instr.T.Region.region
13841 + and type T.ccexp = Instr.T.ccexp
13842 + and type T.fexp = Instr.T.fexp
13843 + (* and type T.labexp = Instr.T.labexp *)
13844 + and type T.mlrisc = Instr.T.mlrisc
13845 + and type T.oper = Instr.T.oper
13846 + and type T.rep = Instr.T.rep
13847 + and type T.rexp = Instr.T.rexp
13848 + and type T.stm = Instr.T.stm
13851 structure I = Instr
13852 diff --git a/x86/instructions/x86Peephole.sml b/x86/instructions/x86Peephole.sml
13853 index 66670c1..fe27654 100644
13854 --- a/x86/instructions/x86Peephole.sml
13855 +++ b/x86/instructions/x86Peephole.sml
13856 @@ -12,7 +12,27 @@ functor X86Peephole(
13857 structure Eval : MLTREE_EVAL
13859 (*#line 23.7 "x86Peephole.peep"*)
13860 - sharing Instr.T = Eval.T
13861 + (* sharing Instr.T = Eval.T *)
13862 + where type T.Basis.cond = Instr.T.Basis.cond
13863 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13864 + and type T.Basis.ext = Instr.T.Basis.ext
13865 + and type T.Basis.fcond = Instr.T.Basis.fcond
13866 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13867 + and type T.Constant.const = Instr.T.Constant.const
13868 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13869 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13870 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13871 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13872 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13873 + and type T.Region.region = Instr.T.Region.region
13874 + and type T.ccexp = Instr.T.ccexp
13875 + and type T.fexp = Instr.T.fexp
13876 + (* and type T.labexp = Instr.T.labexp *)
13877 + and type T.mlrisc = Instr.T.mlrisc
13878 + and type T.oper = Instr.T.oper
13879 + and type T.rep = Instr.T.rep
13880 + and type T.rexp = Instr.T.rexp
13881 + and type T.stm = Instr.T.stm
13885 diff --git a/x86/instructions/x86Props.sml b/x86/instructions/x86Props.sml
13886 index 6cd50da..31fba12 100644
13887 --- a/x86/instructions/x86Props.sml
13888 +++ b/x86/instructions/x86Props.sml
13892 (structure Instr : X86INSTR
13893 - structure MLTreeHash : MLTREE_HASH where T = Instr.T
13894 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
13895 + structure MLTreeHash : MLTREE_HASH (* where T = Instr.T *)
13896 + where type T.Basis.cond = Instr.T.Basis.cond
13897 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13898 + and type T.Basis.ext = Instr.T.Basis.ext
13899 + and type T.Basis.fcond = Instr.T.Basis.fcond
13900 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13901 + and type T.Constant.const = Instr.T.Constant.const
13902 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13903 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13904 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13905 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13906 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13907 + and type T.Region.region = Instr.T.Region.region
13908 + and type T.ccexp = Instr.T.ccexp
13909 + and type T.fexp = Instr.T.fexp
13910 + (* and type T.labexp = Instr.T.labexp *)
13911 + and type T.mlrisc = Instr.T.mlrisc
13912 + and type T.oper = Instr.T.oper
13913 + and type T.rep = Instr.T.rep
13914 + and type T.rexp = Instr.T.rexp
13915 + and type T.stm = Instr.T.stm
13916 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
13917 + where type T.Basis.cond = Instr.T.Basis.cond
13918 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
13919 + and type T.Basis.ext = Instr.T.Basis.ext
13920 + and type T.Basis.fcond = Instr.T.Basis.fcond
13921 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
13922 + and type T.Constant.const = Instr.T.Constant.const
13923 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
13924 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
13925 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
13926 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
13927 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
13928 + and type T.Region.region = Instr.T.Region.region
13929 + and type T.ccexp = Instr.T.ccexp
13930 + and type T.fexp = Instr.T.fexp
13931 + (* and type T.labexp = Instr.T.labexp *)
13932 + and type T.mlrisc = Instr.T.mlrisc
13933 + and type T.oper = Instr.T.oper
13934 + and type T.rep = Instr.T.rep
13935 + and type T.rexp = Instr.T.rexp
13936 + and type T.stm = Instr.T.stm
13937 ) : INSN_PROPERTIES =
13939 structure I = Instr
13940 diff --git a/x86/instructions/x86comp-instr-ext.sml b/x86/instructions/x86comp-instr-ext.sml
13941 index d846378..7a0d5dd 100644
13942 --- a/x86/instructions/x86comp-instr-ext.sml
13943 +++ b/x86/instructions/x86comp-instr-ext.sml
13946 signature X86COMP_INSTR_EXT = sig
13947 structure I : X86INSTR
13948 - structure TS : MLTREE_STREAM
13950 - structure CFG : CONTROL_FLOW_GRAPH
13953 + structure TS : MLTREE_STREAM (* where T = I.T *)
13954 + where type T.Basis.cond = I.T.Basis.cond
13955 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
13956 + and type T.Basis.ext = I.T.Basis.ext
13957 + and type T.Basis.fcond = I.T.Basis.fcond
13958 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
13959 + and type T.Constant.const = I.T.Constant.const
13960 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
13961 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
13962 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
13963 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
13964 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
13965 + and type T.Region.region = I.T.Region.region
13966 + and type T.ccexp = I.T.ccexp
13967 + and type T.fexp = I.T.fexp
13968 + (* and type T.labexp = I.T.labexp *)
13969 + and type T.mlrisc = I.T.mlrisc
13970 + and type T.oper = I.T.oper
13971 + and type T.rep = I.T.rep
13972 + and type T.rexp = I.T.rexp
13973 + and type T.stm = I.T.stm
13974 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I and P = TS.S.P *)
13975 + where type I.addressing_mode = I.addressing_mode
13976 + and type I.ea = I.ea
13977 + and type I.instr = I.instr
13978 + and type I.instruction = I.instruction
13979 + and type I.operand = I.operand
13980 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
13981 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
13982 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
13983 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
13984 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
13985 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
13986 + and type P.T.Constant.const = TS.S.P.T.Constant.const
13987 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
13988 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
13989 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
13990 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
13991 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
13992 + and type P.T.Region.region = TS.S.P.T.Region.region
13993 + and type P.T.ccexp = TS.S.P.T.ccexp
13994 + and type P.T.fexp = TS.S.P.T.fexp
13995 + (* and type P.T.labexp = TS.S.P.T.labexp *)
13996 + and type P.T.mlrisc = TS.S.P.T.mlrisc
13997 + and type P.T.oper = TS.S.P.T.oper
13998 + and type P.T.rep = TS.S.P.T.rep
13999 + and type P.T.rexp = TS.S.P.T.rexp
14000 + and type P.T.stm = TS.S.P.T.stm
14003 (I.instruction, I.C.cellset, I.operand, I.addressing_mode, CFG.cfg) TS.reducer
14004 @@ -27,11 +70,54 @@ end
14006 functor X86CompInstrExt
14007 ( structure I : X86INSTR
14008 - structure TS : MLTREE_STREAM
14010 - structure CFG : CONTROL_FLOW_GRAPH
14013 + structure TS : MLTREE_STREAM (* where T = I.T *)
14014 + where type T.Basis.cond = I.T.Basis.cond
14015 + and type T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
14016 + and type T.Basis.ext = I.T.Basis.ext
14017 + and type T.Basis.fcond = I.T.Basis.fcond
14018 + and type T.Basis.rounding_mode = I.T.Basis.rounding_mode
14019 + and type T.Constant.const = I.T.Constant.const
14020 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
14021 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
14022 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
14023 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
14024 + and type T.I.div_rounding_mode = I.T.I.div_rounding_mode
14025 + and type T.Region.region = I.T.Region.region
14026 + and type T.ccexp = I.T.ccexp
14027 + and type T.fexp = I.T.fexp
14028 + (* and type T.labexp = I.T.labexp *)
14029 + and type T.mlrisc = I.T.mlrisc
14030 + and type T.oper = I.T.oper
14031 + and type T.rep = I.T.rep
14032 + and type T.rexp = I.T.rexp
14033 + and type T.stm = I.T.stm
14034 + structure CFG : CONTROL_FLOW_GRAPH (* where P = TS.S.P and I = I *)
14035 + where type P.Client.pseudo_op = TS.S.P.Client.pseudo_op
14036 + and type P.T.Basis.cond = TS.S.P.T.Basis.cond
14037 + and type P.T.Basis.div_rounding_mode = TS.S.P.T.Basis.div_rounding_mode
14038 + and type P.T.Basis.ext = TS.S.P.T.Basis.ext
14039 + and type P.T.Basis.fcond = TS.S.P.T.Basis.fcond
14040 + and type P.T.Basis.rounding_mode = TS.S.P.T.Basis.rounding_mode
14041 + and type P.T.Constant.const = TS.S.P.T.Constant.const
14042 + and type ('s,'r,'f,'c) P.T.Extension.ccx = ('s,'r,'f,'c) TS.S.P.T.Extension.ccx
14043 + and type ('s,'r,'f,'c) P.T.Extension.fx = ('s,'r,'f,'c) TS.S.P.T.Extension.fx
14044 + and type ('s,'r,'f,'c) P.T.Extension.rx = ('s,'r,'f,'c) TS.S.P.T.Extension.rx
14045 + and type ('s,'r,'f,'c) P.T.Extension.sx = ('s,'r,'f,'c) TS.S.P.T.Extension.sx
14046 + and type P.T.I.div_rounding_mode = TS.S.P.T.I.div_rounding_mode
14047 + and type P.T.Region.region = TS.S.P.T.Region.region
14048 + and type P.T.ccexp = TS.S.P.T.ccexp
14049 + and type P.T.fexp = TS.S.P.T.fexp
14050 + (* and type P.T.labexp = TS.S.P.T.labexp *)
14051 + and type P.T.mlrisc = TS.S.P.T.mlrisc
14052 + and type P.T.oper = TS.S.P.T.oper
14053 + and type P.T.rep = TS.S.P.T.rep
14054 + and type P.T.rexp = TS.S.P.T.rexp
14055 + and type P.T.stm = TS.S.P.T.stm
14056 + where type I.addressing_mode = I.addressing_mode
14057 + and type I.ea = I.ea
14058 + and type I.instr = I.instr
14059 + and type I.instruction = I.instruction
14060 + and type I.operand = I.operand
14061 ) : X86COMP_INSTR_EXT =
14063 structure CFG = CFG
14064 diff --git a/x86/mltree/x86-fp.sml b/x86/mltree/x86-fp.sml
14065 index 60a8610..43977b8 100644
14066 --- a/x86/mltree/x86-fp.sml
14067 +++ b/x86/mltree/x86-fp.sml
14068 @@ -53,27 +53,88 @@
14069 * -- Allen Leung (leunga@cs.nyu.edu)
14074 + (structure X86Instr : X86INSTR
14075 + structure X86Props : INSN_PROPERTIES (* where I = X86Instr *)
14076 + where type I.addressing_mode = X86Instr.addressing_mode
14077 + and type I.ea = X86Instr.ea
14078 + and type I.instr = X86Instr.instr
14079 + and type I.instruction = X86Instr.instruction
14080 + and type I.operand = X86Instr.operand
14081 + structure Flowgraph : CONTROL_FLOW_GRAPH (* where I = X86Instr *)
14082 + where type I.addressing_mode = X86Instr.addressing_mode
14083 + and type I.ea = X86Instr.ea
14084 + and type I.instr = X86Instr.instr
14085 + and type I.instruction = X86Instr.instruction
14086 + and type I.operand = X86Instr.operand
14087 + structure Liveness : LIVENESS (* where CFG = Flowgraph *)
14088 + where type CFG.I.addressing_mode = Flowgraph.I.addressing_mode
14089 + and type CFG.I.ea = Flowgraph.I.ea
14090 + and type CFG.I.instr = Flowgraph.I.instr
14091 + and type CFG.I.instruction = Flowgraph.I.instruction
14092 + and type CFG.I.operand = Flowgraph.I.operand
14093 + and type CFG.P.Client.pseudo_op = Flowgraph.P.Client.pseudo_op
14094 + and type CFG.P.T.Basis.cond = Flowgraph.P.T.Basis.cond
14095 + and type CFG.P.T.Basis.div_rounding_mode = Flowgraph.P.T.Basis.div_rounding_mode
14096 + and type CFG.P.T.Basis.ext = Flowgraph.P.T.Basis.ext
14097 + and type CFG.P.T.Basis.fcond = Flowgraph.P.T.Basis.fcond
14098 + and type CFG.P.T.Basis.rounding_mode = Flowgraph.P.T.Basis.rounding_mode
14099 + and type CFG.P.T.Constant.const = Flowgraph.P.T.Constant.const
14100 + and type ('s,'r,'f,'c) CFG.P.T.Extension.ccx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.ccx
14101 + and type ('s,'r,'f,'c) CFG.P.T.Extension.fx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.fx
14102 + and type ('s,'r,'f,'c) CFG.P.T.Extension.rx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.rx
14103 + and type ('s,'r,'f,'c) CFG.P.T.Extension.sx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.sx
14104 + and type CFG.P.T.I.div_rounding_mode = Flowgraph.P.T.I.div_rounding_mode
14105 + and type CFG.P.T.Region.region = Flowgraph.P.T.Region.region
14106 + and type CFG.P.T.ccexp = Flowgraph.P.T.ccexp
14107 + and type CFG.P.T.fexp = Flowgraph.P.T.fexp
14108 + (* and type CFG.P.T.labexp = Flowgraph.P.T.labexp *)
14109 + and type CFG.P.T.mlrisc = Flowgraph.P.T.mlrisc
14110 + and type CFG.P.T.oper = Flowgraph.P.T.oper
14111 + and type CFG.P.T.rep = Flowgraph.P.T.rep
14112 + and type CFG.P.T.rexp = Flowgraph.P.T.rexp
14113 + and type CFG.P.T.stm = Flowgraph.P.T.stm
14114 + and type CFG.block = Flowgraph.block
14115 + and type CFG.block_kind = Flowgraph.block_kind
14116 + and type CFG.edge_info = Flowgraph.edge_info
14117 + and type CFG.edge_kind = Flowgraph.edge_kind
14118 + and type CFG.info = Flowgraph.info
14119 + structure Asm : INSTRUCTION_EMITTER (* where I = X86Instr and S.P = Flowgraph.P *)
14120 + where type I.addressing_mode = X86Instr.addressing_mode
14121 + and type I.ea = X86Instr.ea
14122 + and type I.instr = X86Instr.instr
14123 + and type I.instruction = X86Instr.instruction
14124 + and type I.operand = X86Instr.operand
14125 + where type S.P.Client.pseudo_op = Flowgraph.P.Client.pseudo_op
14126 + and type S.P.T.Basis.cond = Flowgraph.P.T.Basis.cond
14127 + and type S.P.T.Basis.div_rounding_mode = Flowgraph.P.T.Basis.div_rounding_mode
14128 + and type S.P.T.Basis.ext = Flowgraph.P.T.Basis.ext
14129 + and type S.P.T.Basis.fcond = Flowgraph.P.T.Basis.fcond
14130 + and type S.P.T.Basis.rounding_mode = Flowgraph.P.T.Basis.rounding_mode
14131 + and type S.P.T.Constant.const = Flowgraph.P.T.Constant.const
14132 + and type ('s,'r,'f,'c) S.P.T.Extension.ccx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.ccx
14133 + and type ('s,'r,'f,'c) S.P.T.Extension.fx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.fx
14134 + and type ('s,'r,'f,'c) S.P.T.Extension.rx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.rx
14135 + and type ('s,'r,'f,'c) S.P.T.Extension.sx = ('s,'r,'f,'c) Flowgraph.P.T.Extension.sx
14136 + and type S.P.T.I.div_rounding_mode = Flowgraph.P.T.I.div_rounding_mode
14137 + and type S.P.T.Region.region = Flowgraph.P.T.Region.region
14138 + and type S.P.T.ccexp = Flowgraph.P.T.ccexp
14139 + and type S.P.T.fexp = Flowgraph.P.T.fexp
14140 + (* and type S.P.T.labexp = Flowgraph.P.T.labexp *)
14141 + and type S.P.T.mlrisc = Flowgraph.P.T.mlrisc
14142 + and type S.P.T.oper = Flowgraph.P.T.oper
14143 + and type S.P.T.rep = Flowgraph.P.T.rep
14144 + and type S.P.T.rexp = Flowgraph.P.T.rexp
14145 + and type S.P.T.stm = Flowgraph.P.T.stm
14146 + ) : CFG_OPTIMIZATION =
14148 val debug = false (* set this to true to debug this module
14149 * set this to false for production use.
14151 val debugLiveness = true (* debug liveness analysis *)
14152 val debugDead = false (* debug dead code removal *)
14153 val sanityCheck = true
14156 - (structure X86Instr : X86INSTR
14157 - structure X86Props : INSN_PROPERTIES
14158 - where I = X86Instr
14159 - structure Flowgraph : CONTROL_FLOW_GRAPH
14160 - where I = X86Instr
14161 - structure Liveness : LIVENESS
14162 - where CFG = Flowgraph
14163 - structure Asm : INSTRUCTION_EMITTER
14164 - where I = X86Instr
14165 - and S.P = Flowgraph.P
14166 - ) : CFG_OPTIMIZATION =
14169 structure CFG = Flowgraph
14170 structure G = Graph
14171 structure I = X86Instr
14172 @@ -1670,5 +1731,3 @@ struct
14173 else repairCriticalEdges(Cfg)
14178 diff --git a/x86/mltree/x86.sml b/x86/mltree/x86.sml
14179 index bb55f6c..8c2220d 100644
14180 --- a/x86/mltree/x86.sml
14181 +++ b/x86/mltree/x86.sml
14182 @@ -32,19 +32,77 @@
14187 - val rewriteMemReg = true (* should we rewrite memRegs *)
14188 - val enableFastFPMode = true (* set this to false to disable the mode *)
14192 (structure X86Instr : X86INSTR
14193 - structure MLTreeUtils : MLTREE_UTILS
14194 - where T = X86Instr.T
14195 - structure ExtensionComp : MLTREE_EXTENSION_COMP
14196 - where I = X86Instr and T = X86Instr.T
14197 - structure MLTreeStream : MLTREE_STREAM
14198 - where T = ExtensionComp.T
14199 + structure MLTreeUtils : MLTREE_UTILS (* where T = X86Instr.T *)
14200 + where type T.Basis.cond = X86Instr.T.Basis.cond
14201 + and type T.Basis.div_rounding_mode = X86Instr.T.Basis.div_rounding_mode
14202 + and type T.Basis.ext = X86Instr.T.Basis.ext
14203 + and type T.Basis.fcond = X86Instr.T.Basis.fcond
14204 + and type T.Basis.rounding_mode = X86Instr.T.Basis.rounding_mode
14205 + and type T.Constant.const = X86Instr.T.Constant.const
14206 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) X86Instr.T.Extension.ccx
14207 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) X86Instr.T.Extension.fx
14208 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) X86Instr.T.Extension.rx
14209 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) X86Instr.T.Extension.sx
14210 + and type T.I.div_rounding_mode = X86Instr.T.I.div_rounding_mode
14211 + and type T.Region.region = X86Instr.T.Region.region
14212 + and type T.ccexp = X86Instr.T.ccexp
14213 + and type T.fexp = X86Instr.T.fexp
14214 + (* and type T.labexp = X86Instr.T.labexp *)
14215 + and type T.mlrisc = X86Instr.T.mlrisc
14216 + and type T.oper = X86Instr.T.oper
14217 + and type T.rep = X86Instr.T.rep
14218 + and type T.rexp = X86Instr.T.rexp
14219 + and type T.stm = X86Instr.T.stm
14220 + structure ExtensionComp : MLTREE_EXTENSION_COMP (* where I = X86Instr and T = X86Instr.T *)
14221 + where type I.addressing_mode = X86Instr.addressing_mode
14222 + and type I.ea = X86Instr.ea
14223 + and type I.instr = X86Instr.instr
14224 + and type I.instruction = X86Instr.instruction
14225 + and type I.operand = X86Instr.operand
14226 + where type T.Basis.cond = X86Instr.T.Basis.cond
14227 + and type T.Basis.div_rounding_mode = X86Instr.T.Basis.div_rounding_mode
14228 + and type T.Basis.ext = X86Instr.T.Basis.ext
14229 + and type T.Basis.fcond = X86Instr.T.Basis.fcond
14230 + and type T.Basis.rounding_mode = X86Instr.T.Basis.rounding_mode
14231 + and type T.Constant.const = X86Instr.T.Constant.const
14232 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) X86Instr.T.Extension.ccx
14233 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) X86Instr.T.Extension.fx
14234 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) X86Instr.T.Extension.rx
14235 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) X86Instr.T.Extension.sx
14236 + and type T.I.div_rounding_mode = X86Instr.T.I.div_rounding_mode
14237 + and type T.Region.region = X86Instr.T.Region.region
14238 + and type T.ccexp = X86Instr.T.ccexp
14239 + and type T.fexp = X86Instr.T.fexp
14240 + (* and type T.labexp = X86Instr.T.labexp *)
14241 + and type T.mlrisc = X86Instr.T.mlrisc
14242 + and type T.oper = X86Instr.T.oper
14243 + and type T.rep = X86Instr.T.rep
14244 + and type T.rexp = X86Instr.T.rexp
14245 + and type T.stm = X86Instr.T.stm
14246 + structure MLTreeStream : MLTREE_STREAM (* where T = ExtensionComp.T *)
14247 + where type T.Basis.cond = ExtensionComp.T.Basis.cond
14248 + and type T.Basis.div_rounding_mode = ExtensionComp.T.Basis.div_rounding_mode
14249 + and type T.Basis.ext = ExtensionComp.T.Basis.ext
14250 + and type T.Basis.fcond = ExtensionComp.T.Basis.fcond
14251 + and type T.Basis.rounding_mode = ExtensionComp.T.Basis.rounding_mode
14252 + and type T.Constant.const = ExtensionComp.T.Constant.const
14253 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) ExtensionComp.T.Extension.ccx
14254 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) ExtensionComp.T.Extension.fx
14255 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) ExtensionComp.T.Extension.rx
14256 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) ExtensionComp.T.Extension.sx
14257 + and type T.I.div_rounding_mode = ExtensionComp.T.I.div_rounding_mode
14258 + and type T.Region.region = ExtensionComp.T.Region.region
14259 + and type T.ccexp = ExtensionComp.T.ccexp
14260 + and type T.fexp = ExtensionComp.T.fexp
14261 + (* and type T.labexp = ExtensionComp.T.labexp *)
14262 + and type T.mlrisc = ExtensionComp.T.mlrisc
14263 + and type T.oper = ExtensionComp.T.oper
14264 + and type T.rep = ExtensionComp.T.rep
14265 + and type T.rexp = ExtensionComp.T.rexp
14266 + and type T.stm = ExtensionComp.T.stm
14267 datatype arch = Pentium | PentiumPro | PentiumII | PentiumIII
14268 val arch : arch ref
14270 @@ -65,6 +123,9 @@ functor X86
14271 val rewriteMemReg : bool
14274 + val rewriteMemReg = true (* should we rewrite memRegs *)
14275 + val enableFastFPMode = true (* set this to false to disable the mode *)
14277 structure I = X86Instr
14279 structure TS = ExtensionComp.TS
14280 @@ -2011,5 +2072,3 @@ struct
14286 diff --git a/x86/omit-frameptr/x86omit-frameptr.sml b/x86/omit-frameptr/x86omit-frameptr.sml
14287 index be5f2a4..c14cc0b 100644
14288 --- a/x86/omit-frameptr/x86omit-frameptr.sml
14289 +++ b/x86/omit-frameptr/x86omit-frameptr.sml
14292 functor X86OmitFramePointer (
14293 structure I : X86INSTR
14294 - structure CFG : CONTROL_FLOW_GRAPH where I = I
14295 - structure MemRegs : MEMORY_REGISTERS where I=I
14296 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I *)
14297 + where type I.addressing_mode = I.addressing_mode
14298 + and type I.ea = I.ea
14299 + and type I.instr = I.instr
14300 + and type I.instruction = I.instruction
14301 + and type I.operand = I.operand
14302 + structure MemRegs : MEMORY_REGISTERS (* where I = I *)
14303 + where type I.Constant.const = I.Constant.const
14304 + and type I.Region.region = I.Region.region
14305 + and type I.T.Basis.cond = I.T.Basis.cond
14306 + and type I.T.Basis.div_rounding_mode = I.T.Basis.div_rounding_mode
14307 + and type I.T.Basis.ext = I.T.Basis.ext
14308 + and type I.T.Basis.fcond = I.T.Basis.fcond
14309 + and type I.T.Basis.rounding_mode = I.T.Basis.rounding_mode
14310 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) I.T.Extension.ccx
14311 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) I.T.Extension.fx
14312 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) I.T.Extension.rx
14313 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) I.T.Extension.sx
14314 + and type I.T.I.div_rounding_mode = I.T.I.div_rounding_mode
14315 + and type I.T.ccexp = I.T.ccexp
14316 + and type I.T.fexp = I.T.fexp
14317 + (* and type I.T.labexp = I.T.labexp *)
14318 + and type I.T.mlrisc = I.T.mlrisc
14319 + and type I.T.oper = I.T.oper
14320 + and type I.T.rep = I.T.rep
14321 + and type I.T.rexp = I.T.rexp
14322 + and type I.T.stm = I.T.stm
14323 + (* and type I.addressing_mode = I.addressing_mode *)
14324 + and type I.binaryOp = I.binaryOp
14325 + and type I.bitOp = I.bitOp
14326 + and type I.cond = I.cond
14327 + and type I.fbinOp = I.fbinOp
14328 + and type I.fenvOp = I.fenvOp
14329 + and type I.fibinOp = I.fibinOp
14330 + and type I.fsize = I.fsize
14331 + and type I.funOp = I.funOp
14332 + and type I.instr = I.instr
14333 + and type I.instruction = I.instruction
14334 + and type I.isize = I.isize
14335 + and type I.move = I.move
14336 + and type I.multDivOp = I.multDivOp
14337 + and type I.operand = I.operand
14338 + and type I.shiftOp = I.shiftOp
14339 + and type I.unaryOp = I.unaryOp
14340 val memRegBase : CellsBasis.cell option): OMIT_FRAME_POINTER =
14342 structure CFG = CFG
14343 diff --git a/x86/ra/x86RA.sml b/x86/ra/x86RA.sml
14344 index 806296f..20db98c 100644
14345 --- a/x86/ra/x86RA.sml
14346 +++ b/x86/ra/x86RA.sml
14347 @@ -109,13 +109,45 @@
14350 ( structure I : X86INSTR
14351 - structure InsnProps : INSN_PROPERTIES
14353 - structure CFG : CONTROL_FLOW_GRAPH
14355 - structure Asm : INSTRUCTION_EMITTER
14358 + structure InsnProps : INSN_PROPERTIES (* where I = I *)
14359 + where type I.addressing_mode = I.addressing_mode
14360 + and type I.ea = I.ea
14361 + and type I.instr = I.instr
14362 + and type I.instruction = I.instruction
14363 + and type I.operand = I.operand
14364 + structure CFG : CONTROL_FLOW_GRAPH (* where I = I *)
14365 + where type I.addressing_mode = I.addressing_mode
14366 + and type I.ea = I.ea
14367 + and type I.instr = I.instr
14368 + and type I.instruction = I.instruction
14369 + and type I.operand = I.operand
14370 + structure Asm : INSTRUCTION_EMITTER (* where I = I and S.P = CFG.P *)
14371 + where type I.addressing_mode = I.addressing_mode
14372 + and type I.ea = I.ea
14373 + and type I.instr = I.instr
14374 + and type I.instruction = I.instruction
14375 + and type I.operand = I.operand
14376 + where type S.P.Client.pseudo_op = CFG.P.Client.pseudo_op
14377 + and type S.P.T.Basis.cond = CFG.P.T.Basis.cond
14378 + and type S.P.T.Basis.div_rounding_mode = CFG.P.T.Basis.div_rounding_mode
14379 + and type S.P.T.Basis.ext = CFG.P.T.Basis.ext
14380 + and type S.P.T.Basis.fcond = CFG.P.T.Basis.fcond
14381 + and type S.P.T.Basis.rounding_mode = CFG.P.T.Basis.rounding_mode
14382 + and type S.P.T.Constant.const = CFG.P.T.Constant.const
14383 + and type ('s,'r,'f,'c) S.P.T.Extension.ccx = ('s,'r,'f,'c) CFG.P.T.Extension.ccx
14384 + and type ('s,'r,'f,'c) S.P.T.Extension.fx = ('s,'r,'f,'c) CFG.P.T.Extension.fx
14385 + and type ('s,'r,'f,'c) S.P.T.Extension.rx = ('s,'r,'f,'c) CFG.P.T.Extension.rx
14386 + and type ('s,'r,'f,'c) S.P.T.Extension.sx = ('s,'r,'f,'c) CFG.P.T.Extension.sx
14387 + and type S.P.T.I.div_rounding_mode = CFG.P.T.I.div_rounding_mode
14388 + and type S.P.T.Region.region = CFG.P.T.Region.region
14389 + and type S.P.T.ccexp = CFG.P.T.ccexp
14390 + and type S.P.T.fexp = CFG.P.T.fexp
14391 + (* and type S.P.T.labexp = CFG.P.T.labexp *)
14392 + and type S.P.T.mlrisc = CFG.P.T.mlrisc
14393 + and type S.P.T.oper = CFG.P.T.oper
14394 + and type S.P.T.rep = CFG.P.T.rep
14395 + and type S.P.T.rexp = CFG.P.T.rexp
14396 + and type S.P.T.stm = CFG.P.T.stm
14398 (* Spilling heuristics determines which node should be spilled
14399 * You can use Chaitin, ChowHenessey, or one of your own.
14400 @@ -126,7 +158,12 @@ functor X86RA
14401 * spill code. You can use RASpill, or RASpillWithRenaming,
14402 * or write your own if you are feeling adventurous.
14404 - structure Spill : RA_SPILL where I = I
14405 + structure Spill : RA_SPILL (* where I = I *)
14406 + where type I.addressing_mode = I.addressing_mode
14407 + and type I.ea = I.ea
14408 + and type I.instr = I.instr
14409 + and type I.instruction = I.instruction
14410 + and type I.operand = I.operand
14413 type spill_info (* user-defined abstract type *)
14414 @@ -304,17 +341,16 @@ struct
14415 (* This is the generic register allocator *)
14419 - (MemoryRA (* for memory coalescing *)
14420 + (structure SpillHeuristics = SpillHeur
14421 + structure Flowgraph = MemoryRA (* for memory coalescing *)
14422 (RADeadCodeElim (* do the funky dead code elimination stuff *)
14424 + (structure Flowgraph = ClusterRA
14425 (structure Flowgraph = CFG
14426 structure Asm = Asm
14427 structure InsnProps = InsnProps
14428 structure Spill = Spill
14431 - (fun cellkind CB.GP = true | cellkind _ = false
14432 + fun cellkind CB.GP = true | cellkind _ = false
14433 val deadRegs = deadRegs
14434 val affectedBlocks = affectedBlocks
14435 val spillInit = spillInit
14436 diff --git a/x86/ra/x86Rewrite.sig b/x86/ra/x86Rewrite.sig
14437 index eaacca7..ddb6486 100644
14438 --- a/x86/ra/x86Rewrite.sig
14439 +++ b/x86/ra/x86Rewrite.sig
14441 signature X86REWRITE = sig
14442 structure I : X86INSTR
14443 - structure CB : CELLS_BASIS = CellsBasis
14444 + structure CB : CELLS_BASIS (* = CellsBasis *)
14445 + where type CellSet.cellset = CellsBasis.CellSet.cellset
14446 + and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
14447 + and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
14448 + and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
14449 + and type cell = CellsBasis.cell
14450 + and type cellColor = CellsBasis.cellColor
14451 + and type cellkind = CellsBasis.cellkind
14452 + and type cellkindDesc = CellsBasis.cellkindDesc
14453 + and type cellkindInfo = CellsBasis.cellkindInfo
14454 val rewriteUse : I.instruction * CB.cell * CB.cell -> I.instruction
14455 val rewriteDef : I.instruction * CB.cell * CB.cell -> I.instruction
14456 val frewriteUse : I.instruction * CB.cell * CB.cell -> I.instruction
14457 diff --git a/x86/ra/x86SpillInstr.sml b/x86/ra/x86SpillInstr.sml
14458 index dcf2305..ea787b1 100644
14459 --- a/x86/ra/x86SpillInstr.sml
14460 +++ b/x86/ra/x86SpillInstr.sml
14462 * introduced before.
14464 functor X86SpillInstr(structure Instr: X86INSTR
14465 - structure Props: INSN_PROPERTIES where I = Instr
14466 + structure Props: INSN_PROPERTIES (* where I = Instr *)
14467 + where type I.addressing_mode = Instr.addressing_mode
14468 + and type I.ea = Instr.ea
14469 + and type I.instr = Instr.instr
14470 + and type I.instruction = Instr.instruction
14471 + and type I.operand = Instr.operand
14472 ) : ARCH_SPILL_INSTR = struct
14474 structure I = Instr
14475 diff --git a/x86/x86MC.sml b/x86/x86MC.sml
14476 index f8a67ab..27df711 100644
14477 --- a/x86/x86MC.sml
14478 +++ b/x86/x86MC.sml
14481 functor X86MCEmitter
14482 (structure Instr : X86INSTR
14483 - structure Shuffle : X86SHUFFLE where I = Instr
14484 - structure MLTreeEval : MLTREE_EVAL where T = Instr.T
14485 - structure MemRegs : MEMORY_REGISTERS where I = Instr
14486 + structure Shuffle : X86SHUFFLE (* where I = Instr *)
14487 + where type I.Constant.const = Instr.Constant.const
14488 + and type I.Region.region = Instr.Region.region
14489 + and type I.T.Basis.cond = Instr.T.Basis.cond
14490 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
14491 + and type I.T.Basis.ext = Instr.T.Basis.ext
14492 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
14493 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
14494 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
14495 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
14496 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
14497 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
14498 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
14499 + and type I.T.ccexp = Instr.T.ccexp
14500 + and type I.T.fexp = Instr.T.fexp
14501 + (* and type I.T.labexp = Instr.T.labexp *)
14502 + and type I.T.mlrisc = Instr.T.mlrisc
14503 + and type I.T.oper = Instr.T.oper
14504 + and type I.T.rep = Instr.T.rep
14505 + and type I.T.rexp = Instr.T.rexp
14506 + and type I.T.stm = Instr.T.stm
14507 + (* and type I.addressing_mode = Instr.addressing_mode *)
14508 + and type I.binaryOp = Instr.binaryOp
14509 + and type I.bitOp = Instr.bitOp
14510 + and type I.cond = Instr.cond
14511 + and type I.fbinOp = Instr.fbinOp
14512 + and type I.fenvOp = Instr.fenvOp
14513 + and type I.fibinOp = Instr.fibinOp
14514 + and type I.fsize = Instr.fsize
14515 + and type I.funOp = Instr.funOp
14516 + and type I.instr = Instr.instr
14517 + and type I.instruction = Instr.instruction
14518 + and type I.isize = Instr.isize
14519 + and type I.move = Instr.move
14520 + and type I.multDivOp = Instr.multDivOp
14521 + and type I.operand = Instr.operand
14522 + and type I.shiftOp = Instr.shiftOp
14523 + and type I.unaryOp = Instr.unaryOp
14524 + structure MLTreeEval : MLTREE_EVAL (* where T = Instr.T *)
14525 + where type T.Basis.cond = Instr.T.Basis.cond
14526 + and type T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
14527 + and type T.Basis.ext = Instr.T.Basis.ext
14528 + and type T.Basis.fcond = Instr.T.Basis.fcond
14529 + and type T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
14530 + and type T.Constant.const = Instr.T.Constant.const
14531 + and type ('s,'r,'f,'c) T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
14532 + and type ('s,'r,'f,'c) T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
14533 + and type ('s,'r,'f,'c) T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
14534 + and type ('s,'r,'f,'c) T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
14535 + and type T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
14536 + and type T.Region.region = Instr.T.Region.region
14537 + and type T.ccexp = Instr.T.ccexp
14538 + and type T.fexp = Instr.T.fexp
14539 + (* and type T.labexp = Instr.T.labexp *)
14540 + and type T.mlrisc = Instr.T.mlrisc
14541 + and type T.oper = Instr.T.oper
14542 + and type T.rep = Instr.T.rep
14543 + and type T.rexp = Instr.T.rexp
14544 + and type T.stm = Instr.T.stm
14545 + structure MemRegs : MEMORY_REGISTERS (* where I = Instr *)
14546 + where type I.Constant.const = Instr.Constant.const
14547 + and type I.Region.region = Instr.Region.region
14548 + and type I.T.Basis.cond = Instr.T.Basis.cond
14549 + and type I.T.Basis.div_rounding_mode = Instr.T.Basis.div_rounding_mode
14550 + and type I.T.Basis.ext = Instr.T.Basis.ext
14551 + and type I.T.Basis.fcond = Instr.T.Basis.fcond
14552 + and type I.T.Basis.rounding_mode = Instr.T.Basis.rounding_mode
14553 + and type ('s,'r,'f,'c) I.T.Extension.ccx = ('s,'r,'f,'c) Instr.T.Extension.ccx
14554 + and type ('s,'r,'f,'c) I.T.Extension.fx = ('s,'r,'f,'c) Instr.T.Extension.fx
14555 + and type ('s,'r,'f,'c) I.T.Extension.rx = ('s,'r,'f,'c) Instr.T.Extension.rx
14556 + and type ('s,'r,'f,'c) I.T.Extension.sx = ('s,'r,'f,'c) Instr.T.Extension.sx
14557 + and type I.T.I.div_rounding_mode = Instr.T.I.div_rounding_mode
14558 + and type I.T.ccexp = Instr.T.ccexp
14559 + and type I.T.fexp = Instr.T.fexp
14560 + (* and type I.T.labexp = Instr.T.labexp *)
14561 + and type I.T.mlrisc = Instr.T.mlrisc
14562 + and type I.T.oper = Instr.T.oper
14563 + and type I.T.rep = Instr.T.rep
14564 + and type I.T.rexp = Instr.T.rexp
14565 + and type I.T.stm = Instr.T.stm
14566 + (* and type I.addressing_mode = Instr.addressing_mode *)
14567 + and type I.binaryOp = Instr.binaryOp
14568 + and type I.bitOp = Instr.bitOp
14569 + and type I.cond = Instr.cond
14570 + and type I.fbinOp = Instr.fbinOp
14571 + and type I.fenvOp = Instr.fenvOp
14572 + and type I.fibinOp = Instr.fibinOp
14573 + and type I.fsize = Instr.fsize
14574 + and type I.funOp = Instr.funOp
14575 + and type I.instr = Instr.instr
14576 + and type I.instruction = Instr.instruction
14577 + and type I.isize = Instr.isize
14578 + and type I.move = Instr.move
14579 + and type I.multDivOp = Instr.multDivOp
14580 + and type I.operand = Instr.operand
14581 + and type I.shiftOp = Instr.shiftOp
14582 + and type I.unaryOp = Instr.unaryOp
14583 val memRegBase : CellsBasis.cell option
14584 - structure AsmEmitter : INSTRUCTION_EMITTER where I = Instr) : MC_EMIT =
14585 + structure AsmEmitter : INSTRUCTION_EMITTER (* where I = Instr *)
14586 + where type I.addressing_mode = Instr.addressing_mode
14587 + and type I.ea = Instr.ea
14588 + and type I.instr = Instr.instr
14589 + and type I.instruction = Instr.instruction
14590 + and type I.operand = Instr.operand
14593 structure I = Instr