Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/sparc/emit/sparcAsm.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/sparc/emit/sparcAsm.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 411 - (view) (download)
Original Path: sml/branches/SMLNJ/src/MLRISC/sparc/emit/sparcAsm.sml

1 : monnier 411 (*
2 :     * This file was automatically generated by MDGen
3 :     * from the machine description file "sparc/sparc.md".
4 :     *)
5 :    
6 :    
7 :     functor SparcAsmEmitter(structure Instr : SPARCINSTR
8 :     structure Stream : INSTRUCTION_STREAM
9 :     structure Shuffle : SPARCSHUFFLE
10 :     where I = Instr
11 :    
12 :     (*#line 251.1 "sparc/sparc.md"*)
13 :     val V9 : bool
14 :     ) : INSTRUCTION_EMITTER =
15 : monnier 247 struct
16 : monnier 411 structure I = Instr
17 :     structure C = I.C
18 :     structure S = Stream
19 :     structure P = S.P
20 :     structure LE = LabelExp
21 : monnier 247 structure Constant = I.Constant
22 : monnier 411
23 :     fun error msg = MLRiscErrorMsg.error("SparcAsm",msg)
24 :    
25 :     fun makeStream() =
26 :     let val stream = !AsmStream.asmOutStream
27 :     fun emit s = TextIO.output(stream,s)
28 :     fun nl() = emit "\n"
29 :     fun comma() = emit ","
30 :     fun tab() = emit "\t"
31 :     fun ms n = if n<0 then "-"^Int.toString(~n)
32 :     else Int.toString n
33 :     fun emit_label lab = emit(Label.nameOf lab)
34 :     fun emit_labexp le = emit(LabelExp.toString le)
35 :     fun emit_const c = emit(Constant.toString c)
36 :     fun emit_int i = emit(ms i)
37 :     fun paren f = (emit "("; f(); emit ")")
38 :     fun defineLabel lab = emit(Label.nameOf lab^":\n")
39 :     fun entryLabel lab = defineLabel lab
40 :     fun comment msg = emit("\t/* " ^ msg ^ " */")
41 :     fun annotation a = (comment(Annotations.toString a); nl())
42 :     fun blockName b = (comment(S.B.toString b); nl())
43 :     fun emit_region mem = comment(I.Region.toString mem)
44 :     fun pseudoOp pOp = emit(P.toString pOp)
45 :     fun init size = (comment("Code Size = " ^ ms size); nl())
46 :     fun doNothing _ = ()
47 :     fun emitter regmap =
48 :     let
49 : monnier 247
50 : monnier 411 fun emit_Y r = (emit (C.showY (regmap r)))
51 :     and emit_CC r = (emit (C.showCC (regmap r)))
52 :     and emit_PSR r = (emit (C.showPSR (regmap r)))
53 :     and emit_GP r = (emit (C.showGP (regmap r)))
54 :     and emit_FSR r = (emit (C.showFSR (regmap r)))
55 :     and emit_FP r = (emit (C.showFP (regmap r)))
56 : monnier 247
57 : monnier 411 fun asm_store (I.STB) = "stb"
58 :     | asm_store (I.STH) = "sth"
59 :     | asm_store (I.ST) = "st"
60 :     | asm_store (I.STX) = "stx"
61 :     | asm_store (I.STD) = "std"
62 :     and emit_store x = (emit (asm_store x))
63 :     and asm_fsize (I.S) = "s"
64 :     | asm_fsize (I.D) = "d"
65 :     | asm_fsize (I.Q) = "q"
66 :     and emit_fsize x = (emit (asm_fsize x))
67 :     and asm_rcond (I.RZ) = "rz"
68 :     | asm_rcond (I.RLEZ) = "rlez"
69 :     | asm_rcond (I.RLZ) = "rlz"
70 :     | asm_rcond (I.RNZ) = "rnz"
71 :     | asm_rcond (I.RGZ) = "rgz"
72 :     | asm_rcond (I.RGEZ) = "rgez"
73 :     and emit_rcond x = (emit (asm_rcond x))
74 :     and asm_fload (I.LDF) = "ldf"
75 :     | asm_fload (I.LDDF) = "lddf"
76 :     | asm_fload (I.LDQF) = "ldqf"
77 :     | asm_fload (I.LDFSR) = "ldfsr"
78 :     | asm_fload (I.LDXFSR) = "ldxfsr"
79 :     and emit_fload x = (emit (asm_fload x))
80 :     and asm_branch (I.BN) = "n"
81 :     | asm_branch (I.BE) = "e"
82 :     | asm_branch (I.BLE) = "le"
83 :     | asm_branch (I.BL) = "l"
84 :     | asm_branch (I.BLEU) = "leu"
85 :     | asm_branch (I.BCS) = "cs"
86 :     | asm_branch (I.BNEG) = "neg"
87 :     | asm_branch (I.BVS) = "vs"
88 :     | asm_branch (I.BA) = ""
89 :     | asm_branch (I.BNE) = "ne"
90 :     | asm_branch (I.BG) = "g"
91 :     | asm_branch (I.BGE) = "ge"
92 :     | asm_branch (I.BGU) = "gu"
93 :     | asm_branch (I.BCC) = "cc"
94 :     | asm_branch (I.BPOS) = "pos"
95 :     | asm_branch (I.BVC) = "vs"
96 :     and emit_branch x = (emit (asm_branch x))
97 :     and asm_farith1 (I.FiTOs) = "fitos"
98 :     | asm_farith1 (I.FiTOd) = "fitod"
99 :     | asm_farith1 (I.FiTOq) = "fitoq"
100 :     | asm_farith1 (I.FsTOi) = "fstoi"
101 :     | asm_farith1 (I.FdTOi) = "fdtoi"
102 :     | asm_farith1 (I.FqTOi) = "fqtoi"
103 :     | asm_farith1 (I.FsTOd) = "fstod"
104 :     | asm_farith1 (I.FsTOq) = "fstoq"
105 :     | asm_farith1 (I.FdTOs) = "fdtos"
106 :     | asm_farith1 (I.FdTOq) = "fdtoq"
107 :     | asm_farith1 (I.FqTOs) = "fqtos"
108 :     | asm_farith1 (I.FqTOd) = "fqtod"
109 :     | asm_farith1 (I.FMOVs) = "fmovs"
110 :     | asm_farith1 (I.FNEGs) = "fnegs"
111 :     | asm_farith1 (I.FABSs) = "fabss"
112 :     | asm_farith1 (I.FMOVd) = "fmovd"
113 :     | asm_farith1 (I.FNEGd) = "fnegd"
114 :     | asm_farith1 (I.FABSd) = "fabsd"
115 :     | asm_farith1 (I.FMOVq) = "fmovq"
116 :     | asm_farith1 (I.FNEGq) = "fnegq"
117 :     | asm_farith1 (I.FABSq) = "fabsq"
118 :     | asm_farith1 (I.FSQRTs) = "fsqrts"
119 :     | asm_farith1 (I.FSQRTd) = "fsqrtd"
120 :     | asm_farith1 (I.FSQRTq) = "fsqrtq"
121 :     and emit_farith1 x = (emit (asm_farith1 x))
122 :     and asm_farith2 (I.FADDs) = "fadds"
123 :     | asm_farith2 (I.FADDd) = "faddd"
124 :     | asm_farith2 (I.FADDq) = "faddq"
125 :     | asm_farith2 (I.FSUBs) = "fsubs"
126 :     | asm_farith2 (I.FSUBd) = "fsubd"
127 :     | asm_farith2 (I.FSUBq) = "fsubq"
128 :     | asm_farith2 (I.FMULs) = "fmuls"
129 :     | asm_farith2 (I.FMULd) = "fmuld"
130 :     | asm_farith2 (I.FMULq) = "fmulq"
131 :     | asm_farith2 (I.FsMULd) = "fsmuld"
132 :     | asm_farith2 (I.FdMULq) = "fdmulq"
133 :     | asm_farith2 (I.FDIVs) = "fdivs"
134 :     | asm_farith2 (I.FDIVd) = "fdivd"
135 :     | asm_farith2 (I.FDIVq) = "fdivq"
136 :     and emit_farith2 x = (emit (asm_farith2 x))
137 :     and asm_shift (I.SLL) = "sll"
138 :     | asm_shift (I.SRL) = "srl"
139 :     | asm_shift (I.SRA) = "sra"
140 :     | asm_shift (I.SLLX) = "sllx"
141 :     | asm_shift (I.SRLX) = "srlx"
142 :     | asm_shift (I.SRAX) = "srax"
143 :     and emit_shift x = (emit (asm_shift x))
144 :     and asm_arith (I.AND) = "and"
145 :     | asm_arith (I.ANDCC) = "andcc"
146 :     | asm_arith (I.ANDN) = "andn"
147 :     | asm_arith (I.ANDNCC) = "andncc"
148 :     | asm_arith (I.OR) = "or"
149 :     | asm_arith (I.ORCC) = "orcc"
150 :     | asm_arith (I.ORN) = "orn"
151 :     | asm_arith (I.ORNCC) = "orncc"
152 :     | asm_arith (I.XOR) = "xor"
153 :     | asm_arith (I.XORCC) = "xorcc"
154 :     | asm_arith (I.XNOR) = "xnor"
155 :     | asm_arith (I.XNORCC) = "xnorcc"
156 :     | asm_arith (I.ADD) = "add"
157 :     | asm_arith (I.ADDCC) = "addcc"
158 :     | asm_arith (I.TADD) = "tadd"
159 :     | asm_arith (I.TADDCC) = "taddcc"
160 :     | asm_arith (I.TADDTV) = "taddtv"
161 :     | asm_arith (I.TADDTVCC) = "taddtvcc"
162 :     | asm_arith (I.SUB) = "sub"
163 :     | asm_arith (I.SUBCC) = "subcc"
164 :     | asm_arith (I.TSUB) = "tsub"
165 :     | asm_arith (I.TSUBCC) = "tsubcc"
166 :     | asm_arith (I.TSUBTV) = "tsubtv"
167 :     | asm_arith (I.TSUBTVCC) = "tsubtvcc"
168 :     | asm_arith (I.UMUL) = "umul"
169 :     | asm_arith (I.UMULCC) = "umulcc"
170 :     | asm_arith (I.SMUL) = "smul"
171 :     | asm_arith (I.SMULCC) = "smulcc"
172 :     | asm_arith (I.UDIV) = "udiv"
173 :     | asm_arith (I.UDIVCC) = "udivcc"
174 :     | asm_arith (I.SDIV) = "sdiv"
175 :     | asm_arith (I.SDIVCC) = "sdivcc"
176 :     | asm_arith (I.MULX) = "mulx"
177 :     | asm_arith (I.SDIVX) = "sdivx"
178 :     | asm_arith (I.UDIVX) = "udivx"
179 :     and emit_arith x = (emit (asm_arith x))
180 :     and asm_fcmp (I.FCMPs) = "fcmps"
181 :     | asm_fcmp (I.FCMPd) = "fcmpd"
182 :     | asm_fcmp (I.FCMPq) = "fcmpq"
183 :     | asm_fcmp (I.FCMPEs) = "fcmpes"
184 :     | asm_fcmp (I.FCMPEd) = "fcmped"
185 :     | asm_fcmp (I.FCMPEq) = "fcmpeq"
186 :     and emit_fcmp x = (emit (asm_fcmp x))
187 :     and asm_load (I.LDSB) = "ldsb"
188 :     | asm_load (I.LDSH) = "ldsh"
189 :     | asm_load (I.LDUB) = "ldub"
190 :     | asm_load (I.LDUH) = "lduh"
191 :     | asm_load (I.LD) = "ld"
192 :     | asm_load (I.LDX) = "ldx"
193 :     | asm_load (I.LDD) = "ldd"
194 :     and emit_load x = (emit (asm_load x))
195 :     and asm_prediction (I.PT) = "pt"
196 :     | asm_prediction (I.PN) = "pn"
197 :     and emit_prediction x = (emit (asm_prediction x))
198 :     and asm_fbranch (I.FBN) = "fbn"
199 :     | asm_fbranch (I.FBNE) = "fbne"
200 :     | asm_fbranch (I.FBLG) = "fblg"
201 :     | asm_fbranch (I.FBUL) = "fbul"
202 :     | asm_fbranch (I.FBL) = "fbl"
203 :     | asm_fbranch (I.FBUG) = "fbug"
204 :     | asm_fbranch (I.FBG) = "fbg"
205 :     | asm_fbranch (I.FBU) = "fbu"
206 :     | asm_fbranch (I.FBA) = "fb"
207 :     | asm_fbranch (I.FBE) = "fbe"
208 :     | asm_fbranch (I.FBUE) = "fbue"
209 :     | asm_fbranch (I.FBGE) = "fbge"
210 :     | asm_fbranch (I.FBUGE) = "fbuge"
211 :     | asm_fbranch (I.FBLE) = "fble"
212 :     | asm_fbranch (I.FBULE) = "fbule"
213 :     | asm_fbranch (I.FBO) = "fbo"
214 :     and emit_fbranch x = (emit (asm_fbranch x))
215 :     and emit_operand (I.REG GP) = (emit_GP GP)
216 :     | emit_operand (I.IMMED int) = (emit_int int)
217 :     | emit_operand (I.LAB labexp) = (emit_labexp labexp)
218 :     | emit_operand (I.LO labexp) =
219 :     ((emit "%lo(");
220 :     (emit_labexp labexp);
221 :     (emit ")"))
222 :     | emit_operand (I.HI labexp) =
223 :     ((emit "%hi(");
224 :     (emit_labexp labexp);
225 :     (emit ")"))
226 :     | emit_operand (I.CONST const) = (emit_const const)
227 :     and asm_fstore (I.STF) = "stf"
228 :     | asm_fstore (I.STDF) = "stdf"
229 :     | asm_fstore (I.STFSR) = "stfsr"
230 :     and emit_fstore x = (emit (asm_fstore x))
231 : monnier 247
232 : monnier 411 fun emit_leaf false = ()
233 :     | emit_leaf true = (emit "l")
234 : monnier 247
235 : monnier 411 fun emit_nop false = ()
236 :     | emit_nop true = (emit "\n\tnop")
237 : monnier 247
238 : monnier 411 fun emit_a false = ()
239 :     | emit_a true = (emit ",a")
240 : monnier 247
241 : monnier 411 fun emit_cc false = ()
242 :     | emit_cc true = (emit "cc")
243 : monnier 247
244 : monnier 411 fun emitInstr instr =
245 :     ((tab ());
246 :    
247 :     (
248 :     case instr of
249 :     I.LOAD{l, d, r, i, mem} =>
250 :     ((emit_load l);
251 :     (emit "\t[");
252 :     (emit_GP r);
253 :     (emit "+");
254 :     (emit_operand i);
255 :     (emit "], ");
256 :     (emit_GP d);
257 :     (emit_region mem))
258 :     | I.STORE{s, d, r, i, mem} =>
259 :     ((emit_store s);
260 :     (emit "\t");
261 :     (emit_GP d);
262 :     (emit ", [");
263 :     (emit_GP r);
264 :     (emit "+");
265 :     (emit_operand i);
266 :     (emit "]");
267 :     (emit_region mem))
268 :     | I.FLOAD{l, r, i, d, mem} =>
269 :     ((emit_fload l);
270 :     (emit "\t[");
271 :     (emit_GP r);
272 :     (emit "+");
273 :     (emit_operand i);
274 :     (emit "], ");
275 :     (emit_FP d);
276 :     (emit_region mem))
277 :     | I.FSTORE{s, d, r, i, mem} =>
278 :     ((emit_fstore s);
279 :     (emit "\t[");
280 :     (emit_GP r);
281 :     (emit "+");
282 :     (emit_operand i);
283 :     (emit "], ");
284 :     (emit_FP d);
285 :     (emit_region mem))
286 :     | I.SETHI{i, d} =>
287 :     ((emit "sethi\t%hi(0x");
288 :     (emit (Word32.toString (Word32.<< ((Word32.fromInt i), 0wxa))));
289 :     (emit "), ");
290 :     (emit_GP d))
291 :     | I.ARITH{a, r, i, d} =>
292 :     ((emit_arith a);
293 :     (emit "\t");
294 :     (emit_GP r);
295 :     (emit ", ");
296 :     (emit_operand i);
297 :     (emit ", ");
298 :     (emit_GP d))
299 :     | I.SHIFT{s, r, i, d} =>
300 :     ((emit_shift s);
301 :     (emit "\t");
302 :     (emit_GP r);
303 :     (emit ", ");
304 :     (emit_operand i);
305 :     (emit ", ");
306 :     (emit_GP d))
307 :     | I.MOVicc{b, i, d} =>
308 :     ((emit "mov");
309 :     (emit_branch b);
310 :     (emit "\t");
311 :     (emit_operand i);
312 :     (emit ", ");
313 :     (emit_GP d))
314 :     | I.MOVfcc{b, i, d} =>
315 :     ((emit "mov");
316 :     (emit_fbranch b);
317 :     (emit "\t");
318 :     (emit_operand i);
319 :     (emit ", ");
320 :     (emit_GP d))
321 :     | I.MOVR{rcond, r, i, d} =>
322 :     ((emit "movr");
323 :     (emit_rcond rcond);
324 :     (emit "\t");
325 :     (emit_GP r);
326 :     (emit ", ");
327 :     (emit_operand i);
328 :     (emit ", ");
329 :     (emit_GP d))
330 :     | I.FMOVicc{sz, b, r, d} =>
331 :     ((emit "fmov");
332 :     (emit_fsize sz);
333 :     (emit_branch b);
334 :     (emit "\t");
335 :     (emit_FP r);
336 :     (emit ", ");
337 :     (emit_FP d))
338 :     | I.FMOVfcc{sz, b, r, d} =>
339 :     ((emit "fmov");
340 :     (emit_fsize sz);
341 :     (emit_fbranch b);
342 :     (emit "\t");
343 :     (emit_FP r);
344 :     (emit ", ");
345 :     (emit_FP d))
346 :     | I.Bicc{b, a, label, nop} =>
347 :     ((emit "b");
348 :     (emit_branch b);
349 :     (emit_a a);
350 :     (emit "\t");
351 :     (emit_label label);
352 :     (emit_nop nop))
353 :     | I.FBfcc{b, a, label, nop} =>
354 :     ((emit_fbranch b);
355 :     (emit_a a);
356 :     (emit "\t");
357 :     (emit_label label);
358 :     (emit_nop nop))
359 :     | I.BR{rcond, p, r, a, label, nop} =>
360 :     ((emit "b");
361 :     (emit_rcond rcond);
362 :     (emit_a a);
363 :     (emit_prediction p);
364 :     (emit "\t");
365 :     (emit_GP r);
366 :     (emit ", ");
367 :     (emit_label label);
368 :     (emit_nop nop))
369 :     | I.BP{b, p, cc, a, label, nop} =>
370 :     ((emit "bp");
371 :     (emit_branch b);
372 :     (emit_a a);
373 :     (emit_prediction p);
374 :     (emit "\t%");
375 :     (emit (if (cc = I.ICC)
376 :     then "i"
377 :     else "x"));
378 :     (emit "cc, ");
379 :     (emit_label label);
380 :     (emit_nop nop))
381 :     | I.JMP{r, i, labs, nop} =>
382 :     ((emit "jmp\t[");
383 :     (emit_GP r);
384 :     (emit "+");
385 :     (emit_operand i);
386 :     (emit "]");
387 :     (emit_nop nop))
388 :     | I.JMPL{r, i, d, defs, uses, nop, mem} =>
389 :     ((emit "jmpl\t[");
390 :     (emit_GP r);
391 :     (emit "+");
392 :     (emit_operand i);
393 :     (emit "], ");
394 :     (emit_GP d);
395 :     (emit_region mem);
396 :     (emit_nop nop))
397 :     | I.CALL{defs, uses, label, nop, mem} =>
398 :     ((emit "call\t");
399 :     (emit_label label);
400 :     (emit_region mem);
401 :     (emit_nop nop))
402 :     | I.Ticc{t, cc, r, i} =>
403 :     ((emit "t");
404 :     (emit_branch t);
405 :     (emit "\t");
406 :     (if (cc = I.ICC)
407 :     then ()
408 :     else (emit "%xcc, "));
409 :     (emit_GP r);
410 :     (emit ", ");
411 :     (emit_operand i))
412 :     | I.FPop1{a, r, d} => let
413 : monnier 247
414 : monnier 411 (*#line 508.1 "sparc/sparc.md"*)
415 : monnier 247
416 : monnier 411 fun f (a, r, d) =
417 :     ((emit a);
418 :     (emit "\t");
419 :     (emit_FP r);
420 :     (emit ", ");
421 :     (emit_FP d))
422 : monnier 247
423 : monnier 411 (*#line 510.1 "sparc/sparc.md"*)
424 : monnier 247
425 : monnier 411 fun g (a, r, d) = let
426 : monnier 247
427 : monnier 411 (*#line 511.1 "sparc/sparc.md"*)
428 :     val r = (regmap r)
429 :     and d = (regmap d)
430 :     in (f (a, r, d));
431 :     (emit "\n\t");
432 :     (f ("fmovs", (r + 1), (d + 1)))
433 :     end
434 : monnier 247
435 :    
436 : monnier 411 (*#line 515.1 "sparc/sparc.md"*)
437 :    
438 :     fun h (a, r, d) = let
439 :    
440 :     (*#line 516.1 "sparc/sparc.md"*)
441 :     val r = (regmap r)
442 :     and d = (regmap d)
443 :     in (f (a, r, d));
444 :     (emit "\n\t");
445 :     (f ("fmovs", (r + 1), (d + 1)));
446 :     (emit "\n\t");
447 :     (f ("fmovs", (r + 2), (d + 2)));
448 :     (emit "\n\t");
449 :     (f ("fmovs", (r + 3), (d + 3)))
450 :     end
451 :    
452 :     in (if V9
453 :     then (f ((asm_farith1 a), r, d))
454 :     else
455 :     (
456 :     case a of
457 :     I.FMOVd => (g ("fmovs", r, d))
458 :     | I.FNEGd => (g ("fnegs", r, d))
459 :     | I.FABSd => (g ("fabss", r, d))
460 :     | I.FMOVq => (h ("fmovs", r, d))
461 :     | I.FNEGq => (h ("fnegs", r, d))
462 :     | I.FABSq => (h ("fabss", r, d))
463 :     | _ => (f ((asm_farith1 a), r, d))
464 :     ))
465 :     end
466 :    
467 :     | I.FPop2{a, r1, r2, d} =>
468 :     ((emit_farith2 a);
469 :     (emit "\t");
470 :     (emit_FP r1);
471 :     (emit ", ");
472 :     (emit_FP r2);
473 :     (emit ", ");
474 :     (emit_FP d))
475 :     | I.FCMP{cmp, r1, r2, nop} =>
476 :     ((emit_fcmp cmp);
477 :     (emit "\t");
478 :     (emit_FP r1);
479 :     (emit ", ");
480 :     (emit_FP r2);
481 :     (emit_nop nop))
482 :     | I.COPY{dst, src, impl, tmp} => (emitInstrs (Shuffle.shuffle {regmap=regmap, tmp=tmp, src=src, dst=dst}))
483 :     | I.FCOPY{dst, src, impl, tmp} => (emitInstrs (Shuffle.shufflefp {regmap=regmap, tmp=tmp, src=src, dst=dst}))
484 :     | I.SAVE{r, i, d} =>
485 :     ((emit "save\t");
486 :     (emit_GP r);
487 :     (emit ", ");
488 :     (emit_operand i);
489 :     (emit ", ");
490 :     (emit_GP d))
491 :     | I.RESTORE{r, i, d} =>
492 :     ((emit "restore\t");
493 :     (emit_GP r);
494 :     (emit ", ");
495 :     (emit_operand i);
496 :     (emit ", ");
497 :     (emit_GP d))
498 :     | I.RDY{d} =>
499 :     ((emit "rd\t%y, ");
500 :     (emit_GP d))
501 :     | I.WRY{r, i} =>
502 :     ((emit "wr\t");
503 :     (emit_GP r);
504 :     (emit ", ");
505 :     (emit_operand i);
506 :     (emit ", %y"))
507 :     | I.RET{leaf, nop} =>
508 :     ((emit "ret");
509 :     (emit_leaf leaf);
510 :     (emit_nop nop))
511 :     | I.ANNOTATION{i, a} =>
512 :     ((emitInstr i);
513 :     (comment (Annotations.toString a)))
514 :     | I.GROUP annotation => (comment (Annotations.toString annotation))
515 :     );
516 :     (nl ()))
517 :     and emitInstrs [] = ()
518 :     | emitInstrs (i::is) =
519 :     (emitInstr i; app (fn i => (tab(); emitInstr i)) is)
520 :     in emitInstr end
521 :    
522 :     in S.STREAM{init=init,
523 :     pseudoOp=pseudoOp,
524 :     emit=emitter,
525 :     finish=doNothing,
526 :     defineLabel=defineLabel,
527 :     entryLabel=entryLabel,
528 :     comment=comment,
529 :     exitBlock=doNothing,
530 :     blockName=blockName,
531 :     annotation=annotation
532 :     }
533 : monnier 247 end
534 : monnier 411 end
535 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0