Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlrisc-lib / MLRISC.patch
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
5 @@ -1,4 +1,4 @@
6 -#!/usr/local/bin/perl
7 +#!/usr/bin/perl
8 #
9 # This tool generates HTML pages in my own format given a stylized Latex file.
10 #
11 diff --git a/README.mlton b/README.mlton
12 new file mode 100644
13 index 0000000..8d31e04
14 --- /dev/null
15 +++ b/README.mlton
16 @@ -0,0 +1,8 @@
17 +The following changes were made to the MLRISC Library, in addition to
18 +deriving the `.mlb` files from the `.cm` files:
19 +
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 =
30 sig
31
32 eqtype edgekind
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
44
45 datatype cell =
46 - LINK of region
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
51 + LINK of cell 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
62
63 val reset : (unit -> C.cell) -> unit
64
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
71
72 datatype cell =
73 - LINK of region
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
78 + LINK of cell 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 *)
85 -
86 - withtype region = cell ref
87 - and edges = (edgekind * int * region) list
88 + type region = cell ref
89 + type edges = (edgekind * int * region) list
90
91 fun error msg = MLRiscErrorMsg.error("PointsTo",msg)
92
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
97 @@ -5,10 +5,67 @@
98 *)
99 functor AlphaJumps
100 (structure Instr : ALPHAINSTR
101 - structure Shuffle : ALPHASHUFFLE
102 - where I = Instr
103 - structure MLTreeEval : MLTREE_EVAL
104 - where T = Instr.T
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
166 ) : SDI_JUMPS =
167 struct
168 structure I = Instr
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
173 @@ -6,12 +6,88 @@
174
175
176 functor AlphaAsmEmitter(structure S : INSTRUCTION_STREAM
177 - structure Instr : ALPHAINSTR
178 - where T = S.P.T
179 - structure Shuffle : ALPHASHUFFLE
180 - where I = Instr
181 - structure MLTreeEval : MLTREE_EVAL
182 - where T = Instr.T
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 =
266 struct
267 structure I = Instr
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
272 @@ -6,7 +6,27 @@
273
274
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! *)
303 fun eByteW w =
304 let val i = !loc
305 + val w = W.toLargeWord w
306 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
307
308 fun doNothing _ = ()
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
313 @@ -1,6 +1,26 @@
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 =
339
340 struct
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
345 @@ -8,7 +8,16 @@
346 signature ALPHAINSTR =
347 sig
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
360 structure T : MLTREE
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
367 @@ -6,8 +6,48 @@
368
369 functor AlphaProps
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
415 ):INSN_PROPERTIES =
416 struct
417 structure I = Instr
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
422 @@ -11,11 +11,72 @@
423
424 functor Alpha
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
497
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.
503 *)
504 - functor Multiply32 = MLTreeMult
505 - (structure I = I
506 +
507 + (* signed, trapping version of multiply and divide *)
508 + structure Multiply32 = struct
509 + structure I = I
510 structure T = T
511 structure CB = CellsBasis
512
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}]
516 end
517 - )
518 + end
519
520 - functor Multiply64 = MLTreeMult
521 - (structure I = I
522 + structure Multiply64 = struct
523 + structure I = I
524 structure T = T
525 structure CB = CellsBasis
526
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}]
531 - )
532 + end
533
534 (* signed, trapping version of multiply and divide *)
535 - structure Mult32 = Multiply32
536 - (val trapping = true
537 + structure Mult32 = MLTreeMult
538 + (open Multiply32
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}]
543 val sh1addv = NONE
544 val sh2addv = NONE
545 val sh3addv = NONE
546 - )
547 - (val signed = true)
548 +
549 + val signed = true)
550
551 (* non-trapping version of multiply and divide *)
552 - functor Mul32 = Multiply32
553 - (val trapping = false
554 + structure Mul32 = struct
555 + open Multiply32
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}])
564 - )
565 - structure Mulu32 = Mul32(val signed = false)
566 - structure Muls32 = Mul32(val signed = true)
567 + end
568 + structure Mulu32 = MLTreeMult(open Mul32 val signed = false)
569 + structure Muls32 = MLTreeMult(open Mul32 val signed = true)
570
571 (* signed, trapping version of multiply and divide *)
572 - structure Mult64 = Multiply64
573 - (val trapping = true
574 + structure Mult64 = MLTreeMult
575 + (open Multiply64
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}]
580 val sh1addv = NONE
581 val sh2addv = NONE
582 val sh3addv = NONE
583 - )
584 - (val signed = true)
585 +
586 + val signed = true)
587
588 (* unsigned, non-trapping version of multiply and divide *)
589 - functor Mul64 = Multiply64
590 - (val trapping = false
591 + structure Mul64 = struct
592 + open Multiply64
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}])
601 - )
602 - structure Mulu64 = Mul64(val signed = false)
603 - structure Muls64 = Mul64(val signed = true)
604 + end
605 + structure Mulu64 = MLTreeMult(open Mul64 val signed = false)
606 + structure Muls64 = MLTreeMult(open Mul64 val signed = true)
607
608 (*
609 * The main stuff
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 =
615 sig
616 structure I : ALPHAINSTR
617 structure T : MLTREE
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
639 - sharing C = I.C
640 - sharing I.T = T
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
654
655 type reduceOpnd = I.operand -> CB.cell
656
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
661 @@ -1,8 +1,69 @@
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 =
731 struct
732 structure I = Instr
733 structure C = I.C
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
738 @@ -5,8 +5,61 @@
739
740 functor AMD64MCFn(
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*)
800 ) : MC_EMIT =
801 struct
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
806 @@ -5,9 +5,71 @@
807
808 functor AMD64Jumps
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
877 + ) : SDI_JUMPS =
878 struct
879 structure I = Instr
880 structure C = I.C
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
885 @@ -6,12 +6,85 @@
886
887
888 functor AMD64AsmEmitter(structure S : INSTRUCTION_STREAM
889 - structure Instr : AMD64INSTR
890 - where T = S.P.T
891 - structure Shuffle : AMD64SHUFFLE
892 - where I = Instr
893 - structure MLTreeEval : MLTREE_EVAL
894 - where T = Instr.T
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 =
975 struct
976 structure I = Instr
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
981 @@ -7,7 +7,27 @@
982 functor AMD64DarwinPseudoOps (
983
984 structure T : MLTREE
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
1007
1008 ) : PSEUDO_OPS_BASIS = struct
1009
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
1014 @@ -6,7 +6,27 @@
1015
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
1041 structure T = T
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
1047 @@ -7,11 +7,54 @@
1048
1049 signature AMD64COMP_INSTR_EXT = sig
1050 structure I : AMD64INSTR
1051 - structure TS : MLTREE_STREAM
1052 - where T = I.T
1053 - structure CFG : CONTROL_FLOW_GRAPH
1054 - where I = I
1055 - and P = TS.S.P
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
1104
1105 type reducer =
1106 (I.instruction, I.C.cellset, I.operand, I.addressing_mode, CFG.cfg) TS.reducer
1107 @@ -26,11 +69,54 @@ end
1108
1109 functor AMD64CompInstrExt
1110 ( structure I : AMD64INSTR
1111 - structure TS : MLTREE_STREAM
1112 - where T = I.T
1113 - structure CFG : CONTROL_FLOW_GRAPH
1114 - where P = TS.S.P
1115 - and I = I
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 =
1165 struct
1166 structure CFG = CFG
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
1171 @@ -8,7 +8,16 @@
1172 signature AMD64INSTR =
1173 sig
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
1219 ) : PEEPHOLE =
1220 struct
1221 structure I = Instr
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
1228
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
1252 ): PEEPHOLE =
1253 struct
1254
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 =
1260
1261 functor AMD64Props (
1262 structure Instr : AMD64INSTR
1263 - structure MLTreeHash : MLTREE_HASH
1264 - where T = Instr.T
1265 - structure MLTreeEval : MLTREE_EVAL
1266 - where T = Instr.T
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 =
1310 struct
1311
1312 @@ -42,7 +80,7 @@ functor AMD64Props (
1313 | ( I.CALL {cutsTo=_::_, ...} | I.CALLQ {cutsTo=_::_, ...} ) =>
1314 IK_CALL_WITH_CUTS
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
1325 @@ -9,10 +9,53 @@
1326 functor AMD64Gen (
1327
1328 structure I : AMD64INSTR
1329 - structure MLTreeUtils : MLTREE_UTILS
1330 - where T = I.T
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
1380
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
1387 @@ -10,9 +10,51 @@
1388 *)
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 =
1398 (*
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
1439 *)
1440 struct
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
1445 @@ -6,15 +6,51 @@
1446 functor AMD64RegAlloc (
1447 structure I : AMD64INSTR
1448 structure SpillHeur : RA_SPILL_HEURISTICS
1449 - structure Props : AMD64INSN_PROPERTIES
1450 - where I = I
1451 - structure CFG : CONTROL_FLOW_GRAPH
1452 - where I = I
1453 - structure Spill : RA_SPILL
1454 - where I = I
1455 - structure Asm : INSTRUCTION_EMITTER
1456 - where I = I
1457 - and S.P = CFG.P
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
1503
1504 type spill_info
1505 datatype spill_operand_kind = SPILL_LOC
1506 @@ -138,17 +174,16 @@ functor AMD64RegAlloc (
1507 (* use the standard register allocator *)
1508 structure RA =
1509 RegisterAllocator
1510 - (SpillHeur)
1511 - (MemoryRA
1512 + (structure SpillHeuristics = SpillHeur
1513 + structure Flowgraph = MemoryRA
1514 (RADeadCodeElim
1515 - (ClusterRA
1516 + (structure Flowgraph = ClusterRA
1517 (structure Flowgraph = CFG
1518 structure Asm = Asm
1519 structure InsnProps = Props
1520 structure Spill = Spill
1521 )
1522 - )
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
1532 @@ -6,8 +6,12 @@
1533
1534 functor AMD64SpillInstr (
1535 structure I : AMD64INSTR
1536 - structure Props : AMD64INSN_PROPERTIES
1537 - where I = I
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
1544
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
1551 @@ -8,13 +8,45 @@
1552
1553 functor BBSched2
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
1559 - where I = CFG.I
1560 - structure Props : INSN_PROPERTIES
1561 - where I = CFG.I
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
1601 ) =
1602 struct
1603
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
1608 @@ -7,7 +7,7 @@
1609 signature SDI_JUMPS = sig
1610 structure I : INSTRUCTIONS
1611 structure C : CELLS
1612 - sharing I.C = C
1613 + (* sharing I.C = C *)
1614
1615 val branchDelayedArch : bool
1616
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
1621 @@ -9,18 +9,79 @@
1622
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
1629 - where I = CFG.I
1630 - structure DelaySlot : DELAY_SLOT_PROPERTIES
1631 - where I = CFG.I
1632 - structure Props : INSN_PROPERTIES
1633 - where I = CFG.I
1634 - structure Asm : INSTRUCTION_EMITTER
1635 - where I = CFG.I
1636 - and S = Emitter.S
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
1710 ) : BBSCHED =
1711 struct
1712
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
1717 @@ -26,14 +26,31 @@
1718 functor BackPatch
1719 (structure CodeString : CODE_STRING
1720 structure Jumps : SDI_JUMPS
1721 - structure Props : INSN_PROPERTIES
1722 - where I = Jumps.I
1723 - structure Emitter : MC_EMIT
1724 - where I = Props.I
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
1753 + ) =
1754 struct
1755 structure I = Jumps.I
1756 structure C = I.C
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
1761 @@ -5,10 +5,13 @@
1762
1763 functor BlockPlacement
1764 (structure CFG : CONTROL_FLOW_GRAPH
1765 - structure Props : INSN_PROPERTIES
1766 - where I = CFG.I)
1767 -
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 =
1776
1777 struct
1778 structure CFG = CFG
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
1783 @@ -9,8 +9,12 @@
1784 functor CheckPlacementFn (
1785
1786 structure CFG : CONTROL_FLOW_GRAPH
1787 - structure InsnProps : INSN_PROPERTIES
1788 - where I = CFG.I
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
1795
1796 ) : sig
1797
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
1802 @@ -12,8 +12,12 @@
1803 functor JumpChainElimFn (
1804
1805 structure CFG : CONTROL_FLOW_GRAPH
1806 - structure InsnProps : INSN_PROPERTIES
1807 - where I = CFG.I
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
1814
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
1821 @@ -12,8 +12,12 @@
1822 functor WeightedBlockPlacementFn (
1823
1824 structure CFG : CONTROL_FLOW_GRAPH
1825 - structure InsnProps : INSN_PROPERTIES
1826 - where I = CFG.I
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
1833
1834 ) : BLOCK_PLACEMENT = struct
1835
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 = []
1846
1847 val frameAlignB = 16
1848
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 =
1854
1855 structure T : MLTREE
1856 structure Gen : C_CALL_GEN
1857 - where T = T
1858 + (* where T = T *)
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
1879
1880 datatype c_arg = datatype Gen.c_arg
1881
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
1886 @@ -6,7 +6,27 @@
1887 *)
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 =
1912 struct
1913 structure T = T
1914
1915 diff --git a/cm/Lib.cm b/cm/Lib.cm
1916 index 1105cf0..9d28dc1 100644
1917 --- a/cm/Lib.cm
1918 +++ b/cm/Lib.cm
1919 @@ -1,5 +1,6 @@
1920 (* This file is created by makeallcm *)
1921 Library
1922 + signature ARRAY_NONEQ
1923 signature ANNOTATIONS
1924 signature BITSET
1925 signature CACHE_REF
1926 @@ -37,6 +38,7 @@ is
1927 smlnj-lib.cm
1928 Control.cm
1929 #endif
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
1937 --- /dev/null
1938 +++ b/cm/proxyLib.cm
1939 @@ -0,0 +1,61 @@
1940 +Group
1941 + group(proxyGrp.cm)
1942 +is
1943 + proxyGrp.cm
1944 +(
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:.)
2000 +)
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
2005 @@ -13,9 +13,34 @@
2006
2007 functor CFGEmit
2008 (structure E : INSTRUCTION_EMITTER
2009 - structure CFG : CONTROL_FLOW_GRAPH
2010 - where I = E.I
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 =
2040 struct
2041 structure CFG = CFG
2042
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
2052 - where I = I
2053 - and P = P
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
2081 +
2082 (*
2083 * This creates an emitter which can be used to build a CFG incrementally
2084 *)
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
2090 - where I = Props.I
2091 - and P = Stream.P
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 =
2120 struct
2121 structure CFG = CFG
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
2126 @@ -10,8 +10,18 @@
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 =
2145 struct
2146
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
2151 @@ -4,10 +4,18 @@
2152 *)
2153 functor CFGCountCopies
2154 ( structure CFG : CONTROL_FLOW_GRAPH
2155 - structure InsnProps : INSN_PROPERTIES
2156 - where I = CFG.I
2157 - structure SdiJumps : SDI_JUMPS
2158 - where I = CFG.I
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 =
2172 struct
2173 structure CFG = CFG
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
2178 @@ -7,8 +7,12 @@
2179
2180 functor CFGExpandCopies
2181 (structure CFG : CONTROL_FLOW_GRAPH
2182 - structure Shuffle : SHUFFLE
2183 - where I = CFG.I
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 =
2191 struct
2192 structure CFG = CFG
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
2197 @@ -3,8 +3,12 @@
2198 *)
2199 functor CFGPeephole
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 =
2210 struct
2211 structure CFG = CFG
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
2216 @@ -5,9 +5,33 @@
2217 signature PRINT_FLOWGRAPH =
2218 sig
2219 structure Asm : INSTRUCTION_EMITTER
2220 - structure CFG : CONTROL_FLOW_GRAPH
2221 - where I = Asm.I
2222 - and P = Asm.S.P
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
2250
2251 val printCFG : TextIO.outstream -> string -> CFG.cfg -> unit
2252 end
2253 @@ -15,9 +39,33 @@ end
2254
2255 functor PrintFlowgraph
2256 (structure Asm : INSTRUCTION_EMITTER
2257 - structure CFG : CONTROL_FLOW_GRAPH
2258 - where I = Asm.I
2259 - and P = Asm.S.P
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 =
2288 struct
2289 structure Asm = Asm
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
2294 @@ -7,8 +7,27 @@
2295
2296 functor PseudoOpsBig
2297 ( structure T : MLTREE
2298 - structure MLTreeEval : MLTREE_EVAL
2299 - where T = T
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
2328 @@ -7,8 +7,27 @@
2329
2330 functor PseudoOpsLittle
2331 ( structure T : MLTREE
2332 - structure MLTreeEval : MLTREE_EVAL
2333 - where T = T
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
2362 @@ -8,7 +8,27 @@
2363
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
2388
2389 type pseudo_op = (T.labexp, Client.pseudo_op) PseudoOpsBasisTyp.pseudo_op
2390
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 (
2396
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}
2404
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
2412
2413 structure C : CELLS
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
2426
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
2433 @@ -7,7 +7,7 @@
2434 * -- Allen
2435 *)
2436
2437 -functor DirectedGraph(A : ARRAY) :
2438 +functor DirectedGraph(A : ARRAY_NONEQ) :
2439 sig include GRAPH_IMPLEMENTATION
2440
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
2446 @@ -4,7 +4,12 @@
2447
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 =
2458 struct
2459 structure I = I
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
2464 @@ -5,10 +5,75 @@
2465 *)
2466 functor HppaJumps
2467 ( structure Instr:HPPAINSTR
2468 - structure Shuffle:HPPASHUFFLE
2469 - where I = Instr
2470 - structure MLTreeEval : MLTREE_EVAL
2471 - where T = Instr.T
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
2541 ) : SDI_JUMPS =
2542 struct
2543 structure I = Instr
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
2548 @@ -6,12 +6,96 @@
2549
2550
2551 functor HppaAsmEmitter(structure S : INSTRUCTION_STREAM
2552 - structure Instr : HPPAINSTR
2553 - where T = S.P.T
2554 - structure Shuffle : HPPASHUFFLE
2555 - where I = Instr
2556 - structure MLTreeEval : MLTREE_EVAL
2557 - where T = Instr.T
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 =
2649 struct
2650 structure I = Instr
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
2655 @@ -6,7 +6,27 @@
2656
2657
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! *)
2686 fun eByteW w =
2687 let val i = !loc
2688 + val w = W.toLargeWord w
2689 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
2690
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
2696 @@ -1,6 +1,26 @@
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 =
2722
2723 struct
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
2728 @@ -8,7 +8,16 @@
2729 signature HPPAINSTR =
2730 sig
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
2750 @@ -6,8 +6,48 @@
2751
2752 functor HppaProps
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 =
2799 struct
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 @@
2806
2807 functor Hppa
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
2919 ) : MLTREECOMP =
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
2925 - (structure I = I
2926 + structure Multiply32 = struct
2927 + structure I = I
2928 structure T = T
2929 structure CB = CB
2930 val intTy = 32
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}]
2935 - )
2936 + end
2937
2938 (* signed, trapping version of multiply and divide *)
2939 - structure Mult32 = Multiply32
2940 - (val trapping = true
2941 + structure Mult32 = MLTreeMult
2942 + (open Multiply32
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}])
2951 - )
2952 - (val signed = true)
2953 +
2954 + val signed = true)
2955
2956 (* unsigned, non-trapping version of multiply and divide *)
2957 - structure Mulu32 = Multiply32
2958 - (val trapping = false
2959 + structure Mulu32 = MLTreeMult
2960 + (open Multiply32
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}])
2969 - )
2970 - (val signed = false)
2971 +
2972 + val signed = false)
2973
2974 (* signed, non-trapping version of multiply and divide *)
2975 - structure Muls32 = Multiply32
2976 - (val trapping = false
2977 + structure Muls32 = MLTreeMult
2978 + (open Multiply32
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}])
2987 - )
2988 - (val signed = true)
2989 +
2990 + val signed = true)
2991
2992 fun error msg = MLRiscErrorMsg.error("Hppa",msg)
2993
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
2998 @@ -1,6 +1,15 @@
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
3012
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 =
3020 sig
3021 structure I : INSTRUCTIONS
3022 structure C : CELLS
3023 - sharing I.C = C
3024 + (* sharing I.C = C *)
3025
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
3032 @@ -8,7 +8,16 @@
3033 signature INSTRUCTIONS =
3034 sig
3035 structure C : CELLS
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
3054 @@ -15,7 +15,16 @@
3055 signature MLRISC_ANNOTATIONS =
3056 sig
3057
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
3069
3070 (*
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
3075 --- /dev/null
3076 +++ b/library/array-noneq.sig
3077 @@ -0,0 +1,41 @@
3078 +signature ARRAY_NONEQ =
3079 + sig
3080 + type 'a array
3081 + type 'a vector
3082 +
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
3099 + val maxLen: 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
3106 +
3107 +(*
3108 + val toList: 'a array -> 'a list
3109 + val fromVector: 'a vector -> 'a array
3110 + val toVector: 'a array -> 'a vector
3111 +*)
3112 + end
3113 +(*
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
3118 +*)
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
3123 @@ -10,7 +10,7 @@
3124
3125 structure DynArray : sig
3126
3127 - include ARRAY
3128 + include ARRAY_NONEQ
3129
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
3135
3136 +
3137 +(*
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))
3143 end
3144 handle _ => raise Size
3145 +*)
3146
3147 val toVector = vector
3148
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
3153 @@ -10,7 +10,7 @@
3154
3155 structure HashArray : sig
3156
3157 - include ARRAY
3158 + include ARRAY_NONEQ
3159
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
3166 @@ -1,4 +1,5 @@
3167 Library
3168 + signature ARRAY_NONEQ
3169 signature ANNOTATIONS
3170 structure Annotations
3171 signature BITSET
3172 @@ -21,6 +22,7 @@ is
3173 #else
3174 smlnj-lib.cm
3175 #endif
3176 + array-noneq.sig
3177
3178 annotations.sig
3179 annotations.sml
3180 diff --git a/mlb/ALPHA.mlb b/mlb/ALPHA.mlb
3181 new file mode 100644
3182 index 0000000..57a929c
3183 --- /dev/null
3184 +++ b/mlb/ALPHA.mlb
3185 @@ -0,0 +1,476 @@
3186 +
3187 +ann
3188 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
3189 + "redundantBind warn" "redundantMatch warn"
3190 + "sequenceNonUnit ignore"
3191 + "warnUnused false" "forceUsed"
3192 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
3193 +in
3194 +
3195 +local
3196 + basis l42 =
3197 + bas
3198 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
3199 + end
3200 + basis l136 =
3201 + bas
3202 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
3203 + end
3204 + basis l4 =
3205 + bas
3206 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
3207 + end
3208 + basis l50 =
3209 + bas
3210 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
3211 + end
3212 + basis l9 =
3213 + bas
3214 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
3215 + end
3216 +in
3217 +local
3218 + $(SML_LIB)/basis/pervasive.mlb
3219 + local
3220 + open l4
3221 + in
3222 + signature gs_0 = FREQUENCY_PROPERTIES
3223 + end
3224 + local
3225 + open l9
3226 + in
3227 + signature gs_1 = PROBABILITY
3228 + structure gs_2 = Probability
3229 + end
3230 + local
3231 + open l4
3232 + in
3233 + structure gs_3 = MLRiscAnnotations
3234 + end
3235 + local
3236 + open l4
3237 + in
3238 + signature gs_4 = REGION
3239 + end
3240 + local
3241 + open l4
3242 + in
3243 + signature gs_5 = CONSTANT
3244 + end
3245 + local
3246 + open l4
3247 + in
3248 + signature gs_6 = MLTREE
3249 + end
3250 + local
3251 + open l4
3252 + in
3253 + signature gs_7 = CELLS_BASIS
3254 + end
3255 + local
3256 + open l4
3257 + in
3258 + structure gs_8 = CellsBasis
3259 + end
3260 + local
3261 + open l4
3262 + in
3263 + structure gs_9 = Label
3264 + end
3265 + local
3266 + open l9
3267 + in
3268 + structure gs_10 = Annotations
3269 + end
3270 + local
3271 + open l4
3272 + in
3273 + functor gs_11 = Cells
3274 + end
3275 + local
3276 + open l42
3277 + in
3278 + structure gs_12 = Int
3279 + end
3280 + local
3281 + open l4
3282 + in
3283 + signature gs_13 = CELLS
3284 + end
3285 + local
3286 + open l50
3287 + in
3288 + signature gs_14 = MLRISC_ERROR_MSG
3289 + structure gs_15 = MLRiscErrorMsg
3290 + end
3291 + local
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
3299 + in
3300 + signature gs_16 = ALPHACELLS
3301 + structure gs_17 = AlphaCells
3302 + end
3303 + local
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
3314 + in
3315 + signature gs_18 = ALPHAINSTR
3316 + functor gs_19 = AlphaInstr
3317 + end
3318 + local
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
3326 + in
3327 + functor gs_20 = AlphaFreqProps
3328 + end
3329 + local
3330 + open l4
3331 + in
3332 + signature gs_21 = INSN_PROPERTIES
3333 + end
3334 + local
3335 + open l42
3336 + in
3337 + structure gs_22 = Option
3338 + end
3339 + local
3340 + open l42
3341 + in
3342 + structure gs_23 = Word
3343 + end
3344 + local
3345 + open l4
3346 + in
3347 + signature gs_24 = MLTREE_EVAL
3348 + end
3349 + local
3350 + open l4
3351 + in
3352 + signature gs_25 = MLTREE_HASH
3353 + end
3354 + local
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
3367 + in
3368 + functor gs_26 = AlphaProps
3369 + end
3370 + local
3371 + open l4
3372 + in
3373 + signature gs_27 = SDI_JUMPS
3374 + end
3375 + local
3376 + signature ALPHAINSTR = gs_18
3377 + functor AlphaInstr = gs_19
3378 + structure CellsBasis = gs_8
3379 + ../alpha/instructions/alphaShuffle.sig
3380 + in
3381 + signature gs_28 = ALPHASHUFFLE
3382 + end
3383 + local
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
3395 + in
3396 + functor gs_29 = AlphaJumps
3397 + end
3398 + local
3399 + open l4
3400 + in
3401 + signature gs_30 = INSTRUCTION_EMITTER
3402 + end
3403 + local
3404 + open l4
3405 + in
3406 + signature gs_31 = ASM_FORMAT_UTIL
3407 + structure gs_32 = AsmFormatUtil
3408 + end
3409 + local
3410 + open l4
3411 + in
3412 + signature gs_33 = ASM_STREAM
3413 + structure gs_34 = AsmStream
3414 + end
3415 + local
3416 + open l42
3417 + in
3418 + structure gs_35 = TextIO
3419 + end
3420 + local
3421 + open l42
3422 + in
3423 + structure gs_36 = String
3424 + end
3425 + local
3426 + open l4
3427 + in
3428 + structure gs_37 = AsmFlags
3429 + end
3430 + local
3431 + open l4
3432 + in
3433 + signature gs_38 = INSTRUCTION_STREAM
3434 + end
3435 + local
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
3455 + in
3456 + functor gs_39 = AlphaAsmEmitter
3457 + end
3458 + local
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
3465 + in
3466 + functor gs_40 = AlphaRewrite
3467 + end
3468 + local
3469 + open l4
3470 + in
3471 + signature gs_41 = PSEUDO_OPS_BASIS
3472 + end
3473 + local
3474 + open l4
3475 + in
3476 + functor gs_42 = GasPseudoOps
3477 + end
3478 + local
3479 + open l4
3480 + in
3481 + functor gs_43 = PseudoOpsLittle
3482 + end
3483 + local
3484 + open l136
3485 + in
3486 + structure gs_44 = Format
3487 + end
3488 + local
3489 + open l4
3490 + in
3491 + structure gs_45 = PseudoOpsBasisTyp
3492 + end
3493 + local
3494 + open l42
3495 + in
3496 + structure gs_46 = Word32
3497 + end
3498 + local
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
3510 + in
3511 + functor gs_47 = AlphaGasPseudoOps
3512 + end
3513 + local
3514 + open l4
3515 + in
3516 + signature gs_48 = ARCH_SPILL_INSTR
3517 + end
3518 + local
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
3527 + in
3528 + functor gs_49 = AlphaSpillInstr
3529 + end
3530 + local
3531 + open l4
3532 + in
3533 + functor gs_50 = MLTreeMult
3534 + end
3535 + local
3536 + open l4
3537 + in
3538 + functor gs_51 = MLTreeGen
3539 + end
3540 + local
3541 + open l42
3542 + in
3543 + structure gs_52 = IntInf
3544 + end
3545 + local
3546 + open l42
3547 + in
3548 + structure gs_53 = Int32
3549 + end
3550 + local
3551 + open l42
3552 + in
3553 + structure gs_54 = List
3554 + end
3555 + local
3556 + open l4
3557 + in
3558 + signature gs_55 = MLTREECOMP
3559 + signature gs_56 = MLTREE_EXTENSION_COMP
3560 + end
3561 + local
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
3570 + in
3571 + signature gs_57 = ALPHA_PSEUDO_INSTR
3572 + end
3573 + local
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
3592 + in
3593 + functor gs_58 = Alpha
3594 + end
3595 + local
3596 + open l4
3597 + in
3598 + functor gs_59 = Shuffle
3599 + end
3600 + local
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
3610 + in
3611 + functor gs_60 = AlphaShuffle
3612 + end
3613 + local
3614 + open l42
3615 + in
3616 + structure gs_61 = Word8
3617 + end
3618 + local
3619 + open l4
3620 + in
3621 + signature gs_62 = CODE_STRING
3622 + end
3623 + local
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
3638 + in
3639 + functor gs_63 = AlphaMCEmitter
3640 + end
3641 +in
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
3658 +end
3659 +end
3660 +
3661 +end
3662 diff --git a/mlb/AMD64-Peephole.mlb b/mlb/AMD64-Peephole.mlb
3663 new file mode 100644
3664 index 0000000..5002b9b
3665 --- /dev/null
3666 +++ b/mlb/AMD64-Peephole.mlb
3667 @@ -0,0 +1,62 @@
3668 +
3669 +ann
3670 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
3671 + "redundantBind warn" "redundantMatch warn"
3672 + "sequenceNonUnit ignore"
3673 + "warnUnused false" "forceUsed"
3674 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
3675 +in
3676 +
3677 +local
3678 + basis l8 =
3679 + bas
3680 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
3681 + end
3682 + basis l4 =
3683 + bas
3684 + (* $Peephole.cm(=(proxyLib.cm):.)/Peephole.cm =??=> *) Peephole.mlb
3685 + end
3686 + basis l16 =
3687 + bas
3688 + (* $AMD64.cm(=(proxyLib.cm):.)/AMD64.cm =??=> *) AMD64.mlb
3689 + end
3690 +in
3691 +local
3692 + $(SML_LIB)/basis/pervasive.mlb
3693 + local
3694 + open l4
3695 + in
3696 + signature gs_0 = PEEPHOLE
3697 + end
3698 + local
3699 + open l8
3700 + in
3701 + structure gs_1 = CellsBasis
3702 + end
3703 + local
3704 + open l8
3705 + in
3706 + signature gs_2 = MLTREE_EVAL
3707 + end
3708 + local
3709 + open l16
3710 + in
3711 + signature gs_3 = AMD64INSTR
3712 + functor gs_4 = AMD64Instr
3713 + end
3714 + local
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
3721 + in
3722 + functor gs_5 = AMD64Peephole
3723 + end
3724 +in
3725 + functor AMD64Peephole = gs_5
3726 +end
3727 +end
3728 +
3729 +end
3730 diff --git a/mlb/AMD64.mlb b/mlb/AMD64.mlb
3731 new file mode 100644
3732 index 0000000..15a15dd
3733 --- /dev/null
3734 +++ b/mlb/AMD64.mlb
3735 @@ -0,0 +1,749 @@
3736 +
3737 +ann
3738 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
3739 + "redundantBind warn" "redundantMatch warn"
3740 + "sequenceNonUnit ignore"
3741 + "warnUnused false" "forceUsed"
3742 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
3743 +in
3744 +
3745 +local
3746 + basis l4 =
3747 + bas
3748 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
3749 + end
3750 + basis l108 =
3751 + bas
3752 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
3753 + end
3754 + basis l9 =
3755 + bas
3756 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
3757 + end
3758 + basis l46 =
3759 + bas
3760 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
3761 + end
3762 + basis l119 =
3763 + bas
3764 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
3765 + end
3766 + basis l34 =
3767 + bas
3768 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
3769 + end
3770 + basis l145 =
3771 + bas
3772 + (* $MLTREE.cm(=(proxyLib.cm):.)/MLTREE.cm =??=> *) MLTREE.mlb
3773 + end
3774 +in
3775 +local
3776 + $(SML_LIB)/basis/pervasive.mlb
3777 + local
3778 + open l4
3779 + in
3780 + structure gs_0 = Int
3781 + end
3782 + local
3783 + open l9
3784 + in
3785 + signature gs_1 = REGION
3786 + end
3787 + local
3788 + open l9
3789 + in
3790 + signature gs_2 = CONSTANT
3791 + end
3792 + local
3793 + open l9
3794 + in
3795 + signature gs_3 = MLTREE
3796 + end
3797 + local
3798 + open l9
3799 + in
3800 + signature gs_4 = CELLS_BASIS
3801 + end
3802 + local
3803 + open l9
3804 + in
3805 + structure gs_5 = CellsBasis
3806 + end
3807 + local
3808 + open l9
3809 + in
3810 + structure gs_6 = Label
3811 + end
3812 + local
3813 + open l4
3814 + in
3815 + structure gs_7 = Int64
3816 + end
3817 + local
3818 + open l4
3819 + in
3820 + structure gs_8 = Int32
3821 + end
3822 + local
3823 + open l34
3824 + in
3825 + structure gs_9 = Annotations
3826 + end
3827 + local
3828 + open l9
3829 + in
3830 + functor gs_10 = Cells
3831 + end
3832 + local
3833 + open l9
3834 + in
3835 + signature gs_11 = CELLS
3836 + end
3837 + local
3838 + open l46
3839 + in
3840 + signature gs_12 = MLRISC_ERROR_MSG
3841 + structure gs_13 = MLRiscErrorMsg
3842 + end
3843 + local
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
3851 + in
3852 + signature gs_14 = AMD64CELLS
3853 + structure gs_15 = AMD64Cells
3854 + end
3855 + local
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
3868 + in
3869 + signature gs_16 = AMD64INSTR
3870 + functor gs_17 = AMD64Instr
3871 + end
3872 + local
3873 + signature AMD64INSTR = gs_16
3874 + functor AMD64Instr = gs_17
3875 + structure Int = gs_0
3876 + ../amd64/mltree/amd64-opcodes.sml
3877 + in
3878 + functor gs_18 = AMD64Opcodes
3879 + end
3880 + local
3881 + open l9
3882 + in
3883 + signature gs_19 = MC_EMIT
3884 + end
3885 + local
3886 + open l4
3887 + in
3888 + structure gs_20 = Word32
3889 + end
3890 + local
3891 + open l4
3892 + in
3893 + structure gs_21 = Word8
3894 + end
3895 + local
3896 + open l4
3897 + in
3898 + structure gs_22 = LargeWord
3899 + end
3900 + local
3901 + open l4
3902 + in
3903 + structure gs_23 = Word8Vector
3904 + end
3905 + local
3906 + open l4
3907 + in
3908 + structure gs_24 = Word
3909 + end
3910 + local
3911 + open l9
3912 + in
3913 + signature gs_25 = MLTREE_EVAL
3914 + end
3915 + local
3916 + open l9
3917 + in
3918 + functor gs_26 = Shuffle
3919 + end
3920 + local
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
3926 + in
3927 + signature gs_27 = AMD64SHUFFLE
3928 + functor gs_28 = AMD64Shuffle
3929 + end
3930 + local
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
3945 + in
3946 + functor gs_29 = AMD64MCFn
3947 + end
3948 + local
3949 + open l4
3950 + in
3951 + structure gs_30 = Word64
3952 + end
3953 + local
3954 + open l9
3955 + in
3956 + signature gs_31 = INSTRUCTION_EMITTER
3957 + end
3958 + local
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
3979 + in
3980 + functor gs_32 = AMD64MCEmitter
3981 + end
3982 + local
3983 + open l9
3984 + in
3985 + signature gs_33 = OMIT_FRAME_POINTER
3986 + end
3987 + local
3988 + open l108
3989 + in
3990 + structure gs_34 = IntHashTable
3991 + end
3992 + local
3993 + open l46
3994 + in
3995 + signature gs_35 = MLRISC_CONTROL
3996 + structure gs_36 = MLRiscControl
3997 + end
3998 + local
3999 + open l9
4000 + in
4001 + structure gs_37 = MLRiscAnnotations
4002 + end
4003 + local
4004 + open l119
4005 + in
4006 + structure gs_38 = Graph
4007 + end
4008 + local
4009 + open l4
4010 + in
4011 + structure gs_39 = General
4012 + end
4013 + local
4014 + open l4
4015 + in
4016 + structure gs_40 = ListPair
4017 + end
4018 + local
4019 + open l4
4020 + in
4021 + structure gs_41 = Option
4022 + end
4023 + local
4024 + open l9
4025 + in
4026 + signature gs_42 = CONTROL_FLOW_GRAPH
4027 + end
4028 + local
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
4047 + in
4048 + functor gs_43 = AMD64OmitFramePointer
4049 + end
4050 + local
4051 + open l9
4052 + in
4053 + signature gs_44 = C_CALLS
4054 + end
4055 + local
4056 + open l9
4057 + in
4058 + structure gs_45 = CTypes
4059 + end
4060 + local
4061 + open l145
4062 + in
4063 + functor gs_46 = MLTreeUtils
4064 + end
4065 + local
4066 + open l4
4067 + in
4068 + structure gs_47 = IntInf
4069 + end
4070 + local
4071 + open l4
4072 + in
4073 + structure gs_48 = String
4074 + end
4075 + local
4076 + open l4
4077 + in
4078 + structure gs_49 = List
4079 + end
4080 + local
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
4098 + in
4099 + functor gs_50 = AMD64SVID_CCalls
4100 + end
4101 + local
4102 + open l9
4103 + in
4104 + signature gs_51 = PSEUDO_OPS_BASIS
4105 + end
4106 + local
4107 + open l9
4108 + in
4109 + functor gs_52 = GasPseudoOps
4110 + end
4111 + local
4112 + open l9
4113 + in
4114 + functor gs_53 = PseudoOpsLittle
4115 + end
4116 + local
4117 + open l108
4118 + in
4119 + structure gs_54 = Format
4120 + end
4121 + local
4122 + open l9
4123 + in
4124 + structure gs_55 = PseudoOpsBasisTyp
4125 + end
4126 + local
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
4138 + in
4139 + functor gs_56 = AMD64GasPseudoOps
4140 + end
4141 + local
4142 + open l9
4143 + in
4144 + signature gs_57 = MLTREE_HASH
4145 + end
4146 + local
4147 + open l9
4148 + in
4149 + signature gs_58 = INSN_PROPERTIES
4150 + end
4151 + local
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
4167 + in
4168 + signature gs_59 = AMD64INSN_PROPERTIES
4169 + functor gs_60 = AMD64Props
4170 + end
4171 + local
4172 + open l9
4173 + in
4174 + signature gs_61 = SDI_JUMPS
4175 + end
4176 + local
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
4188 + in
4189 + functor gs_62 = AMD64Jumps
4190 + end
4191 + local
4192 + open l9
4193 + in
4194 + signature gs_63 = MLTREE_STREAM
4195 + end
4196 + local
4197 + ../amd64/instructions/amd64InstrExt.sml
4198 + in
4199 + structure gs_64 = AMD64InstrExt
4200 + end
4201 + local
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
4210 + in
4211 + signature gs_65 = AMD64COMP_INSTR_EXT
4212 + functor gs_66 = AMD64CompInstrExt
4213 + end
4214 + local
4215 + open l9
4216 + in
4217 + functor gs_67 = DarwinPseudoOps
4218 + end
4219 + local
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
4231 + in
4232 + functor gs_68 = AMD64DarwinPseudoOps
4233 + end
4234 + local
4235 + open l9
4236 + in
4237 + signature gs_69 = ASM_FORMAT_UTIL
4238 + structure gs_70 = AsmFormatUtil
4239 + end
4240 + local
4241 + open l9
4242 + in
4243 + signature gs_71 = ASM_STREAM
4244 + structure gs_72 = AsmStream
4245 + end
4246 + local
4247 + open l4
4248 + in
4249 + structure gs_73 = TextIO
4250 + end
4251 + local
4252 + open l4
4253 + in
4254 + structure gs_74 = Char
4255 + end
4256 + local
4257 + open l9
4258 + in
4259 + structure gs_75 = AsmFlags
4260 + end
4261 + local
4262 + open l9
4263 + in
4264 + signature gs_76 = INSTRUCTION_STREAM
4265 + end
4266 + local
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
4290 + in
4291 + functor gs_77 = AMD64AsmEmitter
4292 + end
4293 + local
4294 + open l9
4295 + in
4296 + signature gs_78 = CFG_OPTIMIZATION
4297 + end
4298 + local
4299 + open l9
4300 + in
4301 + functor gs_79 = GetReg
4302 + end
4303 + local
4304 + open l9
4305 + in
4306 + signature gs_80 = PRINT_FLOWGRAPH
4307 + functor gs_81 = PrintFlowgraph
4308 + end
4309 + local
4310 + open l9
4311 + in
4312 + functor gs_82 = RegisterAllocator
4313 + end
4314 + local
4315 + open l9
4316 + in
4317 + functor gs_83 = MemoryRA
4318 + end
4319 + local
4320 + open l9
4321 + in
4322 + functor gs_84 = RADeadCodeElim
4323 + end
4324 + local
4325 + open l9
4326 + in
4327 + functor gs_85 = ClusterRA
4328 + end
4329 + local
4330 + open l4
4331 + in
4332 + structure gs_86 = Vector
4333 + end
4334 + local
4335 + open l9
4336 + in
4337 + signature gs_87 = RA_SPILL
4338 + end
4339 + local
4340 + open l9
4341 + in
4342 + signature gs_88 = RA_SPILL_HEURISTICS
4343 + end
4344 + local
4345 + open l9
4346 + in
4347 + structure gs_89 = RAGraph
4348 + end
4349 + local
4350 + open l9
4351 + in
4352 + signature gs_90 = ARCH_SPILL_INSTR
4353 + end
4354 + local
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
4366 + in
4367 + functor gs_91 = AMD64SpillInstr
4368 + end
4369 + local
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
4400 + in
4401 + functor gs_92 = AMD64RegAlloc
4402 + end
4403 + local
4404 + open l9
4405 + in
4406 + functor gs_93 = MLTreeGen
4407 + end
4408 + local
4409 + open l9
4410 + in
4411 + functor gs_94 = MLTreeSize
4412 + end
4413 + local
4414 + open l34
4415 + in
4416 + signature gs_95 = PROBABILITY
4417 + structure gs_96 = Probability
4418 + end
4419 + local
4420 + open l9
4421 + in
4422 + signature gs_97 = MLTREECOMP
4423 + signature gs_98 = MLTREE_EXTENSION_COMP
4424 + end
4425 + local
4426 + open l145
4427 + in
4428 + signature gs_99 = MLTREE_UTILS
4429 + end
4430 + local
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
4455 + in
4456 + functor gs_100 = AMD64Gen
4457 + end
4458 +in
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
4481 +end
4482 +end
4483 +
4484 +end
4485 diff --git a/mlb/CCall-sparc.mlb b/mlb/CCall-sparc.mlb
4486 new file mode 100644
4487 index 0000000..82e45ff
4488 --- /dev/null
4489 +++ b/mlb/CCall-sparc.mlb
4490 @@ -0,0 +1,120 @@
4491 +
4492 +ann
4493 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4494 + "redundantBind warn" "redundantMatch warn"
4495 + "sequenceNonUnit ignore"
4496 + "warnUnused false" "forceUsed"
4497 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4498 +in
4499 +
4500 +local
4501 + basis l29 =
4502 + bas
4503 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4504 + end
4505 + basis l33 =
4506 + bas
4507 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4508 + end
4509 + basis l8 =
4510 + bas
4511 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4512 + end
4513 + basis l4 =
4514 + bas
4515 + (* $CCall.cm(=(proxyLib.cm):.)/CCall.cm =??=> *) CCall.mlb
4516 + end
4517 + basis l19 =
4518 + bas
4519 + (* $SPARC.cm(=(proxyLib.cm):.)/SPARC.cm =??=> *) SPARC.mlb
4520 + end
4521 +in
4522 +local
4523 + $(SML_LIB)/basis/pervasive.mlb
4524 + local
4525 + open l4
4526 + in
4527 + signature gs_0 = C_CALL
4528 + end
4529 + local
4530 + open l8
4531 + in
4532 + functor gs_1 = SparcCConventionFn
4533 + end
4534 + local
4535 + open l4
4536 + in
4537 + functor gs_2 = CCallGenFn
4538 + end
4539 + local
4540 + open l8
4541 + in
4542 + functor gs_3 = StagedAllocationFn
4543 + end
4544 + local
4545 + open l19
4546 + in
4547 + signature gs_4 = SPARCCELLS
4548 + structure gs_5 = SparcCells
4549 + end
4550 + local
4551 + open l4
4552 + in
4553 + structure gs_6 = CType
4554 + end
4555 + local
4556 + open l8
4557 + in
4558 + structure gs_7 = CLocKind
4559 + end
4560 + local
4561 + open l29
4562 + in
4563 + structure gs_8 = List
4564 + end
4565 + local
4566 + open l33
4567 + in
4568 + signature gs_9 = MLTREE
4569 + end
4570 + local
4571 + open l19
4572 + in
4573 + structure gs_10 = SparcInstrExt
4574 + end
4575 + local
4576 + open l29
4577 + in
4578 + structure gs_11 = Int
4579 + end
4580 + local
4581 + structure CType = gs_6
4582 + structure Int = gs_11
4583 + ../c-call/archs/sparc-c-sizes.sml
4584 + in
4585 + structure gs_12 = SparcCSizes
4586 + end
4587 + local
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
4601 + in
4602 + functor gs_13 = SparcCCallFn
4603 + end
4604 +in
4605 + functor SparcCCallFn = gs_13
4606 + structure SparcCSizes = gs_12
4607 +end
4608 +end
4609 +
4610 +end
4611 diff --git a/mlb/CCall-x86-64.mlb b/mlb/CCall-x86-64.mlb
4612 new file mode 100644
4613 index 0000000..bd053f7
4614 --- /dev/null
4615 +++ b/mlb/CCall-x86-64.mlb
4616 @@ -0,0 +1,127 @@
4617 +
4618 +ann
4619 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4620 + "redundantBind warn" "redundantMatch warn"
4621 + "sequenceNonUnit ignore"
4622 + "warnUnused false" "forceUsed"
4623 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4624 +in
4625 +
4626 +local
4627 + basis l8 =
4628 + bas
4629 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4630 + end
4631 + basis l29 =
4632 + bas
4633 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4634 + end
4635 + basis l19 =
4636 + bas
4637 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4638 + end
4639 + basis l4 =
4640 + bas
4641 + (* $CCall.cm(=(proxyLib.cm):.)/CCall.cm =??=> *) CCall.mlb
4642 + end
4643 + basis l34 =
4644 + bas
4645 + (* $AMD64.cm(=(proxyLib.cm):.)/AMD64.cm =??=> *) AMD64.mlb
4646 + end
4647 +in
4648 +local
4649 + $(SML_LIB)/basis/pervasive.mlb
4650 + local
4651 + open l4
4652 + in
4653 + structure gs_0 = CType
4654 + end
4655 + local
4656 + open l8
4657 + in
4658 + structure gs_1 = Word
4659 + end
4660 + local
4661 + open l8
4662 + in
4663 + structure gs_2 = Int
4664 + end
4665 + local
4666 + structure CType = gs_0
4667 + structure Int = gs_2
4668 + structure Word = gs_1
4669 + ../c-call/archs/x86-64-c-sizes.sml
4670 + in
4671 + structure gs_3 = CSizes
4672 + end
4673 + local
4674 + open l19
4675 + in
4676 + functor gs_4 = X86_64CConventionFn
4677 + end
4678 + local
4679 + open l4
4680 + in
4681 + functor gs_5 = CCallGenFn
4682 + end
4683 + local
4684 + open l19
4685 + in
4686 + functor gs_6 = StagedAllocationFn
4687 + end
4688 + local
4689 + open l29
4690 + in
4691 + structure gs_7 = CellsBasis
4692 + end
4693 + local
4694 + open l34
4695 + in
4696 + signature gs_8 = AMD64CELLS
4697 + structure gs_9 = AMD64Cells
4698 + end
4699 + local
4700 + open l19
4701 + in
4702 + structure gs_10 = CLocKind
4703 + end
4704 + local
4705 + open l8
4706 + in
4707 + structure gs_11 = String
4708 + end
4709 + local
4710 + open l8
4711 + in
4712 + structure gs_12 = List
4713 + end
4714 + local
4715 + open l29
4716 + in
4717 + signature gs_13 = MLTREE
4718 + end
4719 + local
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
4734 + in
4735 + functor gs_14 = X86_64SVIDFn
4736 + end
4737 +in
4738 + structure CSizes = gs_3
4739 + functor X86_64SVIDFn = gs_14
4740 +end
4741 +end
4742 +
4743 +end
4744 diff --git a/mlb/CCall-x86.mlb b/mlb/CCall-x86.mlb
4745 new file mode 100644
4746 index 0000000..0f1961e
4747 --- /dev/null
4748 +++ b/mlb/CCall-x86.mlb
4749 @@ -0,0 +1,157 @@
4750 +
4751 +ann
4752 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4753 + "redundantBind warn" "redundantMatch warn"
4754 + "sequenceNonUnit ignore"
4755 + "warnUnused false" "forceUsed"
4756 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4757 +in
4758 +
4759 +local
4760 + basis l8 =
4761 + bas
4762 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4763 + end
4764 + basis l32 =
4765 + bas
4766 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4767 + end
4768 + basis l22 =
4769 + bas
4770 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4771 + end
4772 + basis l4 =
4773 + bas
4774 + (* $CCall.cm(=(proxyLib.cm):.)/CCall.cm =??=> *) CCall.mlb
4775 + end
4776 + basis l37 =
4777 + bas
4778 + (* $IA32.cm(=(proxyLib.cm):.)/IA32.cm =??=> *) IA32.mlb
4779 + end
4780 +in
4781 +local
4782 + $(SML_LIB)/basis/pervasive.mlb
4783 + local
4784 + open l4
4785 + in
4786 + structure gs_0 = CType
4787 + end
4788 + local
4789 + open l8
4790 + in
4791 + structure gs_1 = Word
4792 + end
4793 + local
4794 + open l8
4795 + in
4796 + structure gs_2 = Int
4797 + end
4798 + local
4799 + structure CType = gs_0
4800 + structure Int = gs_2
4801 + structure Word = gs_1
4802 + ../c-call/archs/x86-c-sizes.sml
4803 + in
4804 + structure gs_3 = X86CSizes
4805 + end
4806 + local
4807 + open l4
4808 + in
4809 + signature gs_4 = C_CALL
4810 + end
4811 + local
4812 + open l22
4813 + in
4814 + functor gs_5 = X86CConventionFn
4815 + end
4816 + local
4817 + open l4
4818 + in
4819 + functor gs_6 = CCallGenFn
4820 + end
4821 + local
4822 + open l22
4823 + in
4824 + functor gs_7 = StagedAllocationFn
4825 + end
4826 + local
4827 + open l32
4828 + in
4829 + structure gs_8 = CellsBasis
4830 + end
4831 + local
4832 + open l37
4833 + in
4834 + signature gs_9 = X86CELLS
4835 + structure gs_10 = X86Cells
4836 + end
4837 + local
4838 + open l22
4839 + in
4840 + structure gs_11 = CLocKind
4841 + end
4842 + local
4843 + open l8
4844 + in
4845 + structure gs_12 = IntInf
4846 + end
4847 + local
4848 + open l32
4849 + in
4850 + structure gs_13 = MLRiscAnnotations
4851 + end
4852 + local
4853 + open l8
4854 + in
4855 + structure gs_14 = Int32
4856 + end
4857 + local
4858 + open l8
4859 + in
4860 + structure gs_15 = String
4861 + end
4862 + local
4863 + open l8
4864 + in
4865 + structure gs_16 = List
4866 + end
4867 + local
4868 + open l32
4869 + in
4870 + signature gs_17 = MLTREE
4871 + end
4872 + local
4873 + open l37
4874 + in
4875 + structure gs_18 = X86InstrExt
4876 + end
4877 + local
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
4897 + in
4898 + functor gs_19 = X86SVIDFn
4899 + end
4900 +in
4901 + structure X86CSizes = gs_3
4902 + functor X86SVIDFn = gs_19
4903 +end
4904 +end
4905 +
4906 +end
4907 diff --git a/mlb/CCall.mlb b/mlb/CCall.mlb
4908 new file mode 100644
4909 index 0000000..0f1bd8d
4910 --- /dev/null
4911 +++ b/mlb/CCall.mlb
4912 @@ -0,0 +1,98 @@
4913 +
4914 +ann
4915 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
4916 + "redundantBind warn" "redundantMatch warn"
4917 + "sequenceNonUnit ignore"
4918 + "warnUnused false" "forceUsed"
4919 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
4920 +in
4921 +
4922 +local
4923 + basis l20 =
4924 + bas
4925 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
4926 + end
4927 + basis l4 =
4928 + bas
4929 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
4930 + end
4931 + basis l9 =
4932 + bas
4933 + (* $StagedAlloc.cm(=(proxyLib.cm):.)/StagedAlloc.cm =??=> *) StagedAlloc.mlb
4934 + end
4935 +in
4936 +local
4937 + $(SML_LIB)/basis/pervasive.mlb
4938 + local
4939 + open l4
4940 + in
4941 + signature gs_0 = MLTREE
4942 + end
4943 + local
4944 + open l9
4945 + in
4946 + signature gs_1 = STAGED_ALLOCATION
4947 + end
4948 + local
4949 + open l9
4950 + in
4951 + structure gs_2 = CLocKind
4952 + end
4953 + local
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
4958 + in
4959 + signature gs_3 = C_CALL_GEN
4960 + end
4961 + local
4962 + open l20
4963 + in
4964 + structure gs_4 = List
4965 + end
4966 + local
4967 + structure List = gs_4
4968 + ../c-call/gen/c-type.sml
4969 + in
4970 + structure gs_5 = CType
4971 + end
4972 + local
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
4977 + in
4978 + signature gs_6 = C_CALL
4979 + end
4980 + local
4981 + open l20
4982 + in
4983 + structure gs_7 = ListPair
4984 + end
4985 + local
4986 + open l4
4987 + in
4988 + signature gs_8 = CELLS
4989 + end
4990 + local
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
4999 + in
5000 + functor gs_9 = CCallGenFn
5001 + end
5002 +in
5003 + functor CCallGenFn = gs_9
5004 + structure CType = gs_5
5005 + signature C_CALL = gs_6
5006 + signature C_CALL_GEN = gs_3
5007 +end
5008 +end
5009 +
5010 +end
5011 diff --git a/mlb/Control.mlb b/mlb/Control.mlb
5012 new file mode 100644
5013 index 0000000..78b7d84
5014 --- /dev/null
5015 +++ b/mlb/Control.mlb
5016 @@ -0,0 +1,106 @@
5017 +
5018 +ann
5019 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
5020 + "redundantBind warn" "redundantMatch warn"
5021 + "sequenceNonUnit ignore"
5022 + "warnUnused false" "forceUsed"
5023 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
5024 +in
5025 +
5026 +local
5027 + basis l4 =
5028 + bas
5029 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
5030 + end
5031 + basis l28 =
5032 + bas
5033 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
5034 + end
5035 + basis l12 =
5036 + bas
5037 + (* $/controls-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Controls/controls-lib.mlb
5038 + end
5039 +in
5040 +local
5041 + $(SML_LIB)/basis/pervasive.mlb
5042 + local
5043 + open l4
5044 + in
5045 + structure gs_0 = Timer
5046 + end
5047 + local
5048 + open l4
5049 + in
5050 + structure gs_1 = Time
5051 + end
5052 + local
5053 + open l12
5054 + in
5055 + structure gs_2 = Controls
5056 + end
5057 + local
5058 + open l12
5059 + in
5060 + structure gs_3 = ControlUtil
5061 + end
5062 + local
5063 + open l12
5064 + in
5065 + structure gs_4 = ControlSet
5066 + end
5067 + local
5068 + open l12
5069 + in
5070 + structure gs_5 = ControlRegistry
5071 + end
5072 + local
5073 + open l4
5074 + in
5075 + structure gs_6 = TextIO
5076 + end
5077 + local
5078 + open l28
5079 + in
5080 + structure gs_7 = Atom
5081 + end
5082 + local
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
5091 + in
5092 + signature gs_8 = MLRISC_CONTROL
5093 + structure gs_9 = MLRiscControl
5094 + end
5095 + local
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
5101 + in
5102 + signature gs_10 = MLRISC_TIMING
5103 + structure gs_11 = MLRiscTiming
5104 + end
5105 + local
5106 + structure TextIO = gs_6
5107 + ../control/mlriscErrormsg.sml
5108 + in
5109 + signature gs_12 = MLRISC_ERROR_MSG
5110 + structure gs_13 = MLRiscErrorMsg
5111 + end
5112 +in
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
5119 +end
5120 +end
5121 +
5122 +end
5123 diff --git a/mlb/Graphs.mlb b/mlb/Graphs.mlb
5124 new file mode 100644
5125 index 0000000..03e2731
5126 --- /dev/null
5127 +++ b/mlb/Graphs.mlb
5128 @@ -0,0 +1,716 @@
5129 +
5130 +ann
5131 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
5132 + "redundantBind warn" "redundantMatch warn"
5133 + "sequenceNonUnit ignore"
5134 + "warnUnused false" "forceUsed"
5135 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
5136 +in
5137 +
5138 +local
5139 + basis l8 =
5140 + bas
5141 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
5142 + end
5143 + basis l4 =
5144 + bas
5145 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
5146 + end
5147 + basis l29 =
5148 + bas
5149 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
5150 + end
5151 +in
5152 +local
5153 + $(SML_LIB)/basis/pervasive.mlb
5154 + local
5155 + open l4
5156 + in
5157 + structure gs_0 = ListMergeSort
5158 + end
5159 + local
5160 + open l8
5161 + in
5162 + structure gs_1 = Int
5163 + end
5164 + local
5165 + open l8
5166 + in
5167 + structure gs_2 = List
5168 + end
5169 + local
5170 + ../graphs/graph.sig
5171 + in
5172 + signature gs_3 = GRAPH
5173 + end
5174 + local
5175 + signature GRAPH = gs_3
5176 + structure List = gs_2
5177 + ../graphs/graph.sml
5178 + in
5179 + structure gs_4 = Graph
5180 + end
5181 + local
5182 + structure Graph = gs_4
5183 + structure Int = gs_1
5184 + structure ListMergeSort = gs_0
5185 + ../graphs/uniongraph.sml
5186 + in
5187 + signature gs_5 = UNION_GRAPH_VIEW
5188 + structure gs_6 = UnionGraphView
5189 + end
5190 + local
5191 + open l29
5192 + in
5193 + signature gs_7 = CATNETABLE_LIST
5194 + structure gs_8 = CatnetableList
5195 + end
5196 + local
5197 + open l8
5198 + in
5199 + structure gs_9 = Array
5200 + end
5201 + local
5202 + ../graphs/group.sig
5203 + in
5204 + signature gs_10 = ABELIAN_GROUP
5205 + signature gs_11 = ABELIAN_GROUP_WITH_INF
5206 + end
5207 + local
5208 + signature ABELIAN_GROUP = gs_10
5209 + signature ABELIAN_GROUP_WITH_INF = gs_11
5210 + structure Graph = gs_4
5211 + ../graphs/min-cut.sig
5212 + in
5213 + signature gs_12 = MIN_CUT
5214 + end
5215 + local
5216 + open l8
5217 + in
5218 + signature gs_13 = ARRAY
5219 + end
5220 + local
5221 + structure Graph = gs_4
5222 + ../graphs/node-priqueue.sig
5223 + in
5224 + signature gs_14 = NODE_PRIORITY_QUEUE
5225 + end
5226 + local
5227 + signature ARRAY = gs_13
5228 + structure Graph = gs_4
5229 + signature NODE_PRIORITY_QUEUE = gs_14
5230 + ../graphs/node-priqueue.sml
5231 + in
5232 + functor gs_15 = NodePriorityQueue
5233 + end
5234 + local
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
5244 + in
5245 + functor gs_16 = MinCut
5246 + end
5247 + local
5248 + structure Graph = gs_4
5249 + structure List = gs_2
5250 + ../graphs/isograph.sml
5251 + in
5252 + signature gs_17 = ISOMORPHIC_GRAPH_VIEW
5253 + structure gs_18 = IsomorphicGraphView
5254 + end
5255 + local
5256 + structure Graph = gs_4
5257 + structure Int = gs_1
5258 + structure List = gs_2
5259 + ../graphs/seme.sml
5260 + in
5261 + signature gs_19 = SINGLE_ENTRY_MULTIPLE_EXIT_VIEW
5262 + structure gs_20 = SingleEntryMultipleExit
5263 + end
5264 + local
5265 + structure Graph = gs_4
5266 + ../graphs/graph-comb.sig
5267 + in
5268 + signature gs_21 = GRAPH_COMBINATIONS
5269 + end
5270 + local
5271 + structure Graph = gs_4
5272 + ../graphs/revgraph.sml
5273 + in
5274 + signature gs_22 = REVERSED_GRAPH_VIEW
5275 + structure gs_23 = ReversedGraphView
5276 + end
5277 + local
5278 + structure Graph = gs_4
5279 + ../graphs/renamegraph.sml
5280 + in
5281 + signature gs_24 = RENAMED_GRAPH_VIEW
5282 + structure gs_25 = RenamedGraphView
5283 + end
5284 + local
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
5294 + in
5295 + structure gs_26 = GraphCombinations
5296 + end
5297 + local
5298 + structure Graph = gs_4
5299 + ../graphs/readonly.sml
5300 + in
5301 + signature gs_27 = READONLY_GRAPH_VIEW
5302 + structure gs_28 = ReadOnlyGraphView
5303 + end
5304 + local
5305 + structure Graph = gs_4
5306 + ../graphs/graphimpl.sig
5307 + in
5308 + signature gs_29 = GRAPH_IMPLEMENTATION
5309 + end
5310 + local
5311 + open l8
5312 + in
5313 + structure gs_30 = Word8Array
5314 + end
5315 + local
5316 + structure Graph = gs_4
5317 + ../graphs/graph-scc.sig
5318 + in
5319 + signature gs_31 = GRAPH_STRONGLY_CONNECTED_COMPONENTS
5320 + end
5321 + local
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
5328 + in
5329 + structure gs_32 = GraphSCC
5330 + end
5331 + local
5332 + open l29
5333 + in
5334 + structure gs_33 = BitSet
5335 + end
5336 + local
5337 + structure Array = gs_9
5338 + structure Graph = gs_4
5339 + ../graphs/graph-dfs.sig
5340 + in
5341 + signature gs_34 = GRAPH_DEPTH_FIRST_SEARCH
5342 + end
5343 + local
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
5349 + in
5350 + structure gs_35 = GraphDFS
5351 + end
5352 + local
5353 + structure Array = gs_9
5354 + structure Graph = gs_4
5355 + ../graphs/graph-bfs.sig
5356 + in
5357 + signature gs_36 = GRAPH_BREATH_FIRST_SEARCH
5358 + end
5359 + local
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
5365 + in
5366 + structure gs_37 = GraphBFS
5367 + end
5368 + local
5369 + structure Graph = gs_4
5370 + ../graphs/graph-bcc.sig
5371 + in
5372 + signature gs_38 = GRAPH_BICONNECTED_COMPONENTS
5373 + end
5374 + local
5375 + structure Array = gs_9
5376 + signature GRAPH_BICONNECTED_COMPONENTS = gs_38
5377 + structure Graph = gs_4
5378 + ../graphs/graph-bcc.sml
5379 + in
5380 + structure gs_39 = GraphBCC
5381 + end
5382 + local
5383 + structure Graph = gs_4
5384 + ../graphs/graph-topsort.sig
5385 + in
5386 + signature gs_40 = GRAPH_TOPOLOGICAL_SORT
5387 + end
5388 + local
5389 + open l8
5390 + in
5391 + structure gs_41 = String
5392 + end
5393 + local
5394 + structure Graph = gs_4
5395 + structure Int = gs_1
5396 + structure List = gs_2
5397 + structure String = gs_41
5398 + ../graphs/printgraph.sml
5399 + in
5400 + signature gs_42 = PRINT_GRAPH
5401 + structure gs_43 = PrintGraph
5402 + end
5403 + local
5404 + structure Graph = gs_4
5405 + ../graphs/no-exit.sml
5406 + in
5407 + signature gs_44 = NO_ENTRY_VIEW
5408 + signature gs_45 = NO_EXIT_VIEW
5409 + structure gs_46 = NoEntryView
5410 + structure gs_47 = NoExitView
5411 + end
5412 + local
5413 + open l29
5414 + in
5415 + structure gs_48 = PriorityQueue
5416 + end
5417 + local
5418 + structure Graph = gs_4
5419 + ../graphs/spanning-tree.sig
5420 + in
5421 + signature gs_49 = MIN_COST_SPANNING_TREE
5422 + end
5423 + local
5424 + open l4
5425 + in
5426 + structure gs_50 = HashTable
5427 + end
5428 + local
5429 + open l4
5430 + in
5431 + structure gs_51 = URef
5432 + end
5433 + local
5434 + open l8
5435 + in
5436 + structure gs_52 = Word
5437 + end
5438 + local
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
5444 + in
5445 + signature gs_53 = NODE_PARTITION
5446 + structure gs_54 = NodePartition
5447 + end
5448 + local
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
5455 + in
5456 + structure gs_55 = Kruskal
5457 + end
5458 + local
5459 + open l29
5460 + in
5461 + structure gs_56 = HashArray
5462 + end
5463 + local
5464 + structure Graph = gs_4
5465 + structure List = gs_2
5466 + ../graphs/subgraph-p.sml
5467 + in
5468 + signature gs_57 = SUBGRAPH_P_VIEW
5469 + structure gs_58 = Subgraph_P_View
5470 + end
5471 + local
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
5477 + in
5478 + signature gs_59 = TRACE_SUBGRAPH_VIEW
5479 + structure gs_60 = TraceView
5480 + end
5481 + local
5482 + structure Graph = gs_4
5483 + structure Int = gs_1
5484 + structure List = gs_2
5485 + ../graphs/start-stop.sml
5486 + in
5487 + signature gs_61 = START_STOP_VIEW
5488 + structure gs_62 = StartStopView
5489 + end
5490 + local
5491 + signature GRAPH_IMPLEMENTATION = gs_29
5492 + structure Graph = gs_4
5493 + ../graphs/snap-shot.sml
5494 + in
5495 + signature gs_63 = GRAPH_SNAPSHOT
5496 + functor gs_64 = GraphSnapShot
5497 + end
5498 + local
5499 + signature ABELIAN_GROUP = gs_10
5500 + signature ABELIAN_GROUP_WITH_INF = gs_11
5501 + structure Graph = gs_4
5502 + ../graphs/max-flow.sig
5503 + in
5504 + signature gs_65 = MAX_FLOW
5505 + end
5506 + local
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
5515 + in
5516 + functor gs_66 = MaxFlow
5517 + end
5518 + local
5519 + open l8
5520 + in
5521 + structure gs_67 = Array2
5522 + end
5523 + local
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
5530 + in
5531 + signature gs_68 = ALL_PAIRS_SHORTEST_PATHS
5532 + signature gs_69 = SINGLE_SOURCE_SHORTEST_PATHS
5533 + end
5534 + local
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
5542 + in
5543 + functor gs_70 = FloydWarshall
5544 + end
5545 + local
5546 + structure Graph = gs_4
5547 + ../graphs/graph-is-cyclic.sig
5548 + in
5549 + signature gs_71 = GRAPH_IS_CYCLIC
5550 + end
5551 + local
5552 + structure Graph = gs_4
5553 + ../graphs/update-graph-info.sml
5554 + in
5555 + signature gs_72 = UPDATE_GRAPH_INFO
5556 + structure gs_73 = UpdateGraphInfo
5557 + end
5558 + local
5559 + structure Graph = gs_4
5560 + ../graphs/graph-cycles.sig
5561 + in
5562 + signature gs_74 = GRAPH_SIMPLE_CYCLES
5563 + end
5564 + local
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
5573 + in
5574 + functor gs_75 = BellmanFord
5575 + end
5576 + local
5577 + signature GRAPH_TOPOLOGICAL_SORT = gs_40
5578 + structure Graph = gs_4
5579 + structure Word8Array = gs_30
5580 + ../graphs/graph-topsort.sml
5581 + in
5582 + structure gs_76 = GraphTopsort
5583 + end
5584 + local
5585 + structure Array = gs_9
5586 + structure Graph = gs_4
5587 + structure GraphTopsort = gs_76
5588 + ../graphs/trans-closure.sml
5589 + in
5590 + signature gs_77 = TRANSITIVE_CLOSURE
5591 + structure gs_78 = TransitiveClosure
5592 + end
5593 + local
5594 + open l29
5595 + in
5596 + structure gs_79 = DynArray
5597 + end
5598 + local
5599 + open l29
5600 + in
5601 + signature gs_80 = ARRAY_NONEQ
5602 + end
5603 + local
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
5610 + in
5611 + functor gs_81 = DirectedGraph
5612 + structure gs_82 = DirectedGraph
5613 + end
5614 + local
5615 + structure Graph = gs_4
5616 + ../graphs/wrappers.sml
5617 + in
5618 + signature gs_83 = GRAPH_WRAPPERS
5619 + structure gs_84 = GraphWrappers
5620 + end
5621 + local
5622 + structure BitSet = gs_33
5623 + signature GRAPH_IS_CYCLIC = gs_71
5624 + structure Graph = gs_4
5625 + ../graphs/graph-is-cyclic.sml
5626 + in
5627 + structure gs_85 = GraphIsCyclic
5628 + end
5629 + local
5630 + open l4
5631 + in
5632 + structure gs_86 = IntHashTable
5633 + end
5634 + local
5635 + structure Graph = gs_4
5636 + structure IntHashTable = gs_86
5637 + structure List = gs_2
5638 + ../graphs/subgraph.sml
5639 + in
5640 + signature gs_87 = SUBGRAPH_VIEW
5641 + structure gs_88 = SubgraphView
5642 + end
5643 + local
5644 + structure Graph = gs_4
5645 + structure Int = gs_1
5646 + structure ListMergeSort = gs_0
5647 + ../graphs/ugraph.sml
5648 + in
5649 + signature gs_89 = UNDIRECTED_GRAPH_VIEW
5650 + structure gs_90 = UndirectedGraphView
5651 + end
5652 + local
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
5658 + in
5659 + signature gs_91 = GRAPH_MINOR_VIEW
5660 + structure gs_92 = GraphMinorView
5661 + end
5662 + local
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
5668 + in
5669 + functor gs_93 = UndirectedGraph
5670 + end
5671 + local
5672 + signature GRAPH = gs_3
5673 + ../graphs/bigraph.sig
5674 + in
5675 + signature gs_94 = BIPARTITE_GRAPH
5676 + end
5677 + local
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
5683 + in
5684 + signature gs_95 = ACYCLIC_SUBGRAPH_VIEW
5685 + structure gs_96 = AcyclicSubgraphView
5686 + end
5687 + local
5688 + structure Graph = gs_4
5689 + ../graphs/singleton.sml
5690 + in
5691 + signature gs_97 = SINGLETON_GRAPH_VIEW
5692 + structure gs_98 = SingletonGraphView
5693 + end
5694 + local
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
5703 + in
5704 + functor gs_99 = Dijkstra
5705 + end
5706 + local
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
5722 + in
5723 + functor gs_100 = Johnson
5724 + end
5725 + local
5726 + structure Graph = gs_4
5727 + ../graphs/matching.sig
5728 + in
5729 + signature gs_101 = BIPARTITE_MATCHING
5730 + end
5731 + local
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
5737 + in
5738 + structure gs_102 = GraphCycles
5739 + end
5740 + local
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
5746 + in
5747 + structure gs_103 = BipartiteMatching
5748 + end
5749 + local
5750 + ../graphs/closed-semi-ring.sig
5751 + in
5752 + signature gs_104 = CLOSED_SEMI_RING
5753 + end
5754 +in
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
5841 +end
5842 +end
5843 +
5844 +end
5845 diff --git a/mlb/HPPA.mlb b/mlb/HPPA.mlb
5846 new file mode 100644
5847 index 0000000..4e0d097
5848 --- /dev/null
5849 +++ b/mlb/HPPA.mlb
5850 @@ -0,0 +1,494 @@
5851 +
5852 +ann
5853 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
5854 + "redundantBind warn" "redundantMatch warn"
5855 + "sequenceNonUnit ignore"
5856 + "warnUnused false" "forceUsed"
5857 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
5858 +in
5859 +
5860 +local
5861 + basis l11 =
5862 + bas
5863 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
5864 + end
5865 + basis l157 =
5866 + bas
5867 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
5868 + end
5869 + basis l4 =
5870 + bas
5871 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
5872 + end
5873 + basis l16 =
5874 + bas
5875 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
5876 + end
5877 + basis l37 =
5878 + bas
5879 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
5880 + end
5881 +in
5882 +local
5883 + $(SML_LIB)/basis/pervasive.mlb
5884 + local
5885 + open l4
5886 + in
5887 + structure gs_0 = CellsBasis
5888 + end
5889 + local
5890 + open l4
5891 + in
5892 + functor gs_1 = Shuffle
5893 + end
5894 + local
5895 + open l11
5896 + in
5897 + structure gs_2 = Option
5898 + end
5899 + local
5900 + open l16
5901 + in
5902 + signature gs_3 = MLRISC_ERROR_MSG
5903 + structure gs_4 = MLRiscErrorMsg
5904 + end
5905 + local
5906 + open l4
5907 + in
5908 + signature gs_5 = REGION
5909 + end
5910 + local
5911 + open l4
5912 + in
5913 + signature gs_6 = CONSTANT
5914 + end
5915 + local
5916 + open l4
5917 + in
5918 + signature gs_7 = MLTREE
5919 + end
5920 + local
5921 + open l4
5922 + in
5923 + signature gs_8 = CELLS_BASIS
5924 + end
5925 + local
5926 + open l4
5927 + in
5928 + structure gs_9 = Label
5929 + end
5930 + local
5931 + open l37
5932 + in
5933 + structure gs_10 = Annotations
5934 + end
5935 + local
5936 + open l4
5937 + in
5938 + functor gs_11 = Cells
5939 + end
5940 + local
5941 + open l11
5942 + in
5943 + structure gs_12 = Int
5944 + end
5945 + local
5946 + open l4
5947 + in
5948 + signature gs_13 = CELLS
5949 + end
5950 + local
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
5958 + in
5959 + signature gs_14 = HPPACELLS
5960 + structure gs_15 = HppaCells
5961 + end
5962 + local
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
5973 + in
5974 + signature gs_16 = HPPAINSTR
5975 + functor gs_17 = HppaInstr
5976 + end
5977 + local
5978 + structure CellsBasis = gs_0
5979 + signature HPPAINSTR = gs_16
5980 + functor HppaInstr = gs_17
5981 + ../hppa/instructions/hppaShuffle.sig
5982 + in
5983 + signature gs_18 = HPPASHUFFLE
5984 + end
5985 + local
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
5995 + in
5996 + functor gs_19 = HppaShuffle
5997 + end
5998 + local
5999 + open l4
6000 + in
6001 + signature gs_20 = INSTRUCTION_EMITTER
6002 + end
6003 + local
6004 + open l11
6005 + in
6006 + structure gs_21 = IntInf
6007 + end
6008 + local
6009 + open l11
6010 + in
6011 + structure gs_22 = Word8
6012 + end
6013 + local
6014 + open l11
6015 + in
6016 + structure gs_23 = Word32
6017 + end
6018 + local
6019 + open l4
6020 + in
6021 + signature gs_24 = CODE_STRING
6022 + end
6023 + local
6024 + open l4
6025 + in
6026 + signature gs_25 = INSTRUCTION_STREAM
6027 + end
6028 + local
6029 + open l4
6030 + in
6031 + signature gs_26 = MLTREE_EVAL
6032 + end
6033 + local
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
6049 + in
6050 + functor gs_27 = HppaMCEmitter
6051 + end
6052 + local
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
6058 + in
6059 + signature gs_28 = HPPA_MILLICODE
6060 + end
6061 + local
6062 + open l4
6063 + in
6064 + signature gs_29 = ASM_FORMAT_UTIL
6065 + structure gs_30 = AsmFormatUtil
6066 + end
6067 + local
6068 + open l4
6069 + in
6070 + signature gs_31 = ASM_STREAM
6071 + structure gs_32 = AsmStream
6072 + end
6073 + local
6074 + open l11
6075 + in
6076 + structure gs_33 = TextIO
6077 + end
6078 + local
6079 + open l11
6080 + in
6081 + structure gs_34 = String
6082 + end
6083 + local
6084 + open l4
6085 + in
6086 + structure gs_35 = AsmFlags
6087 + end
6088 + local
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
6108 + in
6109 + functor gs_36 = HppaAsmEmitter
6110 + end
6111 + local
6112 + open l4
6113 + in
6114 + signature gs_37 = INSTRUCTIONS
6115 + end
6116 + local
6117 + structure CellsBasis = gs_0
6118 + signature INSTRUCTIONS = gs_37
6119 + signature MLTREE = gs_7
6120 + ../hppa/mltree/hppaLabelComp.sig
6121 + in
6122 + signature gs_38 = LABEL_COMP
6123 + end
6124 + local
6125 + open l4
6126 + in
6127 + signature gs_39 = ARCH_SPILL_INSTR
6128 + end
6129 + local
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
6136 + in
6137 + functor gs_40 = HppaRewrite
6138 + end
6139 + local
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
6148 + in
6149 + functor gs_41 = HppaSpillInstr
6150 + end
6151 + local
6152 + open l4
6153 + in
6154 + signature gs_42 = FREQUENCY_PROPERTIES
6155 + end
6156 + local
6157 + open l37
6158 + in
6159 + signature gs_43 = PROBABILITY
6160 + structure gs_44 = Probability
6161 + end
6162 + local
6163 + open l4
6164 + in
6165 + structure gs_45 = MLRiscAnnotations
6166 + end
6167 + local
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
6175 + in
6176 + functor gs_46 = HppaFreqProps
6177 + end
6178 + local
6179 + open l4
6180 + in
6181 + signature gs_47 = PSEUDO_OPS_BASIS
6182 + end
6183 + local
6184 + open l4
6185 + in
6186 + functor gs_48 = GasPseudoOps
6187 + end
6188 + local
6189 + open l4
6190 + in
6191 + functor gs_49 = PseudoOpsBig
6192 + end
6193 + local
6194 + open l157
6195 + in
6196 + structure gs_50 = Format
6197 + end
6198 + local
6199 + open l4
6200 + in
6201 + structure gs_51 = PseudoOpsBasisTyp
6202 + end
6203 + local
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
6215 + in
6216 + functor gs_52 = HppaGasPseudoOps
6217 + end
6218 + local
6219 + open l4
6220 + in
6221 + signature gs_53 = DELAY_SLOT_PROPERTIES
6222 + end
6223 + local
6224 + open l4
6225 + in
6226 + signature gs_54 = INSN_PROPERTIES
6227 + end
6228 + local
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
6238 + in
6239 + functor gs_55 = HppaDelaySlots
6240 + end
6241 + local
6242 + open l11
6243 + in
6244 + structure gs_56 = Word
6245 + end
6246 + local
6247 + open l4
6248 + in
6249 + signature gs_57 = MLTREE_HASH
6250 + end
6251 + local
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
6264 + in
6265 + functor gs_58 = HppaProps
6266 + end
6267 + local
6268 + open l4
6269 + in
6270 + signature gs_59 = SDI_JUMPS
6271 + end
6272 + local
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
6284 + in
6285 + functor gs_60 = HppaJumps
6286 + end
6287 + local
6288 + open l4
6289 + in
6290 + functor gs_61 = MLTreeMult
6291 + end
6292 + local
6293 + open l4
6294 + in
6295 + functor gs_62 = MLTreeGen
6296 + end
6297 + local
6298 + open l4
6299 + in
6300 + signature gs_63 = MLTREECOMP
6301 + signature gs_64 = MLTREE_EXTENSION_COMP
6302 + end
6303 + local
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
6319 + in
6320 + functor gs_65 = Hppa
6321 + end
6322 +in
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
6341 +end
6342 +end
6343 +
6344 +end
6345 diff --git a/mlb/IA32-Peephole.mlb b/mlb/IA32-Peephole.mlb
6346 new file mode 100644
6347 index 0000000..d9ee357
6348 --- /dev/null
6349 +++ b/mlb/IA32-Peephole.mlb
6350 @@ -0,0 +1,62 @@
6351 +
6352 +ann
6353 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
6354 + "redundantBind warn" "redundantMatch warn"
6355 + "sequenceNonUnit ignore"
6356 + "warnUnused false" "forceUsed"
6357 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
6358 +in
6359 +
6360 +local
6361 + basis l8 =
6362 + bas
6363 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
6364 + end
6365 + basis l4 =
6366 + bas
6367 + (* $Peephole.cm(=(proxyLib.cm):.)/Peephole.cm =??=> *) Peephole.mlb
6368 + end
6369 + basis l16 =
6370 + bas
6371 + (* $IA32.cm(=(proxyLib.cm):.)/IA32.cm =??=> *) IA32.mlb
6372 + end
6373 +in
6374 +local
6375 + $(SML_LIB)/basis/pervasive.mlb
6376 + local
6377 + open l4
6378 + in
6379 + signature gs_0 = PEEPHOLE
6380 + end
6381 + local
6382 + open l8
6383 + in
6384 + structure gs_1 = CellsBasis
6385 + end
6386 + local
6387 + open l8
6388 + in
6389 + signature gs_2 = MLTREE_EVAL
6390 + end
6391 + local
6392 + open l16
6393 + in
6394 + signature gs_3 = X86INSTR
6395 + functor gs_4 = X86Instr
6396 + end
6397 + local
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
6404 + in
6405 + functor gs_5 = X86Peephole
6406 + end
6407 +in
6408 + functor X86Peephole = gs_5
6409 +end
6410 +end
6411 +
6412 +end
6413 diff --git a/mlb/IA32.mlb b/mlb/IA32.mlb
6414 new file mode 100644
6415 index 0000000..83c09d3
6416 --- /dev/null
6417 +++ b/mlb/IA32.mlb
6418 @@ -0,0 +1,802 @@
6419 +
6420 +ann
6421 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
6422 + "redundantBind warn" "redundantMatch warn"
6423 + "sequenceNonUnit ignore"
6424 + "warnUnused false" "forceUsed"
6425 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
6426 +in
6427 +
6428 +local
6429 + basis l35 =
6430 + bas
6431 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
6432 + end
6433 + basis l112 =
6434 + bas
6435 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
6436 + end
6437 + basis l4 =
6438 + bas
6439 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
6440 + end
6441 + basis l12 =
6442 + bas
6443 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
6444 + end
6445 + basis l236 =
6446 + bas
6447 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
6448 + end
6449 + basis l39 =
6450 + bas
6451 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
6452 + end
6453 + basis l317 =
6454 + bas
6455 + (* $MLTREE.cm(=(proxyLib.cm):.)/MLTREE.cm =??=> *) MLTREE.mlb
6456 + end
6457 +in
6458 +local
6459 + $(SML_LIB)/basis/pervasive.mlb
6460 + local
6461 + open l4
6462 + in
6463 + signature gs_0 = ARCH_SPILL_INSTR
6464 + end
6465 + local
6466 + open l4
6467 + in
6468 + structure gs_1 = CellsBasis
6469 + end
6470 + local
6471 + open l12
6472 + in
6473 + signature gs_2 = MLRISC_ERROR_MSG
6474 + structure gs_3 = MLRiscErrorMsg
6475 + end
6476 + local
6477 + open l4
6478 + in
6479 + signature gs_4 = INSN_PROPERTIES
6480 + end
6481 + local
6482 + open l4
6483 + in
6484 + signature gs_5 = REGION
6485 + end
6486 + local
6487 + open l4
6488 + in
6489 + signature gs_6 = CONSTANT
6490 + end
6491 + local
6492 + open l4
6493 + in
6494 + signature gs_7 = MLTREE
6495 + end
6496 + local
6497 + open l4
6498 + in
6499 + signature gs_8 = CELLS_BASIS
6500 + end
6501 + local
6502 + open l4
6503 + in
6504 + structure gs_9 = Label
6505 + end
6506 + local
6507 + open l35
6508 + in
6509 + structure gs_10 = Int32
6510 + end
6511 + local
6512 + open l39
6513 + in
6514 + structure gs_11 = Annotations
6515 + end
6516 + local
6517 + open l4
6518 + in
6519 + functor gs_12 = Cells
6520 + end
6521 + local
6522 + open l35
6523 + in
6524 + structure gs_13 = Int
6525 + end
6526 + local
6527 + open l4
6528 + in
6529 + signature gs_14 = CELLS
6530 + end
6531 + local
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
6539 + in
6540 + signature gs_15 = X86CELLS
6541 + structure gs_16 = X86Cells
6542 + end
6543 + local
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
6555 + in
6556 + signature gs_17 = X86INSTR
6557 + functor gs_18 = X86Instr
6558 + end
6559 + local
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
6568 + in
6569 + functor gs_19 = X86SpillInstr
6570 + end
6571 + local
6572 + structure CellsBasis = gs_1
6573 + signature X86INSTR = gs_17
6574 + functor X86Instr = gs_18
6575 + ../x86/instructions/x86MemRegs.sig
6576 + in
6577 + signature gs_20 = MEMORY_REGISTERS
6578 + end
6579 + local
6580 + open l4
6581 + in
6582 + signature gs_21 = MC_EMIT
6583 + end
6584 + local
6585 + open l35
6586 + in
6587 + structure gs_22 = Word32
6588 + end
6589 + local
6590 + open l35
6591 + in
6592 + structure gs_23 = Word8
6593 + end
6594 + local
6595 + open l35
6596 + in
6597 + structure gs_24 = LargeWord
6598 + end
6599 + local
6600 + open l35
6601 + in
6602 + structure gs_25 = Word8Vector
6603 + end
6604 + local
6605 + open l35
6606 + in
6607 + structure gs_26 = Option
6608 + end
6609 + local
6610 + open l35
6611 + in
6612 + structure gs_27 = Word
6613 + end
6614 + local
6615 + open l4
6616 + in
6617 + signature gs_28 = INSTRUCTION_EMITTER
6618 + end
6619 + local
6620 + open l4
6621 + in
6622 + signature gs_29 = MLTREE_EVAL
6623 + end
6624 + local
6625 + structure CellsBasis = gs_1
6626 + signature X86INSTR = gs_17
6627 + functor X86Instr = gs_18
6628 + ../x86/instructions/x86Shuffle.sig
6629 + in
6630 + signature gs_30 = X86SHUFFLE
6631 + end
6632 + local
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
6650 + ../x86/x86MC.sml
6651 + in
6652 + functor gs_31 = X86MCEmitter
6653 + end
6654 + local
6655 + open l4
6656 + in
6657 + signature gs_32 = PSEUDO_OPS_BASIS
6658 + end
6659 + local
6660 + open l4
6661 + in
6662 + functor gs_33 = DarwinPseudoOps
6663 + end
6664 + local
6665 + open l4
6666 + in
6667 + functor gs_34 = PseudoOpsLittle
6668 + end
6669 + local
6670 + open l112
6671 + in
6672 + structure gs_35 = Format
6673 + end
6674 + local
6675 + open l4
6676 + in
6677 + structure gs_36 = PseudoOpsBasisTyp
6678 + end
6679 + local
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
6691 + in
6692 + functor gs_37 = X86DarwinPseudoOps
6693 + end
6694 + local
6695 + open l4
6696 + in
6697 + functor gs_38 = Shuffle
6698 + end
6699 + local
6700 + open l35
6701 + in
6702 + structure gs_39 = List
6703 + end
6704 + local
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
6712 + in
6713 + functor gs_40 = X86Shuffle
6714 + end
6715 + local
6716 + open l4
6717 + in
6718 + signature gs_41 = CONTROL_FLOW_GRAPH
6719 + end
6720 + local
6721 + open l4
6722 + in
6723 + signature gs_42 = MLTREE_STREAM
6724 + end
6725 + local
6726 + ../x86/instructions/x86instr-ext.sml
6727 + in
6728 + structure gs_43 = X86InstrExt
6729 + end
6730 + local
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
6739 + in
6740 + signature gs_44 = X86COMP_INSTR_EXT
6741 + functor gs_45 = X86CompInstrExt
6742 + end
6743 + local
6744 + open l4
6745 + in
6746 + functor gs_46 = GasPseudoOps
6747 + end
6748 + local
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
6760 + in
6761 + functor gs_47 = X86GasPseudoOps
6762 + end
6763 + local
6764 + open l4
6765 + in
6766 + signature gs_48 = C_CALLS
6767 + end
6768 + local
6769 + open l4
6770 + in
6771 + structure gs_49 = CTypes
6772 + end
6773 + local
6774 + open l35
6775 + in
6776 + structure gs_50 = IntInf
6777 + end
6778 + local
6779 + open l4
6780 + in
6781 + structure gs_51 = MLRiscAnnotations
6782 + end
6783 + local
6784 + open l35
6785 + in
6786 + structure gs_52 = String
6787 + end
6788 + local
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
6805 + in
6806 + functor gs_53 = IA32SVID_CCalls
6807 + end
6808 + local
6809 + open l4
6810 + in
6811 + signature gs_54 = FREQUENCY_PROPERTIES
6812 + end
6813 + local
6814 + open l39
6815 + in
6816 + signature gs_55 = PROBABILITY
6817 + structure gs_56 = Probability
6818 + end
6819 + local
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
6827 + in
6828 + functor gs_57 = X86FreqProps
6829 + end
6830 + local
6831 + open l4
6832 + in
6833 + signature gs_58 = MLTREE_HASH
6834 + end
6835 + local
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
6849 + in
6850 + functor gs_59 = X86Props
6851 + end
6852 + local
6853 + open l4
6854 + in
6855 + signature gs_60 = SDI_JUMPS
6856 + end
6857 + local
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
6868 + in
6869 + functor gs_61 = X86Jumps
6870 + end
6871 + local
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
6877 + in
6878 + signature gs_62 = X86REWRITE
6879 + end
6880 + local
6881 + open l4
6882 + in
6883 + signature gs_63 = CFG_OPTIMIZATION
6884 + end
6885 + local
6886 + open l4
6887 + in
6888 + functor gs_64 = GetReg
6889 + end
6890 + local
6891 + open l4
6892 + in
6893 + functor gs_65 = RegisterAllocator
6894 + end
6895 + local
6896 + open l4
6897 + in
6898 + functor gs_66 = MemoryRA
6899 + end
6900 + local
6901 + open l4
6902 + in
6903 + functor gs_67 = RADeadCodeElim
6904 + end
6905 + local
6906 + open l4
6907 + in
6908 + functor gs_68 = ClusterRA
6909 + end
6910 + local
6911 + open l4
6912 + in
6913 + signature gs_69 = LIVENESS
6914 + functor gs_70 = Liveness
6915 + end
6916 + local
6917 + open l4
6918 + in
6919 + signature gs_71 = PRINT_FLOWGRAPH
6920 + functor gs_72 = PrintFlowgraph
6921 + end
6922 + local
6923 + open l112
6924 + in
6925 + structure gs_73 = IntHashTable
6926 + end
6927 + local
6928 + open l12
6929 + in
6930 + signature gs_74 = MLRISC_CONTROL
6931 + structure gs_75 = MLRiscControl
6932 + end
6933 + local
6934 + open l236
6935 + in
6936 + structure gs_76 = Graph
6937 + end
6938 + local
6939 + open l35
6940 + in
6941 + structure gs_77 = Array
6942 + end
6943 + local
6944 + open l4
6945 + in
6946 + signature gs_78 = RA_SPILL
6947 + end
6948 + local
6949 + open l4
6950 + in
6951 + signature gs_79 = RA_SPILL_HEURISTICS
6952 + end
6953 + local
6954 + open l4
6955 + in
6956 + structure gs_80 = RAGraph
6957 + end
6958 + local
6959 + open l112
6960 + in
6961 + structure gs_81 = IntRedBlackMap
6962 + end
6963 + local
6964 + open l39
6965 + in
6966 + structure gs_82 = StringOutStream
6967 + end
6968 + local
6969 + open l4
6970 + in
6971 + signature gs_83 = ASM_STREAM
6972 + structure gs_84 = AsmStream
6973 + end
6974 + local
6975 + open l112
6976 + in
6977 + structure gs_85 = ListMergeSort
6978 + end
6979 + local
6980 + open l35
6981 + in
6982 + structure gs_86 = TextIO
6983 + end
6984 + local
6985 + open l35
6986 + in
6987 + structure gs_87 = ListPair
6988 + end
6989 + local
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
7020 + in
7021 + functor gs_88 = X86FP
7022 + end
7023 + local
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
7055 + in
7056 + functor gs_89 = X86RA
7057 + end
7058 + local
7059 + open l4
7060 + in
7061 + signature gs_90 = OMIT_FRAME_POINTER
7062 + end
7063 + local
7064 + open l35
7065 + in
7066 + structure gs_91 = General
7067 + end
7068 + local
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
7087 + in
7088 + functor gs_92 = X86OmitFramePointer
7089 + end
7090 + local
7091 + open l4
7092 + in
7093 + signature gs_93 = ASM_FORMAT_UTIL
7094 + structure gs_94 = AsmFormatUtil
7095 + end
7096 + local
7097 + open l35
7098 + in
7099 + structure gs_95 = Char
7100 + end
7101 + local
7102 + open l4
7103 + in
7104 + structure gs_96 = AsmFlags
7105 + end
7106 + local
7107 + open l4
7108 + in
7109 + signature gs_97 = INSTRUCTION_STREAM
7110 + end
7111 + local
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
7135 + in
7136 + functor gs_98 = X86AsmEmitter
7137 + end
7138 + local
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
7146 + in
7147 + functor gs_99 = X86Rewrite
7148 + end
7149 + local
7150 + open l4
7151 + in
7152 + functor gs_100 = MLTreeGen
7153 + end
7154 + local
7155 + open l4
7156 + in
7157 + signature gs_101 = MLTREECOMP
7158 + signature gs_102 = MLTREE_EXTENSION_COMP
7159 + end
7160 + local
7161 + open l317
7162 + in
7163 + signature gs_103 = MLTREE_UTILS
7164 + end
7165 + local
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
7188 + in
7189 + functor gs_104 = X86
7190 + end
7191 +in
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
7217 +end
7218 +end
7219 +
7220 +end
7221 diff --git a/mlb/Lib.mlb b/mlb/Lib.mlb
7222 new file mode 100644
7223 index 0000000..3748f93
7224 --- /dev/null
7225 +++ b/mlb/Lib.mlb
7226 @@ -0,0 +1,272 @@
7227 +
7228 +ann
7229 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
7230 + "redundantBind warn" "redundantMatch warn"
7231 + "sequenceNonUnit ignore"
7232 + "warnUnused false" "forceUsed"
7233 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
7234 +in
7235 +
7236 +local
7237 + basis l8 =
7238 + bas
7239 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
7240 + end
7241 +in
7242 +local
7243 + $(SML_LIB)/basis/pervasive.mlb
7244 + local
7245 + ../library/array-noneq.sig
7246 + in
7247 + signature gs_0 = ARRAY_NONEQ
7248 + end
7249 + local
7250 + open l8
7251 + in
7252 + structure gs_1 = ArraySlice
7253 + end
7254 + local
7255 + open l8
7256 + in
7257 + structure gs_2 = Array
7258 + end
7259 + local
7260 + open l8
7261 + in
7262 + structure gs_3 = Vector
7263 + end
7264 + local
7265 + open l8
7266 + in
7267 + structure gs_4 = General
7268 + end
7269 + local
7270 + open l8
7271 + in
7272 + structure gs_5 = Int
7273 + end
7274 + local
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
7282 + in
7283 + structure gs_6 = DynArray
7284 + end
7285 + local
7286 + open l8
7287 + in
7288 + structure gs_7 = String
7289 + end
7290 + local
7291 + open l8
7292 + in
7293 + structure gs_8 = Word
7294 + end
7295 + local
7296 + open l8
7297 + in
7298 + structure gs_9 = Word8
7299 + end
7300 + local
7301 + open l8
7302 + in
7303 + structure gs_10 = Word8Array
7304 + end
7305 + local
7306 + ../library/bitset.sig
7307 + in
7308 + signature gs_11 = BITSET
7309 + end
7310 + local
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
7317 + in
7318 + structure gs_12 = BitSet
7319 + end
7320 + local
7321 + open l8
7322 + in
7323 + structure gs_13 = TextIO
7324 + end
7325 + local
7326 + structure TextIO = gs_13
7327 + ../library/stringOutStream.sig
7328 + in
7329 + signature gs_14 = STRING_OUTSTREAM
7330 + end
7331 + local
7332 + structure String = gs_7
7333 + ../library/line-break.sml
7334 + in
7335 + signature gs_15 = LINE_BREAK
7336 + structure gs_16 = LineBreak
7337 + end
7338 + local
7339 + open l8
7340 + in
7341 + structure gs_17 = Real
7342 + end
7343 + local
7344 + open l8
7345 + in
7346 + structure gs_18 = List
7347 + end
7348 + local
7349 + open l8
7350 + in
7351 + structure gs_19 = IntInf
7352 + end
7353 + local
7354 + structure Int = gs_5
7355 + structure IntInf = gs_19
7356 + structure List = gs_18
7357 + structure Real = gs_17
7358 + ../library/probability.sml
7359 + in
7360 + signature gs_20 = PROBABILITY
7361 + structure gs_21 = Probability
7362 + end
7363 + local
7364 + open l8
7365 + in
7366 + structure gs_22 = TextPrimIO
7367 + end
7368 + local
7369 + open l8
7370 + in
7371 + structure gs_23 = CharArraySlice
7372 + end
7373 + local
7374 + open l8
7375 + in
7376 + structure gs_24 = CharVectorSlice
7377 + end
7378 + local
7379 + open l8
7380 + in
7381 + structure gs_25 = IO
7382 + end
7383 + local
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
7393 + in
7394 + structure gs_26 = StringOutStream
7395 + end
7396 + local
7397 + ../library/catlist.sml
7398 + in
7399 + signature gs_27 = CATNETABLE_LIST
7400 + structure gs_28 = CatnetableList
7401 + end
7402 + local
7403 + ../library/priQueue.sig
7404 + in
7405 + signature gs_29 = PRIORITY_QUEUE
7406 + end
7407 + local
7408 + structure Array = gs_2
7409 + signature PRIORITY_QUEUE = gs_29
7410 + ../library/heap.sml
7411 + in
7412 + structure gs_30 = PriorityHeap
7413 + end
7414 + local
7415 + ../library/annotations.sig
7416 + in
7417 + signature gs_31 = ANNOTATIONS
7418 + end
7419 + local
7420 + signature ANNOTATIONS = gs_31
7421 + ../library/annotations.sml
7422 + in
7423 + structure gs_32 = Annotations
7424 + end
7425 + local
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
7432 + in
7433 + structure gs_33 = HashArray
7434 + end
7435 + local
7436 + ../library/cache.sml
7437 + in
7438 + signature gs_34 = CACHE_REF
7439 + structure gs_35 = CacheRef
7440 + end
7441 + local
7442 + ../library/sortedlist.sml
7443 + in
7444 + structure gs_36 = SortedList
7445 + end
7446 + local
7447 + structure Int = gs_5
7448 + signature PRIORITY_QUEUE = gs_29
7449 + ../library/priQueue.sml
7450 + in
7451 + structure gs_37 = PriorityQueue
7452 + end
7453 + local
7454 + open l8
7455 + in
7456 + signature gs_38 = INTEGER
7457 + end
7458 + local
7459 + signature INTEGER = gs_38
7460 + ../library/freq.sig
7461 + in
7462 + signature gs_39 = FREQ
7463 + end
7464 + local
7465 + signature FREQ = gs_39
7466 + structure Int = gs_5
7467 + ../library/freq.sml
7468 + in
7469 + structure gs_40 = Freq
7470 + end
7471 +in
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
7495 +end
7496 +end
7497 +
7498 +end
7499 diff --git a/mlb/MLRISC.mlb b/mlb/MLRISC.mlb
7500 new file mode 100644
7501 index 0000000..4b1a3fa
7502 --- /dev/null
7503 +++ b/mlb/MLRISC.mlb
7504 @@ -0,0 +1,1749 @@
7505 +
7506 +ann
7507 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
7508 + "redundantBind warn" "redundantMatch warn"
7509 + "sequenceNonUnit ignore"
7510 + "warnUnused false" "forceUsed"
7511 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
7512 +in
7513 +
7514 +local
7515 + basis l13 =
7516 + bas
7517 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
7518 + end
7519 + basis l19 =
7520 + bas
7521 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
7522 + end
7523 + basis l44 =
7524 + bas
7525 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
7526 + end
7527 + basis l5 =
7528 + bas
7529 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
7530 + end
7531 + basis l9 =
7532 + bas
7533 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
7534 + end
7535 +in
7536 +local
7537 + $(SML_LIB)/basis/pervasive.mlb
7538 + local
7539 + open l5
7540 + in
7541 + structure gs_0 = Graph
7542 + end
7543 + local
7544 + open l9
7545 + in
7546 + structure gs_1 = Annotations
7547 + end
7548 + local
7549 + open l13
7550 + in
7551 + structure gs_2 = TextIO
7552 + end
7553 + local
7554 + open l19
7555 + in
7556 + signature gs_3 = MONO_HASH_TABLE
7557 + end
7558 + local
7559 + open l13
7560 + in
7561 + structure gs_4 = Array
7562 + end
7563 + local
7564 + structure Annotations = gs_1
7565 + structure Array = gs_4
7566 + signature MONO_HASH_TABLE = gs_3
7567 + ../instructions/cells-basis.sig
7568 + in
7569 + signature gs_5 = CELLS_BASIS
7570 + end
7571 + local
7572 + open l19
7573 + in
7574 + functor gs_6 = HashTableFn
7575 + end
7576 + local
7577 + open l13
7578 + in
7579 + structure gs_7 = String
7580 + end
7581 + local
7582 + open l13
7583 + in
7584 + structure gs_8 = Word
7585 + end
7586 + local
7587 + open l13
7588 + in
7589 + structure gs_9 = List
7590 + end
7591 + local
7592 + open l44
7593 + in
7594 + signature gs_10 = MLRISC_ERROR_MSG
7595 + structure gs_11 = MLRiscErrorMsg
7596 + end
7597 + local
7598 + open l13
7599 + in
7600 + structure gs_12 = Int
7601 + end
7602 + local
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
7614 + in
7615 + structure gs_13 = CellsBasis
7616 + end
7617 + local
7618 + structure CellsBasis = gs_13
7619 + ../instructions/cells.sig
7620 + in
7621 + signature gs_14 = CELLS
7622 + end
7623 + local
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
7629 + in
7630 + signature gs_15 = INSTRUCTIONS
7631 + end
7632 + local
7633 + open l13
7634 + in
7635 + structure gs_16 = Word8
7636 + end
7637 + local
7638 + open l13
7639 + in
7640 + structure gs_17 = Int32
7641 + end
7642 + local
7643 + open l13
7644 + in
7645 + structure gs_18 = IntInf
7646 + end
7647 + local
7648 + open l13
7649 + in
7650 + structure gs_19 = Int64
7651 + end
7652 + local
7653 + open l13
7654 + in
7655 + structure gs_20 = Word32
7656 + end
7657 + local
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
7663 + in
7664 + signature gs_21 = MACHINE_INT
7665 + end
7666 + local
7667 + ../mltree/mltree-extension.sig
7668 + in
7669 + signature gs_22 = MLTREE_EXTENSION
7670 + end
7671 + local
7672 + ../mltree/mltree-basis.sig
7673 + in
7674 + signature gs_23 = MLTREE_BASIS
7675 + end
7676 + local
7677 + ../instructions/region.sig
7678 + in
7679 + signature gs_24 = REGION
7680 + end
7681 + local
7682 + ../instructions/constant.sig
7683 + in
7684 + signature gs_25 = CONSTANT
7685 + end
7686 + local
7687 + ../instructions/label-sig.sml
7688 + in
7689 + signature gs_26 = LABEL
7690 + end
7691 + local
7692 + signature LABEL = gs_26
7693 + structure Word = gs_8
7694 + ../instructions/label.sml
7695 + in
7696 + structure gs_27 = Label
7697 + end
7698 + local
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
7709 + in
7710 + signature gs_28 = MLTREE
7711 + end
7712 + local
7713 + open l19
7714 + in
7715 + structure gs_29 = Atom
7716 + end
7717 + local
7718 + structure Atom = gs_29
7719 + structure Label = gs_27
7720 + ../flowgraph/pseudo-ops-basis-typ.sml
7721 + in
7722 + structure gs_30 = PseudoOpsBasisTyp
7723 + end
7724 + local
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
7730 + in
7731 + signature gs_31 = PSEUDO_OPS_BASIS
7732 + end
7733 + local
7734 + signature PSEUDO_OPS_BASIS = gs_31
7735 + structure Word8 = gs_16
7736 + ../flowgraph/client-pseudo-ops.sig
7737 + in
7738 + signature gs_32 = CLIENT_PSEUDO_OPS
7739 + end
7740 + local
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
7746 + in
7747 + signature gs_33 = PSEUDO_OPS
7748 + end
7749 + local
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
7757 + in
7758 + signature gs_34 = CONTROL_FLOW_GRAPH
7759 + end
7760 + local
7761 + signature CONTROL_FLOW_GRAPH = gs_34
7762 + ../emit/asmEmit.sig
7763 + in
7764 + signature gs_35 = ASSEMBLY_EMITTER
7765 + end
7766 + local
7767 + structure List = gs_9
7768 + signature MLTREE = gs_28
7769 + ../mltree/mltree-check-ty.sml
7770 + in
7771 + functor gs_36 = MLTreeCheckTy
7772 + end
7773 + local
7774 + open l5
7775 + in
7776 + signature gs_37 = GRAPH_IMPLEMENTATION
7777 + end
7778 + local
7779 + structure Array = gs_4
7780 + signature GRAPH_IMPLEMENTATION = gs_37
7781 + structure Graph = gs_0
7782 + ../ir-archive/dominator.sig
7783 + in
7784 + signature gs_38 = DOMINATOR_TREE
7785 + end
7786 + local
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
7792 + in
7793 + signature gs_39 = LOOP_STRUCTURE
7794 + end
7795 + local
7796 + open l9
7797 + in
7798 + structure gs_40 = BitSet
7799 + end
7800 + local
7801 + open l5
7802 + in
7803 + signature gs_41 = REVERSED_GRAPH_VIEW
7804 + structure gs_42 = ReversedGraphView
7805 + end
7806 + local
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
7816 + in
7817 + functor gs_43 = DominatorTree
7818 + end
7819 + local
7820 + structure Annotations = gs_1
7821 + structure Label = gs_27
7822 + signature PSEUDO_OPS = gs_33
7823 + ../instructions/stream.sig
7824 + in
7825 + signature gs_44 = INSTRUCTION_STREAM
7826 + end
7827 + local
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
7833 + in
7834 + functor gs_45 = InstructionStream
7835 + end
7836 + local
7837 + signature MLTREE = gs_28
7838 + ../mltree/mltree-size.sig
7839 + in
7840 + signature gs_46 = MLTREE_SIZE
7841 + end
7842 + local
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
7848 + in
7849 + signature gs_47 = MLTREEGEN
7850 + end
7851 + local
7852 + signature INSTRUCTION_STREAM = gs_44
7853 + signature MLTREE = gs_28
7854 + ../mltree/mltree-stream.sig
7855 + in
7856 + signature gs_48 = MLTREE_STREAM
7857 + end
7858 + local
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
7866 + in
7867 + signature gs_49 = MLTREECOMP
7868 + signature gs_50 = MLTREE_EXTENSION_COMP
7869 + end
7870 + local
7871 + open l19
7872 + in
7873 + structure gs_51 = Format
7874 + end
7875 + local
7876 + structure TextIO = gs_2
7877 + ../emit/asmStream.sml
7878 + in
7879 + signature gs_52 = ASM_STREAM
7880 + structure gs_53 = AsmStream
7881 + end
7882 + local
7883 + structure Annotations = gs_1
7884 + signature INSTRUCTIONS = gs_15
7885 + signature INSTRUCTION_STREAM = gs_44
7886 + ../emit/instruction-emitter.sig
7887 + in
7888 + signature gs_54 = INSTRUCTION_EMITTER
7889 + end
7890 + local
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
7901 + in
7902 + signature gs_55 = PRINT_FLOWGRAPH
7903 + functor gs_56 = PrintFlowgraph
7904 + end
7905 + local
7906 + structure Array = gs_4
7907 + ../ra/getreg.sig
7908 + in
7909 + signature gs_57 = GETREG
7910 + end
7911 + local
7912 + structure Array = gs_4
7913 + signature GETREG = gs_57
7914 + ../ra/getreg.sml
7915 + in
7916 + functor gs_58 = GetReg
7917 + end
7918 + local
7919 + signature INSTRUCTIONS = gs_15
7920 + structure Label = gs_27
7921 + ../backpatch/delaySlotProps.sig
7922 + in
7923 + signature gs_59 = DELAY_SLOT_PROPERTIES
7924 + end
7925 + local
7926 + structure Int = gs_12
7927 + structure List = gs_9
7928 + ../c-calls/c-types.sml
7929 + in
7930 + structure gs_60 = CTypes
7931 + end
7932 + local
7933 + structure CTypes = gs_60
7934 + signature MLTREE = gs_28
7935 + ../c-calls/c-calls.sig
7936 + in
7937 + signature gs_61 = C_CALLS
7938 + end
7939 + local
7940 + signature C_CALLS = gs_61
7941 + signature MLTREE = gs_28
7942 + ../c-calls/unimplemented-c-calls.sml
7943 + in
7944 + functor gs_62 = UnimplementedCCallsFn
7945 + end
7946 + local
7947 + open l44
7948 + in
7949 + signature gs_63 = MLRISC_CONTROL
7950 + structure gs_64 = MLRiscControl
7951 + end
7952 + local
7953 + open l19
7954 + in
7955 + structure gs_65 = ListMergeSort
7956 + end
7957 + local
7958 + signature CELLS_BASIS = gs_5
7959 + structure CellsBasis = gs_13
7960 + ../aliasing/pointsTo.sig
7961 + in
7962 + signature gs_66 = POINTS_TO
7963 + end
7964 + local
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
7974 + in
7975 + structure gs_67 = PointsTo
7976 + end
7977 + local
7978 + open l13
7979 + in
7980 + structure gs_68 = Char
7981 + end
7982 + local
7983 + signature MLTREE = gs_28
7984 + structure PseudoOpsBasisTyp = gs_30
7985 + structure Word8 = gs_16
7986 + ../flowgraph/pseudo-ops-endian.sig
7987 + in
7988 + signature gs_69 = PSEUDO_OPS_ENDIAN
7989 + end
7990 + local
7991 + structure IntInf = gs_18
7992 + structure Label = gs_27
7993 + signature MLTREE = gs_28
7994 + ../mltree/mltree-eval.sig
7995 + in
7996 + signature gs_70 = MLTREE_EVAL
7997 + end
7998 + local
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
8014 + in
8015 + functor gs_71 = PseudoOpsBig
8016 + end
8017 + local
8018 + signature CONTROL_FLOW_GRAPH = gs_34
8019 + ../backpatch/bbsched.sig
8020 + in
8021 + signature gs_72 = BBSCHED
8022 + end
8023 + local
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
8030 + in
8031 + signature gs_73 = INSN_PROPERTIES
8032 + end
8033 + local
8034 + signature CELLS = gs_14
8035 + signature INSTRUCTIONS = gs_15
8036 + structure Label = gs_27
8037 + ../backpatch/sdi-jumps.sig
8038 + in
8039 + signature gs_74 = SDI_JUMPS
8040 + end
8041 + local
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
8057 + in
8058 + functor gs_75 = SpanDependencyResolution
8059 + end
8060 + local
8061 + structure Label = gs_27
8062 + signature MLTREE = gs_28
8063 + structure PseudoOpsBasisTyp = gs_30
8064 + ../flowgraph/as-pseudo-ops.sig
8065 + in
8066 + signature gs_76 = AS_PSEUDO_OPS
8067 + end
8068 + local
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
8081 + in
8082 + functor gs_77 = DarwinPseudoOps
8083 + end
8084 + local
8085 + signature CELLS = gs_14
8086 + structure CellsBasis = gs_13
8087 + ../ra/ra-flowgraph-part.sig
8088 + in
8089 + signature gs_78 = RA_FLOWGRAPH_PARTITIONER
8090 + end
8091 + local
8092 + structure Word8 = gs_16
8093 + ../emit/code-string.sig
8094 + in
8095 + signature gs_79 = CODE_STRING
8096 + end
8097 + local
8098 + open l9
8099 + in
8100 + signature gs_80 = PROBABILITY
8101 + structure gs_81 = Probability
8102 + end
8103 + local
8104 + open l13
8105 + in
8106 + structure gs_82 = Real
8107 + end
8108 + local
8109 + signature CONTROL_FLOW_GRAPH = gs_34
8110 + ../frequencies/compute-execution-freqs.sig
8111 + in
8112 + signature gs_83 = COMPUTE_EXECUTION_FREQUENCIES
8113 + end
8114 + local
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
8121 + in
8122 + signature gs_84 = MLRISC_ANNOTATIONS
8123 + end
8124 + local
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
8132 + in
8133 + structure gs_85 = MLRiscAnnotations
8134 + end
8135 + local
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
8145 + in
8146 + functor gs_86 = CompleteProbsFn
8147 + end
8148 + local
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
8164 + in
8165 + functor gs_87 = ComputeFreqsFn
8166 + end
8167 + local
8168 + signature MLTREE = gs_28
8169 + ../mltree/mltree-hash.sig
8170 + in
8171 + signature gs_88 = MLTREE_HASH
8172 + end
8173 + local
8174 + ../aliasing/mlriscRegion.sig
8175 + in
8176 + signature gs_89 = MLRISC_REGION
8177 + end
8178 + local
8179 + ../instructions/mlriscOptimization.sig
8180 + in
8181 + signature gs_90 = MLRISC_OPTIMIZATION
8182 + end
8183 + local
8184 + structure CellsBasis = gs_13
8185 + signature INSTRUCTIONS = gs_15
8186 + ../instructions/shuffle.sig
8187 + in
8188 + signature gs_91 = SHUFFLE
8189 + end
8190 + local
8191 + signature CELLS_BASIS = gs_5
8192 + structure CellsBasis = gs_13
8193 + signature INSTRUCTIONS = gs_15
8194 + ../ra/arch-spill-instr.sig
8195 + in
8196 + signature gs_92 = ARCH_SPILL_INSTR
8197 + end
8198 + local
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
8211 + in
8212 + functor gs_93 = GasPseudoOps
8213 + end
8214 + local
8215 + structure Array = gs_4
8216 + ../ra/ra-bitmatrix.sig
8217 + in
8218 + signature gs_94 = RA_BITMATRIX
8219 + end
8220 + local
8221 + ../ra/ra-priqueue.sig
8222 + in
8223 + signature gs_95 = RA_PRIORITY_QUEUE
8224 + end
8225 + local
8226 + open l13
8227 + in
8228 + structure gs_96 = Unsafe
8229 + end
8230 + local
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
8236 + in
8237 + structure gs_97 = RaBitmatrix
8238 + end
8239 + local
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
8251 + in
8252 + functor gs_98 = JumpChainElimFn
8253 + end
8254 + local
8255 + signature CONTROL_FLOW_GRAPH = gs_34
8256 + ../flowgraph/cfg-optimization.sig
8257 + in
8258 + signature gs_99 = CFG_OPTIMIZATION
8259 + end
8260 + local
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
8270 + in
8271 + functor gs_100 = CFGExpandCopies
8272 + end
8273 + local
8274 + signature INSTRUCTION_STREAM = gs_44
8275 + signature MLTREE = gs_28
8276 + signature MLTREE_STREAM = gs_48
8277 + ../mltree/mltree-stream.sml
8278 + in
8279 + functor gs_101 = MLTreeStream
8280 + end
8281 + local
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
8297 + in
8298 + functor gs_102 = PseudoOpsLittle
8299 + end
8300 + local
8301 + signature MLTREE = gs_28
8302 + signature MLTREE_SIZE = gs_46
8303 + ../mltree/mltree-size.sml
8304 + in
8305 + functor gs_103 = MLTreeSize
8306 + end
8307 + local
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
8318 + in
8319 + functor gs_104 = MLTreeGen
8320 + end
8321 + local
8322 + signature MLRISC_ERROR_MSG = gs_10
8323 + structure MLRiscErrorMsg = gs_11
8324 + signature MLTREE_BASIS = gs_23
8325 + ../mltree/mltree-basis.sml
8326 + in
8327 + structure gs_105 = MLTreeBasis
8328 + end
8329 + local
8330 + signature CLIENT_PSEUDO_OPS = gs_32
8331 + signature PSEUDO_OPS = gs_33
8332 + structure PseudoOpsBasisTyp = gs_30
8333 + ../flowgraph/pseudo-ops.sml
8334 + in
8335 + functor gs_106 = PseudoOps
8336 + end
8337 + local
8338 + signature CONTROL_FLOW_GRAPH = gs_34
8339 + ../block-placement/block-placement.sig
8340 + in
8341 + signature gs_107 = BLOCK_PLACEMENT
8342 + end
8343 + local
8344 + open l19
8345 + in
8346 + structure gs_108 = IntHashTable
8347 + end
8348 + local
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
8356 + in
8357 + signature gs_109 = RA_GRAPH
8358 + end
8359 + local
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
8370 + in
8371 + structure gs_110 = RAGraph
8372 + end
8373 + local
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
8382 + in
8383 + signature gs_111 = RA_SPILL
8384 + end
8385 + local
8386 + signature INSTRUCTIONS = gs_15
8387 + signature PROBABILITY = gs_80
8388 + structure Probability = gs_81
8389 + ../instructions/freqProps.sig
8390 + in
8391 + signature gs_112 = FREQUENCY_PROPERTIES
8392 + end
8393 + local
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
8400 + in
8401 + functor gs_113 = FreqProps
8402 + end
8403 + local
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
8423 + in
8424 + functor gs_114 = BuildFlowgraph
8425 + signature gs_115 = CONTROL_FLOWGRAPH_GEN
8426 + end
8427 + local
8428 + structure RAGraph = gs_110
8429 + signature RA_GRAPH = gs_109
8430 + ../ra/ra-spillheur.sig
8431 + in
8432 + signature gs_116 = RA_SPILL_HEURISTICS
8433 + end
8434 + local
8435 + signature MLRISC_CONTROL = gs_63
8436 + structure MLRiscControl = gs_64
8437 + ../emit/asm-flags.sml
8438 + in
8439 + structure gs_117 = AsmFlags
8440 + end
8441 + local
8442 + structure Annotations = gs_1
8443 + structure IntInf = gs_18
8444 + ../gc-safety/gc-type.sig
8445 + in
8446 + signature gs_118 = GC_TYPE
8447 + end
8448 + local
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
8455 + in
8456 + signature gs_119 = GC_CELLS
8457 + end
8458 + local
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
8468 + in
8469 + signature gs_120 = RA_FLOWGRAPH
8470 + end
8471 + local
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
8479 + ../ra/ra.sig
8480 + in
8481 + signature gs_121 = RA
8482 + end
8483 + local
8484 + open l13
8485 + in
8486 + structure gs_122 = Word8Array
8487 + end
8488 + local
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
8494 + ../ra/ra-core.sig
8495 + in
8496 + signature gs_123 = RA_CORE
8497 + end
8498 + local
8499 + signature RA_PRIORITY_QUEUE = gs_95
8500 + ../ra/raPriQueue.sml
8501 + in
8502 + functor gs_124 = RaPriQueue
8503 + end
8504 + local
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
8523 + ../ra/ra-core.sml
8524 + in
8525 + structure gs_125 = RACore
8526 + end
8527 + local
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
8543 + ../ra/ra.sml
8544 + in
8545 + functor gs_126 = RegisterAllocator
8546 + end
8547 + local
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
8554 + in
8555 + functor gs_127 = RADeadCodeElim
8556 + end
8557 + local
8558 + open l19
8559 + in
8560 + structure gs_128 = URef
8561 + end
8562 + local
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
8571 + in
8572 + functor gs_129 = LoopStructure
8573 + end
8574 + local
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
8585 + in
8586 + functor gs_130 = BBSched2
8587 + end
8588 + local
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
8611 + in
8612 + functor gs_131 = ClusterRA
8613 + end
8614 + local
8615 + structure RACore = gs_125
8616 + structure RAGraph = gs_110
8617 + signature RA_SPILL_HEURISTICS = gs_116
8618 + ../ra/chaitin-spillheur.sml
8619 + in
8620 + structure gs_132 = ChaitinSpillHeur
8621 + end
8622 + local
8623 + open l19
8624 + in
8625 + functor gs_133 = LeftPriorityQFn
8626 + end
8627 + local
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
8642 + in
8643 + functor gs_134 = WeightedBlockPlacementFn
8644 + end
8645 + local
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
8658 + in
8659 + functor gs_135 = DefaultBlockPlacement
8660 + end
8661 + local
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
8671 + in
8672 + functor gs_136 = BlockPlacement
8673 + end
8674 + local
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
8680 + in
8681 + signature gs_137 = MLTREE_MULT_DIV
8682 + end
8683 + local
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
8694 + in
8695 + functor gs_138 = MLTreeMult
8696 + end
8697 + local
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
8709 + in
8710 + functor gs_139 = MLTreeHash
8711 + end
8712 + local
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
8719 + in
8720 + functor gs_140 = MLTreeEval
8721 + end
8722 + local
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
8729 + in
8730 + functor gs_141 = GCCells
8731 + end
8732 + local
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
8745 + in
8746 + functor gs_142 = CheckPlacementFn
8747 + end
8748 + local
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
8756 + in
8757 + functor gs_143 = Cells
8758 + end
8759 + local
8760 + signature DELAY_SLOT_PROPERTIES = gs_59
8761 + signature INSTRUCTIONS = gs_15
8762 + ../backpatch/noDelaySlots.sml
8763 + in
8764 + functor gs_144 = NoDelaySlots
8765 + end
8766 + local
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
8774 + in
8775 + signature gs_145 = ASM_FORMAT_UTIL
8776 + structure gs_146 = AsmFormatUtil
8777 + end
8778 + local
8779 + open l13
8780 + in
8781 + structure gs_147 = ListPair
8782 + end
8783 + local
8784 + open l13
8785 + in
8786 + structure gs_148 = Option
8787 + end
8788 + local
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
8795 + in
8796 + functor gs_149 = Shuffle
8797 + end
8798 + local
8799 + open l5
8800 + in
8801 + functor gs_150 = DirectedGraph
8802 + structure gs_151 = DirectedGraph
8803 + end
8804 + local
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
8819 + in
8820 + functor gs_152 = EstimateLoopProbsFn
8821 + end
8822 + local
8823 + open l13
8824 + in
8825 + structure gs_153 = StringCvt
8826 + end
8827 + local
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
8838 + in
8839 + structure gs_154 = MachineInt
8840 + end
8841 + local
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
8855 + ../ra/mem-ra.sml
8856 + in
8857 + functor gs_155 = MemoryRA
8858 + end
8859 + local
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
8865 + in
8866 + functor gs_156 = RASpillTypes
8867 + end
8868 + local
8869 + open l13
8870 + in
8871 + structure gs_157 = Word8Vector
8872 + end
8873 + local
8874 + signature INSTRUCTIONS = gs_15
8875 + structure Word8Vector = gs_157
8876 + ../emit/mc-emit.sig
8877 + in
8878 + signature gs_158 = MC_EMIT
8879 + end
8880 + local
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
8897 + in
8898 + functor gs_159 = BackPatch
8899 + end
8900 + local
8901 + open l9
8902 + in
8903 + structure gs_160 = PriorityHeap
8904 + end
8905 + local
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
8914 + in
8915 + structure gs_161 = ChowHennessySpillHeur
8916 + end
8917 + local
8918 + open l9
8919 + in
8920 + signature gs_162 = LINE_BREAK
8921 + structure gs_163 = LineBreak
8922 + end
8923 + local
8924 + open l9
8925 + in
8926 + structure gs_164 = StringOutStream
8927 + end
8928 + local
8929 + open l5
8930 + in
8931 + signature gs_165 = UPDATE_GRAPH_INFO
8932 + structure gs_166 = UpdateGraphInfo
8933 + end
8934 + local
8935 + open l13
8936 + in
8937 + structure gs_167 = Bool
8938 + end
8939 + local
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
8970 + in
8971 + functor gs_168 = ControlFlowGraph
8972 + end
8973 + local
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
8985 + in
8986 + functor gs_169 = MLTreeF
8987 + end
8988 + local
8989 + open l13
8990 + in
8991 + structure gs_170 = General
8992 + end
8993 + local
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
9003 + in
9004 + signature gs_171 = LIVENESS
9005 + functor gs_172 = Liveness
9006 + end
9007 + local
9008 + structure CellsBasis = gs_13
9009 + signature INSTRUCTIONS = gs_15
9010 + ../instructions/rewrite.sig
9011 + in
9012 + signature gs_173 = REWRITE_INSTRUCTIONS
9013 + end
9014 + local
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
9037 + ../ra/risc-ra.sml
9038 + in
9039 + functor gs_174 = RISC_RA
9040 + end
9041 + local
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
9050 + in
9051 + functor gs_175 = CFGCountCopies
9052 + end
9053 + local
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
9062 + in
9063 + functor gs_176 = CFGEmit
9064 + end
9065 + local
9066 + structure Array = gs_4
9067 + signature GETREG = gs_57
9068 + ../ra/getreg2.sml
9069 + in
9070 + functor gs_177 = GetReg2
9071 + end
9072 + local
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
9078 + in
9079 + signature gs_178 = OMIT_FRAME_POINTER
9080 + end
9081 + local
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
9088 + in
9089 + functor gs_179 = RegionBasedRA
9090 + end
9091 + local
9092 + signature MLRISC_REGION = gs_89
9093 + structure String = gs_7
9094 + ../aliasing/mlriscRegion.sml
9095 + in
9096 + structure gs_180 = MLRiscRegion
9097 + end
9098 + local
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
9113 + in
9114 + functor gs_181 = RASpill
9115 + end
9116 +in
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
9250 +end
9251 +end
9252 +
9253 +end
9254 diff --git a/mlb/MLTREE.mlb b/mlb/MLTREE.mlb
9255 new file mode 100644
9256 index 0000000..16030cf
9257 --- /dev/null
9258 +++ b/mlb/MLTREE.mlb
9259 @@ -0,0 +1,211 @@
9260 +
9261 +ann
9262 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
9263 + "redundantBind warn" "redundantMatch warn"
9264 + "sequenceNonUnit ignore"
9265 + "warnUnused false" "forceUsed"
9266 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
9267 +in
9268 +
9269 +local
9270 + basis l18 =
9271 + bas
9272 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
9273 + end
9274 + basis l4 =
9275 + bas
9276 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
9277 + end
9278 + basis l41 =
9279 + bas
9280 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
9281 + end
9282 + basis l67 =
9283 + bas
9284 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
9285 + end
9286 +in
9287 +local
9288 + $(SML_LIB)/basis/pervasive.mlb
9289 + local
9290 + open l4
9291 + in
9292 + signature gs_0 = MLTREE
9293 + end
9294 + local
9295 + signature MLTREE = gs_0
9296 + ../mltree/mltree-rewrite.sig
9297 + in
9298 + signature gs_1 = MLTREE_REWRITE
9299 + end
9300 + local
9301 + signature MLTREE = gs_0
9302 + signature MLTREE_REWRITE = gs_1
9303 + ../mltree/mltree-rewrite.sml
9304 + in
9305 + functor gs_2 = MLTreeRewrite
9306 + end
9307 + local
9308 + signature MLTREE = gs_0
9309 + ../mltree/mltree-fold.sig
9310 + in
9311 + signature gs_3 = MLTREE_FOLD
9312 + end
9313 + local
9314 + open l18
9315 + in
9316 + structure gs_4 = Word
9317 + end
9318 + local
9319 + open l4
9320 + in
9321 + structure gs_5 = CellsBasis
9322 + end
9323 + local
9324 + open l18
9325 + in
9326 + structure gs_6 = IntInf
9327 + end
9328 + local
9329 + open l4
9330 + in
9331 + structure gs_7 = Label
9332 + end
9333 + local
9334 + open l18
9335 + in
9336 + structure gs_8 = String
9337 + end
9338 + local
9339 + open l18
9340 + in
9341 + structure gs_9 = List
9342 + end
9343 + local
9344 + open l18
9345 + in
9346 + structure gs_10 = Char
9347 + end
9348 + local
9349 + open l41
9350 + in
9351 + signature gs_11 = MLRISC_ERROR_MSG
9352 + structure gs_12 = MLRiscErrorMsg
9353 + end
9354 + local
9355 + open l18
9356 + in
9357 + structure gs_13 = Int
9358 + end
9359 + local
9360 + signature MLTREE = gs_0
9361 + ../mltree/mltree-utils.sig
9362 + in
9363 + signature gs_14 = MLTREE_UTILS
9364 + end
9365 + local
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
9379 + in
9380 + functor gs_15 = MLTreeUtils
9381 + end
9382 + local
9383 + open l4
9384 + in
9385 + signature gs_16 = CONTROL_FLOW_GRAPH
9386 + end
9387 + local
9388 + open l4
9389 + in
9390 + signature gs_17 = INSTRUCTION_STREAM
9391 + end
9392 + local
9393 + open l4
9394 + in
9395 + signature gs_18 = INSTRUCTIONS
9396 + end
9397 + local
9398 + open l4
9399 + in
9400 + signature gs_19 = CELLS
9401 + end
9402 + local
9403 + open l67
9404 + in
9405 + structure gs_20 = Annotations
9406 + end
9407 + local
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
9414 + in
9415 + signature gs_21 = INSTR_GEN
9416 + end
9417 + local
9418 + signature MLTREE = gs_0
9419 + signature MLTREE_FOLD = gs_3
9420 + ../mltree/mltree-fold.sml
9421 + in
9422 + functor gs_22 = MLTreeFold
9423 + end
9424 + local
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
9432 + in
9433 + functor gs_23 = InstrGen
9434 + end
9435 + local
9436 + signature MLTREE = gs_0
9437 + ../mltree/mltree-simplify.sig
9438 + in
9439 + signature gs_24 = MLTREE_SIMPLIFIER
9440 + end
9441 + local
9442 + open l4
9443 + in
9444 + signature gs_25 = MLTREE_SIZE
9445 + end
9446 + local
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
9453 + in
9454 + functor gs_26 = MLTreeSimplifier
9455 + end
9456 +in
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
9467 +end
9468 +end
9469 +
9470 +end
9471 diff --git a/mlb/PPC.mlb b/mlb/PPC.mlb
9472 new file mode 100644
9473 index 0000000..22161b0
9474 --- /dev/null
9475 +++ b/mlb/PPC.mlb
9476 @@ -0,0 +1,575 @@
9477 +
9478 +ann
9479 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
9480 + "redundantBind warn" "redundantMatch warn"
9481 + "sequenceNonUnit ignore"
9482 + "warnUnused false" "forceUsed"
9483 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
9484 +in
9485 +
9486 +local
9487 + basis l42 =
9488 + bas
9489 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
9490 + end
9491 + basis l116 =
9492 + bas
9493 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
9494 + end
9495 + basis l4 =
9496 + bas
9497 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
9498 + end
9499 + basis l50 =
9500 + bas
9501 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
9502 + end
9503 + basis l9 =
9504 + bas
9505 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
9506 + end
9507 +in
9508 +local
9509 + $(SML_LIB)/basis/pervasive.mlb
9510 + local
9511 + open l4
9512 + in
9513 + signature gs_0 = FREQUENCY_PROPERTIES
9514 + end
9515 + local
9516 + open l9
9517 + in
9518 + signature gs_1 = PROBABILITY
9519 + structure gs_2 = Probability
9520 + end
9521 + local
9522 + open l4
9523 + in
9524 + structure gs_3 = MLRiscAnnotations
9525 + end
9526 + local
9527 + open l4
9528 + in
9529 + signature gs_4 = REGION
9530 + end
9531 + local
9532 + open l4
9533 + in
9534 + signature gs_5 = CONSTANT
9535 + end
9536 + local
9537 + open l4
9538 + in
9539 + signature gs_6 = MLTREE
9540 + end
9541 + local
9542 + open l4
9543 + in
9544 + signature gs_7 = CELLS_BASIS
9545 + end
9546 + local
9547 + open l4
9548 + in
9549 + structure gs_8 = CellsBasis
9550 + end
9551 + local
9552 + open l4
9553 + in
9554 + structure gs_9 = Label
9555 + end
9556 + local
9557 + open l9
9558 + in
9559 + structure gs_10 = Annotations
9560 + end
9561 + local
9562 + open l4
9563 + in
9564 + functor gs_11 = Cells
9565 + end
9566 + local
9567 + open l42
9568 + in
9569 + structure gs_12 = Int
9570 + end
9571 + local
9572 + open l4
9573 + in
9574 + signature gs_13 = CELLS
9575 + end
9576 + local
9577 + open l50
9578 + in
9579 + signature gs_14 = MLRISC_ERROR_MSG
9580 + structure gs_15 = MLRiscErrorMsg
9581 + end
9582 + local
9583 + open l50
9584 + in
9585 + signature gs_16 = MLRISC_CONTROL
9586 + structure gs_17 = MLRiscControl
9587 + end
9588 + local
9589 + signature MLRISC_CONTROL = gs_16
9590 + structure MLRiscControl = gs_17
9591 + ../ppc/emit/ppcAsmSyntax.sml
9592 + in
9593 + structure gs_18 = PPCAsmSyntax
9594 + end
9595 + local
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
9604 + in
9605 + signature gs_19 = PPCCELLS
9606 + structure gs_20 = PPCCells
9607 + end
9608 + local
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
9619 + in
9620 + signature gs_21 = PPCINSTR
9621 + functor gs_22 = PPCInstr
9622 + end
9623 + local
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
9631 + in
9632 + functor gs_23 = PPCFreqProps
9633 + end
9634 + local
9635 + open l4
9636 + in
9637 + signature gs_24 = INSTRUCTION_EMITTER
9638 + end
9639 + local
9640 + open l4
9641 + in
9642 + signature gs_25 = ASM_FORMAT_UTIL
9643 + structure gs_26 = AsmFormatUtil
9644 + end
9645 + local
9646 + open l4
9647 + in
9648 + signature gs_27 = ASM_STREAM
9649 + structure gs_28 = AsmStream
9650 + end
9651 + local
9652 + open l42
9653 + in
9654 + structure gs_29 = TextIO
9655 + end
9656 + local
9657 + open l42
9658 + in
9659 + structure gs_30 = String
9660 + end
9661 + local
9662 + open l4
9663 + in
9664 + structure gs_31 = AsmFlags
9665 + end
9666 + local
9667 + open l4
9668 + in
9669 + signature gs_32 = MLTREE_EVAL
9670 + end
9671 + local
9672 + open l4
9673 + in
9674 + signature gs_33 = INSTRUCTION_STREAM
9675 + end
9676 + local
9677 + structure CellsBasis = gs_8
9678 + signature PPCINSTR = gs_21
9679 + functor PPCInstr = gs_22
9680 + ../ppc/instructions/ppcShuffle.sig
9681 + in
9682 + signature gs_34 = PPCSHUFFLE
9683 + end
9684 + local
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
9704 + in
9705 + functor gs_35 = PPCAsmEmitter
9706 + end
9707 + local
9708 + structure CellsBasis = gs_8
9709 + signature PPCINSTR = gs_21
9710 + functor PPCInstr = gs_22
9711 + ../ppc/mltree/ppcPseudoInstr.sig
9712 + in
9713 + signature gs_36 = PPC_PSEUDO_INSTR
9714 + end
9715 + local
9716 + open l4
9717 + in
9718 + signature gs_37 = PSEUDO_OPS_BASIS
9719 + end
9720 + local
9721 + open l4
9722 + in
9723 + functor gs_38 = PseudoOpsBig
9724 + end
9725 + local
9726 + open l116
9727 + in
9728 + structure gs_39 = Format
9729 + end
9730 + local
9731 + open l4
9732 + in
9733 + structure gs_40 = PseudoOpsBasisTyp
9734 + end
9735 + local
9736 + open l42
9737 + in
9738 + structure gs_41 = IntInf
9739 + end
9740 + local
9741 + open l42
9742 + in
9743 + structure gs_42 = Word32
9744 + end
9745 + local
9746 + open l116
9747 + in
9748 + structure gs_43 = Atom
9749 + end
9750 + local
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
9766 + in
9767 + functor gs_44 = PPCDarwinPseudoOps
9768 + end
9769 + local
9770 + open l4
9771 + in
9772 + signature gs_45 = ARCH_SPILL_INSTR
9773 + end
9774 + local
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
9781 + in
9782 + functor gs_46 = PPCRewrite
9783 + end
9784 + local
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
9793 + in
9794 + functor gs_47 = PPCSpillInstr
9795 + end
9796 + local
9797 + open l4
9798 + in
9799 + functor gs_48 = GasPseudoOps
9800 + end
9801 + local
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
9813 + in
9814 + functor gs_49 = PPCGasPseudoOps
9815 + end
9816 + local
9817 + open l4
9818 + in
9819 + signature gs_50 = INSN_PROPERTIES
9820 + end
9821 + local
9822 + open l42
9823 + in
9824 + structure gs_51 = Word
9825 + end
9826 + local
9827 + open l4
9828 + in
9829 + signature gs_52 = MLTREE_HASH
9830 + end
9831 + local
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
9844 + in
9845 + functor gs_53 = PPCProps
9846 + end
9847 + local
9848 + open l4
9849 + in
9850 + signature gs_54 = SDI_JUMPS
9851 + end
9852 + local
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
9865 + in
9866 + functor gs_55 = PPCJumps
9867 + end
9868 + local
9869 + ../ppc/instructions/ppcInstrExt.sml
9870 + in
9871 + structure gs_56 = PPCInstrExt
9872 + end
9873 + local
9874 + open l4
9875 + in
9876 + signature gs_57 = CONTROL_FLOW_GRAPH
9877 + end
9878 + local
9879 + open l4
9880 + in
9881 + signature gs_58 = MLTREE_STREAM
9882 + end
9883 + local
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
9892 + in
9893 + signature gs_59 = PPCCOMP_INSTR_EXT
9894 + functor gs_60 = PPCCompInstrExt
9895 + end
9896 + local
9897 + open l4
9898 + in
9899 + signature gs_61 = DELAY_SLOT_PROPERTIES
9900 + end
9901 + local
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
9909 + in
9910 + functor gs_62 = PPCDelaySlots
9911 + end
9912 + local
9913 + open l4
9914 + in
9915 + structure gs_63 = CTypes
9916 + end
9917 + local
9918 + open l42
9919 + in
9920 + structure gs_64 = List
9921 + end
9922 + local
9923 + open l4
9924 + in
9925 + signature gs_65 = C_CALLS
9926 + end
9927 + local
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
9942 + in
9943 + functor gs_66 = PPCMacOSX_CCalls
9944 + signature gs_67 = PPC_MACOSX_C_CALLS
9945 + end
9946 + local
9947 + open l4
9948 + in
9949 + functor gs_68 = Shuffle
9950 + end
9951 + local
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
9959 + in
9960 + functor gs_69 = PPCShuffle
9961 + end
9962 + local
9963 + open l42
9964 + in
9965 + structure gs_70 = Word8
9966 + end
9967 + local
9968 + open l4
9969 + in
9970 + signature gs_71 = CODE_STRING
9971 + end
9972 + local
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
9986 + in
9987 + functor gs_72 = PPCMCEmitter
9988 + end
9989 + local
9990 + open l4
9991 + in
9992 + functor gs_73 = MLTreeMult
9993 + end
9994 + local
9995 + open l4
9996 + in
9997 + functor gs_74 = MLTreeGen
9998 + end
9999 + local
10000 + open l4
10001 + in
10002 + signature gs_75 = MLTREECOMP
10003 + signature gs_76 = MLTREE_EXTENSION_COMP
10004 + end
10005 + local
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
10021 + in
10022 + functor gs_77 = PPC
10023 + end
10024 +in
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
10048 +end
10049 +end
10050 +
10051 +end
10052 diff --git a/mlb/Peephole.mlb b/mlb/Peephole.mlb
10053 new file mode 100644
10054 index 0000000..7fd857c
10055 --- /dev/null
10056 +++ b/mlb/Peephole.mlb
10057 @@ -0,0 +1,63 @@
10058 +
10059 +ann
10060 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10061 + "redundantBind warn" "redundantMatch warn"
10062 + "sequenceNonUnit ignore"
10063 + "warnUnused false" "forceUsed"
10064 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10065 +in
10066 +
10067 +local
10068 + basis l4 =
10069 + bas
10070 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10071 + end
10072 + basis l14 =
10073 + bas
10074 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
10075 + end
10076 +in
10077 +local
10078 + $(SML_LIB)/basis/pervasive.mlb
10079 + local
10080 + open l4
10081 + in
10082 + signature gs_0 = INSTRUCTIONS
10083 + end
10084 + local
10085 + signature INSTRUCTIONS = gs_0
10086 + ../instructions/peephole.sig
10087 + in
10088 + signature gs_1 = PEEPHOLE
10089 + end
10090 + local
10091 + open l4
10092 + in
10093 + signature gs_2 = CFG_OPTIMIZATION
10094 + end
10095 + local
10096 + open l14
10097 + in
10098 + structure gs_3 = Graph
10099 + end
10100 + local
10101 + open l4
10102 + in
10103 + signature gs_4 = CONTROL_FLOW_GRAPH
10104 + end
10105 + local
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
10111 + in
10112 + functor gs_5 = CFGPeephole
10113 + end
10114 +in
10115 + functor CFGPeephole = gs_5
10116 + signature PEEPHOLE = gs_1
10117 +end
10118 +end
10119 +
10120 +end
10121 diff --git a/mlb/RA.mlb b/mlb/RA.mlb
10122 new file mode 100644
10123 index 0000000..17f5023
10124 --- /dev/null
10125 +++ b/mlb/RA.mlb
10126 @@ -0,0 +1,154 @@
10127 +
10128 +ann
10129 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10130 + "redundantBind warn" "redundantMatch warn"
10131 + "sequenceNonUnit ignore"
10132 + "warnUnused false" "forceUsed"
10133 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10134 +in
10135 +
10136 +local
10137 + basis l11 =
10138 + bas
10139 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10140 + end
10141 + basis l22 =
10142 + bas
10143 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
10144 + end
10145 + basis l4 =
10146 + bas
10147 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10148 + end
10149 + basis l53 =
10150 + bas
10151 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
10152 + end
10153 + basis l29 =
10154 + bas
10155 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
10156 + end
10157 +in
10158 +local
10159 + $(SML_LIB)/basis/pervasive.mlb
10160 + local
10161 + open l4
10162 + in
10163 + signature gs_0 = RA_SPILL_HEURISTICS
10164 + end
10165 + local
10166 + open l4
10167 + in
10168 + structure gs_1 = RACore
10169 + end
10170 + local
10171 + open l11
10172 + in
10173 + structure gs_2 = Real
10174 + end
10175 + local
10176 + open l4
10177 + in
10178 + structure gs_3 = RAGraph
10179 + end
10180 + local
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
10186 + in
10187 + functor gs_4 = ImprovedChaitinSpillHeur
10188 + end
10189 + local
10190 + open l22
10191 + in
10192 + structure gs_5 = IntHashTable
10193 + end
10194 + local
10195 + open l11
10196 + in
10197 + structure gs_6 = Option
10198 + end
10199 + local
10200 + open l29
10201 + in
10202 + structure gs_7 = PriorityHeap
10203 + end
10204 + local
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
10213 + in
10214 + functor gs_8 = ImprovedChowHennessySpillHeur
10215 + end
10216 + local
10217 + open l4
10218 + in
10219 + signature gs_9 = RA_SPILL
10220 + end
10221 + local
10222 + open l11
10223 + in
10224 + structure gs_10 = Int
10225 + end
10226 + local
10227 + open l4
10228 + in
10229 + functor gs_11 = RASpillTypes
10230 + end
10231 + local
10232 + open l4
10233 + in
10234 + structure gs_12 = CellsBasis
10235 + end
10236 + local
10237 + open l11
10238 + in
10239 + structure gs_13 = Word
10240 + end
10241 + local
10242 + open l53
10243 + in
10244 + signature gs_14 = MLRISC_ERROR_MSG
10245 + structure gs_15 = MLRiscErrorMsg
10246 + end
10247 + local
10248 + open l4
10249 + in
10250 + signature gs_16 = INSTRUCTION_EMITTER
10251 + end
10252 + local
10253 + open l4
10254 + in
10255 + signature gs_17 = INSN_PROPERTIES
10256 + end
10257 + local
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
10270 + in
10271 + functor gs_18 = RASpillWithRenaming
10272 + end
10273 +in
10274 + functor ImprovedChaitinSpillHeur = gs_4
10275 + functor ImprovedChowHennessySpillHeur = gs_8
10276 + functor RASpillWithRenaming = gs_18
10277 +end
10278 +end
10279 +
10280 +end
10281 diff --git a/mlb/SPARC.mlb b/mlb/SPARC.mlb
10282 new file mode 100644
10283 index 0000000..79a0cfb
10284 --- /dev/null
10285 +++ b/mlb/SPARC.mlb
10286 @@ -0,0 +1,540 @@
10287 +
10288 +ann
10289 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10290 + "redundantBind warn" "redundantMatch warn"
10291 + "sequenceNonUnit ignore"
10292 + "warnUnused false" "forceUsed"
10293 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10294 +in
10295 +
10296 +local
10297 + basis l38 =
10298 + bas
10299 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10300 + end
10301 + basis l136 =
10302 + bas
10303 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
10304 + end
10305 + basis l4 =
10306 + bas
10307 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10308 + end
10309 + basis l46 =
10310 + bas
10311 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
10312 + end
10313 + basis l30 =
10314 + bas
10315 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
10316 + end
10317 +in
10318 +local
10319 + $(SML_LIB)/basis/pervasive.mlb
10320 + local
10321 + open l4
10322 + in
10323 + signature gs_0 = CONTROL_FLOW_GRAPH
10324 + end
10325 + local
10326 + open l4
10327 + in
10328 + signature gs_1 = MLTREE_STREAM
10329 + end
10330 + local
10331 + open l4
10332 + in
10333 + signature gs_2 = MLTREE
10334 + end
10335 + local
10336 + open l4
10337 + in
10338 + signature gs_3 = REGION
10339 + end
10340 + local
10341 + open l4
10342 + in
10343 + signature gs_4 = CONSTANT
10344 + end
10345 + local
10346 + open l4
10347 + in
10348 + signature gs_5 = CELLS_BASIS
10349 + end
10350 + local
10351 + open l4
10352 + in
10353 + structure gs_6 = CellsBasis
10354 + end
10355 + local
10356 + open l4
10357 + in
10358 + structure gs_7 = Label
10359 + end
10360 + local
10361 + open l30
10362 + in
10363 + structure gs_8 = Annotations
10364 + end
10365 + local
10366 + open l4
10367 + in
10368 + functor gs_9 = Cells
10369 + end
10370 + local
10371 + open l38
10372 + in
10373 + structure gs_10 = Int
10374 + end
10375 + local
10376 + open l4
10377 + in
10378 + signature gs_11 = CELLS
10379 + end
10380 + local
10381 + open l46
10382 + in
10383 + signature gs_12 = MLRISC_ERROR_MSG
10384 + structure gs_13 = MLRiscErrorMsg
10385 + end
10386 + local
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
10394 + in
10395 + signature gs_14 = SPARCCELLS
10396 + structure gs_15 = SparcCells
10397 + end
10398 + local
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
10409 + in
10410 + signature gs_16 = SPARCINSTR
10411 + functor gs_17 = SparcInstr
10412 + end
10413 + local
10414 + ../sparc/instructions/sparcinstr-ext.sml
10415 + in
10416 + structure gs_18 = SparcInstrExt
10417 + end
10418 + local
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
10426 + in
10427 + signature gs_19 = SPARCCOMP_INSTR_EXT
10428 + functor gs_20 = SparcCompInstrExt
10429 + end
10430 + local
10431 + open l4
10432 + in
10433 + signature gs_21 = INSTRUCTION_EMITTER
10434 + end
10435 + local
10436 + open l38
10437 + in
10438 + structure gs_22 = Word8
10439 + end
10440 + local
10441 + open l38
10442 + in
10443 + structure gs_23 = Word32
10444 + end
10445 + local
10446 + open l4
10447 + in
10448 + signature gs_24 = CODE_STRING
10449 + end
10450 + local
10451 + open l4
10452 + in
10453 + signature gs_25 = INSTRUCTION_STREAM
10454 + end
10455 + local
10456 + open l4
10457 + in
10458 + signature gs_26 = MLTREE_EVAL
10459 + end
10460 + local
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
10474 + in
10475 + functor gs_27 = SparcMCEmitter
10476 + end
10477 + local
10478 + open l4
10479 + in
10480 + functor gs_28 = Shuffle
10481 + end
10482 + local
10483 + open l38
10484 + in
10485 + structure gs_29 = Option
10486 + end
10487 + local
10488 + structure CellsBasis = gs_6
10489 + signature SPARCINSTR = gs_16
10490 + functor SparcInstr = gs_17
10491 + ../sparc/instructions/sparcShuffle.sig
10492 + in
10493 + signature gs_30 = SPARCSHUFFLE
10494 + end
10495 + local
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
10506 + in
10507 + functor gs_31 = SparcShuffle
10508 + end
10509 + local
10510 + open l4
10511 + in
10512 + signature gs_32 = DELAY_SLOT_PROPERTIES
10513 + end
10514 + local
10515 + open l4
10516 + in
10517 + signature gs_33 = INSN_PROPERTIES
10518 + end
10519 + local
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
10529 + in
10530 + functor gs_34 = SparcDelaySlots
10531 + end
10532 + local
10533 + open l4
10534 + in
10535 + signature gs_35 = FREQUENCY_PROPERTIES
10536 + end
10537 + local
10538 + open l30
10539 + in
10540 + signature gs_36 = PROBABILITY
10541 + structure gs_37 = Probability
10542 + end
10543 + local
10544 + open l4
10545 + in
10546 + structure gs_38 = MLRiscAnnotations
10547 + end
10548 + local
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
10556 + in
10557 + functor gs_39 = SparcFreqProps
10558 + end
10559 + local
10560 + open l4
10561 + in
10562 + signature gs_40 = PSEUDO_OPS_BASIS
10563 + end
10564 + local
10565 + open l4
10566 + in
10567 + functor gs_41 = GasPseudoOps
10568 + end
10569 + local
10570 + open l4
10571 + in
10572 + functor gs_42 = PseudoOpsBig
10573 + end
10574 + local
10575 + open l136
10576 + in
10577 + structure gs_43 = Format
10578 + end
10579 + local
10580 + open l4
10581 + in
10582 + structure gs_44 = PseudoOpsBasisTyp
10583 + end
10584 + local
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
10596 + in
10597 + functor gs_45 = SparcGasPseudoOps
10598 + end
10599 + local
10600 + open l4
10601 + in
10602 + functor gs_46 = MLTreeMult
10603 + end
10604 + local
10605 + open l4
10606 + in
10607 + functor gs_47 = MLTreeGen
10608 + end
10609 + local
10610 + open l4
10611 + in
10612 + signature gs_48 = MLTREECOMP
10613 + signature gs_49 = MLTREE_EXTENSION_COMP
10614 + end
10615 + local
10616 + structure CellsBasis = gs_6
10617 + signature SPARCINSTR = gs_16
10618 + functor SparcInstr = gs_17
10619 + ../sparc/mltree/sparcPseudoInstr.sig
10620 + in
10621 + signature gs_50 = SPARC_PSEUDO_INSTR
10622 + end
10623 + local
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
10637 + in
10638 + functor gs_51 = Sparc
10639 + end
10640 + local
10641 + open l38
10642 + in
10643 + structure gs_52 = IntInf
10644 + end
10645 + local
10646 + open l38
10647 + in
10648 + structure gs_53 = Word
10649 + end
10650 + local
10651 + open l4
10652 + in
10653 + signature gs_54 = MLTREE_HASH
10654 + end
10655 + local
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
10669 + in
10670 + functor gs_55 = SparcProps
10671 + end
10672 + local
10673 + open l4
10674 + in
10675 + signature gs_56 = SDI_JUMPS
10676 + end
10677 + local
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
10688 + in
10689 + functor gs_57 = SparcJumps
10690 + end
10691 + local
10692 + open l4
10693 + in
10694 + signature gs_58 = C_CALLS
10695 + end
10696 + local
10697 + open l4
10698 + in
10699 + structure gs_59 = CTypes
10700 + end
10701 + local
10702 + open l38
10703 + in
10704 + structure gs_60 = String
10705 + end
10706 + local
10707 + open l38
10708 + in
10709 + structure gs_61 = List
10710 + end
10711 + local
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
10725 + in
10726 + functor gs_62 = Sparc_CCalls
10727 + end
10728 + local
10729 + open l4
10730 + in
10731 + signature gs_63 = ASM_FORMAT_UTIL
10732 + structure gs_64 = AsmFormatUtil
10733 + end
10734 + local
10735 + open l4
10736 + in
10737 + signature gs_65 = ASM_STREAM
10738 + structure gs_66 = AsmStream
10739 + end
10740 + local
10741 + open l38
10742 + in
10743 + structure gs_67 = TextIO
10744 + end
10745 + local
10746 + open l4
10747 + in
10748 + structure gs_68 = AsmFlags
10749 + end
10750 + local
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
10771 + in
10772 + functor gs_69 = SparcAsmEmitter
10773 + end
10774 + local
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
10781 + in
10782 + functor gs_70 = SparcRewrite
10783 + end
10784 + local
10785 + open l4
10786 + in
10787 + signature gs_71 = ARCH_SPILL_INSTR
10788 + end
10789 + local
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
10798 + in
10799 + functor gs_72 = SparcSpillInstr
10800 + end
10801 +in
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
10823 +end
10824 +end
10825 +
10826 +end
10827 diff --git a/mlb/StagedAlloc.mlb b/mlb/StagedAlloc.mlb
10828 new file mode 100644
10829 index 0000000..4a9ddf8
10830 --- /dev/null
10831 +++ b/mlb/StagedAlloc.mlb
10832 @@ -0,0 +1,93 @@
10833 +
10834 +ann
10835 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10836 + "redundantBind warn" "redundantMatch warn"
10837 + "sequenceNonUnit ignore"
10838 + "warnUnused false" "forceUsed"
10839 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10840 +in
10841 +
10842 +local
10843 + basis l11 =
10844 + bas
10845 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10846 + end
10847 + basis l28 =
10848 + bas
10849 + (* $/smlnj-lib.cm ====> *) $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
10850 + end
10851 +in
10852 +local
10853 + $(SML_LIB)/basis/pervasive.mlb
10854 + local
10855 + ../staged-alloc/conventions/c-loc-kind.sml
10856 + in
10857 + structure gs_0 = CLocKind
10858 + end
10859 + local
10860 + ../staged-alloc/allocator/staged-allocation-sig.sml
10861 + in
10862 + signature gs_1 = STAGED_ALLOCATION
10863 + end
10864 + local
10865 + open l11
10866 + in
10867 + structure gs_2 = List
10868 + end
10869 + local
10870 + open l11
10871 + in
10872 + structure gs_3 = Int
10873 + end
10874 + local
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
10880 + in
10881 + functor gs_4 = SparcCConventionFn
10882 + end
10883 + local
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
10889 + in
10890 + functor gs_5 = X86CConventionFn
10891 + end
10892 + local
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
10898 + in
10899 + functor gs_6 = X86_64CConventionFn
10900 + end
10901 + local
10902 + open l28
10903 + in
10904 + structure gs_7 = IntBinaryMap
10905 + end
10906 + local
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
10912 + in
10913 + functor gs_8 = StagedAllocationFn
10914 + end
10915 +in
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
10922 +end
10923 +end
10924 +
10925 +end
10926 diff --git a/mlb/Visual.mlb b/mlb/Visual.mlb
10927 new file mode 100644
10928 index 0000000..7b85fd5
10929 --- /dev/null
10930 +++ b/mlb/Visual.mlb
10931 @@ -0,0 +1,254 @@
10932 +
10933 +ann
10934 + "nonexhaustiveBind warn" "nonexhaustiveMatch warn"
10935 + "redundantBind warn" "redundantMatch warn"
10936 + "sequenceNonUnit ignore"
10937 + "warnUnused false" "forceUsed"
10938 + "allowOrPats true" "allowSigWithtype true" "allowVectorExpsAndPats true"
10939 +in
10940 +
10941 +local
10942 + basis l23 =
10943 + bas
10944 + (* $/basis.cm ====> *) $(SML_LIB)/basis/basis.mlb $(SML_LIB)/basis/unsafe.mlb
10945 + end
10946 + basis l5 =
10947 + bas
10948 + (* $Control.cm(=(proxyLib.cm):.)/Control.cm =??=> *) Control.mlb
10949 + end
10950 + basis l19 =
10951 + bas
10952 + (* $Lib.cm(=(proxyLib.cm):.)/Lib.cm =??=> *) Lib.mlb
10953 + end
10954 + basis l12 =
10955 + bas
10956 + (* $Graphs.cm(=(proxyLib.cm):.)/Graphs.cm =??=> *) Graphs.mlb
10957 + end
10958 + basis l66 =
10959 + bas
10960 + (* $MLRISC.cm(=(proxyLib.cm):.)/MLRISC.cm =??=> *) MLRISC.mlb
10961 + end
10962 +in
10963 +local
10964 + $(SML_LIB)/basis/pervasive.mlb
10965 + local
10966 + open l5
10967 + in
10968 + signature gs_0 = MLRISC_CONTROL
10969 + structure gs_1 = MLRiscControl
10970 + end
10971 + local
10972 + open l12
10973 + in
10974 + signature gs_2 = ISOMORPHIC_GRAPH_VIEW
10975 + structure gs_3 = IsomorphicGraphView
10976 + end
10977 + local
10978 + open l12
10979 + in
10980 + structure gs_4 = Graph
10981 + end
10982 + local
10983 + open l19
10984 + in
10985 + structure gs_5 = Annotations
10986 + end
10987 + local
10988 + open l23
10989 + in
10990 + structure gs_6 = Int
10991 + end
10992 + local
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
10999 + in
11000 + structure gs_7 = GraphLayout
11001 + end
11002 + local
11003 + structure GraphLayout = gs_7
11004 + ../visualization/graphDisplay.sig
11005 + in
11006 + signature gs_8 = GRAPH_DISPLAY
11007 + end
11008 + local
11009 + open l23
11010 + in
11011 + structure gs_9 = String
11012 + end
11013 + local
11014 + open l23
11015 + in
11016 + structure gs_10 = List
11017 + end
11018 + local
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
11026 + in
11027 + structure gs_11 = daVinci
11028 + end
11029 + local
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
11036 + in
11037 + structure gs_12 = VCG
11038 + end
11039 + local
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
11046 + in
11047 + structure gs_13 = Dot
11048 + end
11049 + local
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
11057 + in
11058 + structure gs_14 = AllDisplays
11059 + end
11060 + local
11061 + open l23
11062 + in
11063 + structure gs_15 = TextIO
11064 + end
11065 + local
11066 + open l23
11067 + in
11068 + structure gs_16 = OS
11069 + end
11070 + local
11071 + structure GraphLayout = gs_7
11072 + ../visualization/graphViewer.sig
11073 + in
11074 + signature gs_17 = GRAPH_VIEWER
11075 + end
11076 + local
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
11087 + in
11088 + functor gs_18 = GraphViewer
11089 + end
11090 + local
11091 + open l66
11092 + in
11093 + structure gs_19 = Label
11094 + end
11095 + local
11096 + open l23
11097 + in
11098 + structure gs_20 = Array
11099 + end
11100 + local
11101 + open l23
11102 + in
11103 + structure gs_21 = Real
11104 + end
11105 + local
11106 + open l23
11107 + in
11108 + structure gs_22 = Math
11109 + end
11110 + local
11111 + open l66
11112 + in
11113 + signature gs_23 = INSTRUCTION_EMITTER
11114 + end
11115 + local
11116 + open l66
11117 + in
11118 + signature gs_24 = CONTROL_FLOW_GRAPH
11119 + end
11120 + local
11121 + open l19
11122 + in
11123 + structure gs_25 = StringOutStream
11124 + end
11125 + local
11126 + open l66
11127 + in
11128 + signature gs_26 = ASM_STREAM
11129 + structure gs_27 = AsmStream
11130 + end
11131 + local
11132 + open l66
11133 + in
11134 + signature gs_28 = INSTRUCTIONS
11135 + end
11136 + local
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
11145 + in
11146 + signature gs_29 = FORMAT_INSTRUCTION
11147 + functor gs_30 = FormatInstruction
11148 + end
11149 + local
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
11168 + in
11169 + functor gs_31 = CFGViewer
11170 + end
11171 +in
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
11182 +end
11183 +end
11184 +
11185 +end
11186 diff --git a/mlrisc-lib.mlb b/mlrisc-lib.mlb
11187 new file mode 100644
11188 index 0000000..3545999
11189 --- /dev/null
11190 +++ b/mlrisc-lib.mlb
11191 @@ -0,0 +1,24 @@
11192 +(* DO NOT USE. Only suitable for type-checking purposes. *)
11193 +local
11194 +mlb/ALPHA.mlb
11195 +mlb/AMD64.mlb
11196 +mlb/AMD64-Peephole.mlb
11197 +mlb/CCall.mlb
11198 +mlb/CCall-sparc.mlb
11199 +mlb/CCall-x86-64.mlb
11200 +mlb/CCall-x86.mlb
11201 +mlb/Control.mlb
11202 +mlb/Graphs.mlb
11203 +mlb/HPPA.mlb
11204 +mlb/IA32.mlb
11205 +mlb/IA32-Peephole.mlb
11206 +mlb/Lib.mlb
11207 +mlb/MLRISC.mlb
11208 +mlb/MLTREE.mlb
11209 +mlb/Peephole.mlb
11210 +mlb/PPC.mlb
11211 +mlb/RA.mlb
11212 +mlb/SPARC.mlb
11213 +mlb/StagedAlloc.mlb
11214 +mlb/Visual.mlb
11215 +in end
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
11223
11224 - sharing I.C = C
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
11249
11250 (*
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
11256 @@ -4,9 +4,33 @@
11257 functor InstrGen
11258 (structure I : INSTRUCTIONS
11259 structure Stream : INSTRUCTION_STREAM
11260 - structure CFG : CONTROL_FLOW_GRAPH
11261 - where I = I
11262 - and P = Stream.P
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
11290 ) : INSTR_GEN =
11291 struct
11292 structure C = I.C
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 =
11298 sig
11299
11300 structure T : MLTREE
11301 - structure Size : MLTREE_SIZE
11302 - where T = T
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
11324
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
11332
11333 structure T : MLTREE
11334 structure C : CELLS
11335 - structure I : INSTRUCTIONS where C=C
11336 + structure I : INSTRUCTIONS (* where C = C *)
11337
11338 exception TooComplex
11339
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
11347
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 *)
11360
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
11366 - )
11367 - (val trapping : bool (* trap on overflow? *)
11368 +
11369 + val trapping : bool (* trap on overflow? *)
11370 val multCost : int ref (* cost of multiplication *)
11371
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 *)
11377 - )
11378 - (val signed : bool (* signed? *)
11379 +
11380 + val signed : bool (* signed? *)
11381 ) : MLTREE_MULT_DIV =
11382 struct
11383 structure T = T
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
11389
11390 functor MLTreeSimplifier
11391 (structure T : MLTREE
11392 - structure Size : MLTREE_SIZE
11393 - where T = T
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
11415 (* Extension *)
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
11424
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
11448
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.
11458 *)
11459 + type controlflow = Label.label list (* control flow info *)
11460 + type ctrl = var (* control dependence info *)
11461 + type ctrls = ctrl list
11462 +
11463 datatype stm =
11464 (* assignment *)
11465 MV of ty * dst * rexp
11466 @@ -211,10 +215,7 @@ signature MLTREE = sig
11467 | GPR of rexp
11468 | FPR of fexp
11469
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.
11485 *)
11486 + type controlflow = Label.label list (* control flow info *)
11487 + type ctrl = var (* control dependence info *)
11488 + type ctrls = ctrl list
11489 +
11490 datatype stm =
11491 (* assignment *)
11492 MV of ty * dst * rexp
11493 @@ -199,10 +203,7 @@ struct
11494 | GPR of rexp
11495 | FPR of fexp
11496
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
11509 @@ -9,11 +9,56 @@
11510 signature MLTREE_EXTENSION_COMP =
11511 sig
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
11537 - where I = I
11538 - and P = TS.S.P
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
11566 +
11567 (*
11568 * The reducer is given to the client during the compilation of
11569 * the user extensions.
11570 @@ -34,11 +79,54 @@ signature MLTREECOMP =
11571 sig
11572 structure TS : MLTREE_STREAM
11573 structure I : INSTRUCTIONS
11574 - structure CFG : CONTROL_FLOW_GRAPH
11575 - where I = I
11576 - and P = TS.S.P
11577 - structure Gen : MLTREEGEN
11578 - where T = TS.T
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
11627
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
11634 @@ -2,7 +2,12 @@
11635
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
11645
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
11652 @@ -5,8 +5,12 @@
11653
11654
11655 functor PPCDelaySlots(structure I : PPCINSTR
11656 - structure P : INSN_PROPERTIES
11657 - where I = I
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 =
11665 struct
11666 structure I = I
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
11671 @@ -1,7 +1,70 @@
11672 functor PPCJumps
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
11741 ) : SDI_JUMPS =
11742 struct
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
11748 @@ -6,12 +6,92 @@
11749
11750
11751 functor PPCAsmEmitter(structure S : INSTRUCTION_STREAM
11752 - structure Instr : PPCINSTR
11753 - where T = S.P.T
11754 - structure Shuffle : PPCSHUFFLE
11755 - where I = Instr
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 =
11845 struct
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
11851 @@ -6,7 +6,27 @@
11852
11853
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! *)
11882 fun eByteW w =
11883 let val i = !loc
11884 + val w = W.toLargeWord w
11885 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
11886
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
11892 @@ -7,7 +7,27 @@
11893
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
11919
11920 structure T = T
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
11925 @@ -1,6 +1,26 @@
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 =
11951
11952 struct
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
11957 @@ -9,11 +9,54 @@
11958 signature PPCCOMP_INSTR_EXT =
11959 sig
11960 structure I : PPCINSTR
11961 - structure TS : MLTREE_STREAM
11962 - where T = I.T
11963 - structure CFG : CONTROL_FLOW_GRAPH
11964 - where I = I
11965 - and P = TS.S.P
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
12014
12015 type reducer =
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 (
12019
12020 structure I : PPCINSTR
12021 - structure TS : MLTREE_STREAM
12022 - where T = I.T
12023 - structure CFG : CONTROL_FLOW_GRAPH
12024 - where P = TS.S.P
12025 - and I = I
12026 -
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
12076
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
12082 @@ -8,7 +8,16 @@
12083 signature PPCINSTR =
12084 sig
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
12104 @@ -5,8 +5,48 @@
12105
12106 functor PPCProps
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 =
12153 struct
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 @@
12160
12161 functor PPC
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
12237
12238 (*
12239 * Support 64 bit mode?
12240 @@ -71,7 +137,7 @@ struct
12241 (*
12242 * Integer multiplication
12243 *)
12244 - functor Multiply32 = MLTreeMult
12245 + structure Mulu32 = MLTreeMult
12246 (structure I = I
12247 structure T = T
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}]
12253 - )
12254
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}]
12261 val sh1addv = NONE
12262 val sh2addv = NONE
12263 val sh3addv = NONE
12264 - )
12265 - (val signed = false)
12266
12267 - structure Muls32 = Multiply32
12268 - (val trapping = false
12269 + val signed = false)
12270 +
12271 + structure Muls32 = MLTreeMult
12272 + (structure I = I
12273 + structure T = T
12274 + structure CB = CellsBasis
12275 + val intTy = 32
12276 + type arg = {r1:CB.cell,r2:CB.cell,d:CB.cell}
12277 + type argi = {r:CB.cell,i:int,d:CB.cell}
12278 +
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}]
12284 +
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}]
12289 val sh1addv = NONE
12290 val sh2addv = NONE
12291 val sh3addv = NONE
12292 - )
12293 - (val signed = true)
12294
12295 - structure Mult32 = Multiply32
12296 - (val trapping = true
12297 + val signed = true)
12298 +
12299 + structure Mult32 = MLTreeMult
12300 + (structure I = I
12301 + structure T = T
12302 + structure CB = CellsBasis
12303 + val intTy = 32
12304 + type arg = {r1:CB.cell,r2:CB.cell,d:CB.cell}
12305 + type argi = {r:CB.cell,i:int,d:CB.cell}
12306 +
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}]
12312 +
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"
12317 val sh1addv = NONE
12318 val sh2addv = NONE
12319 val sh3addv = NONE
12320 - )
12321 - (val signed = true)
12322 +
12323 + val signed = true)
12324
12325 fun selectInstructions
12326 (instrStream as
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
12331 @@ -10,7 +10,16 @@
12332 *)
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
12346
12347 val spillToEA :
12348 CB.cellkind ->
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 @@
12354
12355 functor ClusterRA
12356 (structure Asm : INSTRUCTION_EMITTER
12357 - structure Flowgraph : CONTROL_FLOW_GRAPH
12358 - where I = Asm.I
12359 - and P = Asm.S.P
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
12403 ) : RA_FLOWGRAPH =
12404 struct
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
12410 @@ -11,7 +11,26 @@
12411 signature RA_CORE =
12412 sig
12413
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
12442 @@ -6,9 +6,9 @@
12443 * -- Allen
12444 *)
12445
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
12460
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
12486 - sharing I.C = C
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 *)
12494
12495 type flowgraph
12496
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 =
12502 sig
12503
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
12510 (*
12511 * The following are the data structures used in the register allocator.
12512 *)
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 @@
12518 * -- Allen
12519 *)
12520
12521 -local
12522 -
12523 - val debug = false
12524 -
12525 -in
12526 -
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
12537
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
12542 ) : RA_SPILL =
12543 struct
12544 + val debug = false
12545
12546 structure I = InsnProps.I
12547 structure P = InsnProps
12548 @@ -584,5 +583,3 @@ struct
12549 in spillRewrite
12550 end
12551 end
12552 -
12553 -end (* local *)
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 =
12559 sig
12560
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
12584 - sharing I.C = C
12585 + (* sharing I.C = C *)
12586
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
12598 type copyInstr =
12599 (CB.cell list * CB.cell list) * I.instruction -> I.instruction list
12600
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 @@
12606 * -- Allen
12607 *)
12608
12609 -local
12610 -
12611 - val debug = false
12612 -
12613 -in
12614 -
12615 functor RASpill
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
12625 ) : RA_SPILL =
12626 struct
12627 + val debug = false
12628
12629 structure I = InsnProps.I
12630 structure P = InsnProps
12631 @@ -451,5 +450,3 @@ struct
12632 in spillRewrite
12633 end
12634 end
12635 -
12636 -end (* local *)
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
12641 @@ -3,7 +3,26 @@
12642 *)
12643 signature RA_SPILL_HEURISTICS =
12644 sig
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
12666
12667 exception NoCandidate
12668
12669 diff --git a/ra/ra.sig b/ra/ra.sig
12670 index 7fdacac..549c5a4 100644
12671 --- a/ra/ra.sig
12672 +++ b/ra/ra.sig
12673 @@ -9,9 +9,23 @@ sig
12674 structure I : INSTRUCTIONS
12675 structure C : CELLS
12676 structure F : RA_FLOWGRAPH
12677 - sharing F.I = I
12678 - sharing I.C = C
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
12697
12698 type getreg = { pref : CB.cell_id list,
12699 stamp : int,
12700 diff --git a/ra/ra.sml b/ra/ra.sml
12701 index 388f0b2..bf66604 100644
12702 --- a/ra/ra.sml
12703 +++ b/ra/ra.sml
12704 @@ -37,9 +37,10 @@
12705 * -- Allen Leung (leunga@cs.nyu.edu)
12706 *)
12707
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 *)
12714 +) : RA =
12715 struct
12716
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
12722 @@ -4,10 +4,10 @@
12723 * it into manageable pieces to be allocated.
12724 *)
12725 functor RegionBasedRA
12726 - (RA : RA)
12727 - (FlowgraphPartitioner : RA_FLOWGRAPH_PARTITIONER
12728 + (structure RA : RA
12729 + structure FlowgraphPartitioner : RA_FLOWGRAPH_PARTITIONER
12730 where type flowgraph = RA.F.flowgraph
12731 - where C = RA.C
12732 + (* where C = RA.C *)
12733 ) : RA =
12734 struct
12735
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
12740 @@ -5,17 +5,57 @@
12741 *)
12742 functor RISC_RA
12743 (structure I : INSTRUCTIONS
12744 - structure Asm : INSTRUCTION_EMITTER
12745 - where I = I
12746 - structure CFG : CONTROL_FLOW_GRAPH
12747 - where I = I
12748 - and P = Asm.S.P
12749 - structure InsnProps : INSN_PROPERTIES
12750 - where I = I
12751 - structure Rewrite : REWRITE_INSTRUCTIONS
12752 - where I = I
12753 - structure SpillInstr : ARCH_SPILL_INSTR
12754 - where I = I
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
12806
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.
12812 *)
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
12820
12821 val architecture : string
12822
12823 @@ -85,9 +130,9 @@ struct
12824 (* The generic register allocator *)
12825 structure Ra =
12826 RegisterAllocator
12827 - (SpillHeur)
12828 + (structure SpillHeuristics = SpillHeur
12829 (* (ChowHennessySpillHeur) *)
12830 - (ClusterRA
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
12839 @@ -1,6 +1,11 @@
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 =
12851 struct
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
12856 @@ -5,8 +5,67 @@
12857 *)
12858 functor SparcJumps
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
12923 ) : SDI_JUMPS =
12924 struct
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
12930 @@ -6,12 +6,88 @@
12931
12932
12933 functor SparcAsmEmitter(structure S : INSTRUCTION_STREAM
12934 - structure Instr : SPARCINSTR
12935 - where T = S.P.T
12936 - structure Shuffle : SPARCSHUFFLE
12937 - where I = Instr
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
13022
13023 (*#line 466.21 "sparc/sparc.mdl"*)
13024 val V9 : bool
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
13029 @@ -6,7 +6,27 @@
13030
13031
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! *)
13060 fun eByteW w =
13061 let val i = !loc
13062 + val w = W.toLargeWord w
13063 in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
13064
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
13070 @@ -1,6 +1,26 @@
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 =
13096
13097 struct
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
13102 @@ -8,7 +8,16 @@
13103 signature SPARCINSTR =
13104 sig
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
13124 @@ -5,8 +5,48 @@
13125
13126 functor SparcProps
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 =
13173 struct
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
13179 @@ -7,12 +7,54 @@
13180 *)
13181 signature SPARCCOMP_INSTR_EXT = sig
13182 structure T : MLTREE
13183 - structure I : SPARCINSTR
13184 - where T = T
13185 - structure TS : MLTREE_STREAM
13186 - where T = I.T
13187 - structure CFG : CONTROL_FLOW_GRAPH
13188 - where I = I
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
13237
13238
13239 type reducer =
13240 @@ -27,11 +69,54 @@ end
13241
13242 functor SparcCompInstrExt
13243 (structure I : SPARCINSTR
13244 - structure TS : MLTREE_STREAM
13245 - where T = I.T
13246 - structure CFG : CONTROL_FLOW_GRAPH
13247 - where I = I
13248 - and P = TS.S.P
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 =
13298 struct
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 @@
13305
13306 functor Sparc
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
13313 -
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
13380
13381 (*
13382 * The client should also specify these parameters.
13383 @@ -76,8 +136,8 @@ struct
13384 val rep = NEITHER
13385 )
13386
13387 - functor Multiply32 = MLTreeMult
13388 - (structure I = I
13389 + structure Multiply32 = struct
13390 + structure I = I
13391 structure T = T
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}]
13398 - )
13399 + end
13400
13401 - functor Multiply64 = MLTreeMult
13402 - (structure I = I
13403 + structure Multiply64 = struct
13404 + structure I = I
13405 structure T = T
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}]
13412 - )
13413 + end
13414
13415 (* signed, trapping version of multiply and divide *)
13416 - structure Mult32 = Multiply32
13417 - (val trapping = true
13418 + structure Mult32 = MLTreeMult
13419 + (open Multiply32
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
13425 val sh1addv = NONE
13426 val sh2addv = NONE
13427 val sh3addv = NONE
13428 - )
13429 - (val signed = true)
13430 +
13431 + val signed = true)
13432
13433 (* unsigned, non-trapping version of multiply and divide *)
13434 - functor Mul32 = Multiply32
13435 - (val trapping = false
13436 + structure Mul32 = struct
13437 + open Multiply32
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}]
13442 val sh1addv = NONE
13443 val sh2addv = NONE
13444 val sh3addv = NONE
13445 - )
13446 - structure Mulu32 = Mul32(val signed = false)
13447 + end
13448 + structure Mulu32 = MLTreeMult(open Mul32 val signed = false)
13449
13450 - structure Muls32 = Mul32(val signed = true)
13451 + structure Muls32 = MLTreeMult(open Mul32 val signed = true)
13452
13453 (* signed, trapping version of multiply and divide *)
13454 - structure Mult64 = Multiply64
13455 - (val trapping = true
13456 + structure Mult64 = MLTreeMult
13457 + (open Multiply64
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
13463 val sh1addv = NONE
13464 val sh2addv = NONE
13465 val sh3addv = NONE
13466 - )
13467 - (val signed = true)
13468 +
13469 + val signed = true)
13470
13471 (* unsigned, non-trapping version of multiply and divide *)
13472 - functor Mul64 = Multiply64
13473 - (val trapping = false
13474 + structure Mul64 = struct
13475 + open Multiply64
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}]
13480 val sh1addv = NONE
13481 val sh2addv = NONE
13482 val sh3addv = NONE
13483 - )
13484 - structure Mulu64 = Mul64(val signed = false)
13485 + end
13486 + structure Mulu64 = MLTreeMult(open Mul64 val signed = false)
13487
13488 - structure Muls64 = Mul64(val signed = true)
13489 + structure Muls64 = MLTreeMult(open Mul64 val signed = true)
13490
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
13497 @@ -1,8 +1,13 @@
13498 functor CFGViewer
13499 (structure CFG : CONTROL_FLOW_GRAPH
13500 structure GraphViewer : GRAPH_VIEWER
13501 - structure Asm : INSTRUCTION_EMITTER where I = CFG.I)
13502 - : sig
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
13509 + ) : sig
13510 val view : CFG.cfg -> unit
13511 end =
13512 struct
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
13517 @@ -5,9 +5,72 @@
13518
13519 functor X86Jumps
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
13589 + ) : SDI_JUMPS =
13590 struct
13591 structure I = Instr
13592 structure C = I.C
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
13597 @@ -6,15 +6,126 @@
13598
13599
13600 functor X86AsmEmitter(structure S : INSTRUCTION_STREAM
13601 - structure Instr : X86INSTR
13602 - where T = S.P.T
13603 - structure Shuffle : X86SHUFFLE
13604 - where I = Instr
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
13687
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
13728
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
13735 @@ -7,7 +7,27 @@
13736 functor X86DarwinPseudoOps (
13737
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
13761
13762 ) : PSEUDO_OPS_BASIS = struct
13763
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
13768 @@ -5,7 +5,27 @@
13769 *)
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 =
13795
13796 struct
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
13801 @@ -8,7 +8,16 @@
13802 signature X86INSTR =
13803 sig
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
13849 ) : PEEPHOLE =
13850 struct
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
13858
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
13882 ): PEEPHOLE =
13883 struct
13884
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
13889 @@ -5,8 +5,48 @@
13890
13891 functor X86Props
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 =
13938 struct
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
13944 @@ -6,11 +6,54 @@
13945 *)
13946 signature X86COMP_INSTR_EXT = sig
13947 structure I : X86INSTR
13948 - structure TS : MLTREE_STREAM
13949 - where T = I.T
13950 - structure CFG : CONTROL_FLOW_GRAPH
13951 - where I = I
13952 - and P = TS.S.P
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
14001
14002 type reducer =
14003 (I.instruction, I.C.cellset, I.operand, I.addressing_mode, CFG.cfg) TS.reducer
14004 @@ -27,11 +70,54 @@ end
14005
14006 functor X86CompInstrExt
14007 ( structure I : X86INSTR
14008 - structure TS : MLTREE_STREAM
14009 - where T = I.T
14010 - structure CFG : CONTROL_FLOW_GRAPH
14011 - where P = TS.S.P
14012 - and I = I
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 =
14062 struct
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)
14070 *)
14071
14072 -local
14073 +functor X86FP
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 =
14147 +struct
14148 val debug = false (* set this to true to debug this module
14149 * set this to false for production use.
14150 *)
14151 val debugLiveness = true (* debug liveness analysis *)
14152 val debugDead = false (* debug dead code removal *)
14153 val sanityCheck = true
14154 -in
14155 -functor X86FP
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 =
14167 -struct
14168 +
14169 structure CFG = Flowgraph
14170 structure G = Graph
14171 structure I = X86Instr
14172 @@ -1670,5 +1731,3 @@ struct
14173 else repairCriticalEdges(Cfg)
14174 end
14175 end (* functor *)
14176 -
14177 -end (* local *)
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 @@
14183 *
14184 * -- Allen
14185 *)
14186 -local
14187 - val rewriteMemReg = true (* should we rewrite memRegs *)
14188 - val enableFastFPMode = true (* set this to false to disable the mode *)
14189 -in
14190
14191 functor X86
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
14269 val cvti2f :
14270 @@ -65,6 +123,9 @@ functor X86
14271 val rewriteMemReg : bool
14272 end =
14273 struct
14274 + val rewriteMemReg = true (* should we rewrite memRegs *)
14275 + val enableFastFPMode = true (* set this to false to disable the mode *)
14276 +
14277 structure I = X86Instr
14278 structure T = I.T
14279 structure TS = ExtensionComp.TS
14280 @@ -2011,5 +2072,3 @@ struct
14281 end
14282
14283 end (* functor *)
14284 -
14285 -end (* local *)
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
14290 @@ -10,8 +10,50 @@
14291 *)
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 =
14341 struct
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 @@
14348
14349 functor X86RA
14350 ( structure I : X86INSTR
14351 - structure InsnProps : INSN_PROPERTIES
14352 - where I = I
14353 - structure CFG : CONTROL_FLOW_GRAPH
14354 - where I = I
14355 - structure Asm : INSTRUCTION_EMITTER
14356 - where I = I
14357 - and S.P = CFG.P
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
14397
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.
14403 *)
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
14411
14412
14413 type spill_info (* user-defined abstract type *)
14414 @@ -304,17 +341,16 @@ struct
14415 (* This is the generic register allocator *)
14416 structure Ra =
14417 RegisterAllocator
14418 - (SpillHeur)
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 *)
14423 - (ClusterRA
14424 + (structure Flowgraph = ClusterRA
14425 (structure Flowgraph = CFG
14426 structure Asm = Asm
14427 structure InsnProps = InsnProps
14428 structure Spill = Spill
14429 )
14430 - )
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
14440 @@ -1,6 +1,15 @@
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
14461 @@ -8,7 +8,12 @@
14462 * introduced before.
14463 *)
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
14473
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
14479 @@ -8,11 +8,111 @@
14480 *)
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
14591 + ) : MC_EMIT =
14592 struct
14593 structure I = Instr
14594 structure C = I.C