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

SCM Repository

[smlnj] Diff of /sml/branches/idlbasis-devel/src/MLRISC/Tools/MDL/mdl-gen-asm.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/MLRISC/Tools/MDL/mdl-gen-asm.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 858, Wed Jun 27 21:20:27 2001 UTC revision 859, Wed Jun 27 21:43:12 2001 UTC
# Line 123  Line 123 
123                      if mode = EMIT then APP("emit",e) else e                      if mode = EMIT then APP("emit",e) else e
124                 fun asmToExp E (TEXTasm s) = emitIt(mkString s)                 fun asmToExp E (TEXTasm s) = emitIt(mkString s)
125                   | asmToExp E (EXPasm(IDexp(IDENT([],x)))) =                   | asmToExp E (EXPasm(IDexp(IDENT([],x)))) =
126                      let val (e, ty) = E x                      (let val (e, ty) = E x
127                      in  emitTy(x, ty, e) end                      in  emitTy(x, ty, e) end
128                         handle e =>
129                            fail("unknown assembly field <"^x^">")
130                        )
131                   | asmToExp E (EXPasm e) =                   | asmToExp E (EXPasm e) =
132                     let fun exp _ (ASMexp(STRINGasm s)) = emitIt(mkString s)                     let fun exp _ (ASMexp(STRINGasm s)) = emitIt(mkString s)
133                           | exp _ (ASMexp(ASMasm a)) = SEQexp(map (asmToExp E) a)                           | exp _ (ASMexp(ASMasm a)) = SEQexp(map (asmToExp E) a)
# Line 175  Line 178 
178            "",            "",
179            "val show_cellset = MLRiscControl.getFlag \"asm-show-cellset\"",            "val show_cellset = MLRiscControl.getFlag \"asm-show-cellset\"",
180            "val show_region  = MLRiscControl.getFlag \"asm-show-region\"",            "val show_region  = MLRiscControl.getFlag \"asm-show-region\"",
181              "val show_cutsTo = MLRiscControl.getFlag \"asm-show-cutsto\"",
182            "val indent_copies = MLRiscControl.getFlag \"asm-indent-copies\"",            "val indent_copies = MLRiscControl.getFlag \"asm-indent-copies\"",
183            ""            ""
184          ],          ],
# Line 205  Line 209 
209            "    fun entryLabel lab = defineLabel lab",            "    fun entryLabel lab = defineLabel lab",
210            "    fun comment msg = (tab(); emit(\"/* \" ^ msg ^ \" */\"))",            "    fun comment msg = (tab(); emit(\"/* \" ^ msg ^ \" */\"))",
211            "    fun annotation a = (comment(Annotations.toString a); nl())",            "    fun annotation a = (comment(Annotations.toString a); nl())",
212              "    fun getAnnotations() = error \"getAnnotations\"",
213            "    fun doNothing _ = ()",            "    fun doNothing _ = ()",
214            "    fun emit_region mem = comment(I.Region.toString mem)",            "    fun emit_region mem = comment(I.Region.toString mem)",
215            "    val emit_region = ",            "    val emit_region = ",
# Line 220  Line 225 
225            "      if !show_cellset then emit_cellset else doNothing",            "      if !show_cellset then emit_cellset else doNothing",
226            "    fun emit_defs cellset = emit_cellset(\"defs: \",cellset)",            "    fun emit_defs cellset = emit_cellset(\"defs: \",cellset)",
227            "    fun emit_uses cellset = emit_cellset(\"uses: \",cellset)",            "    fun emit_uses cellset = emit_cellset(\"uses: \",cellset)",
228              "    val emit_cutsTo = ",
229              "      if !show_cutsTo then AsmFormatUtil.emit_cutsTo emit",
230              "      else doNothing",
231            "    fun emitter instr =",            "    fun emitter instr =",
232            "    let"            "    let"
233           ],           ],
# Line 241  Line 249 
249            "             entryLabel=entryLabel,",            "             entryLabel=entryLabel,",
250            "             comment=comment,",            "             comment=comment,",
251            "             exitBlock=doNothing,",            "             exitBlock=doNothing,",
252            "             annotation=annotation",            "             annotation=annotation,",
253              "             getAnnotations=getAnnotations",
254            "            }",            "            }",
255            "end"            "end"
256           ]           ]

Legend:
Removed from v.858  
changed lines
  Added in v.859

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