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/trunk/src/MLRISC/Tools/MDL/mdl-gen-asm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/Tools/MDL/mdl-gen-asm.sml

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

revision 983, Wed Nov 21 18:44:55 2001 UTC revision 984, Wed Nov 21 19:00:08 2001 UTC
# Line 19  Line 19 
19         val sigName = "INSTRUCTION_EMITTER"         val sigName = "INSTRUCTION_EMITTER"
20    
21         (* Arguments of the functor *)         (* Arguments of the functor *)
22         val args = ["structure Instr : "^Comp.signame md "INSTR",         val args = ["structure S : INSTRUCTION_STREAM",
23                       "structure Instr : "^Comp.signame md "INSTR",
24                       "   where T = S.P.T",
25                     "structure Shuffle : "^Comp.signame md "SHUFFLE",                     "structure Shuffle : "^Comp.signame md "SHUFFLE",
26                     "   where I = Instr"                     "   where I = Instr",
27                       "structure MLTreeEval : MLTREE_EVAL",
28                       "   where T = Instr.T"
29                    ]                    ]
30         val args = SEQdecl[$args,Comp.fctArgOf md "Assembly"]         val args = SEQdecl[$args,Comp.fctArgOf md "Assembly"]
31    
# Line 171  Line 175 
175         [$["structure I  = Instr",         [$["structure I  = Instr",
176            "structure C  = I.C",            "structure C  = I.C",
177            "structure T  = I.T",            "structure T  = I.T",
178            "structure S  = T.Stream",            "structure S  = S",
179            "structure P  = S.P",            "structure P  = S.P",
           "structure LabelExp = I.LabelExp",  
180            "structure Constant = I.Constant",            "structure Constant = I.Constant",
181            "",            "",
182            "val show_cellset = MLRiscControl.getFlag \"asm-show-cellset\"",            "val show_cellset = MLRiscControl.getFlag \"asm-show-cellset\"",
# Line 200  Line 203 
203            "               in  if n<0 then \"-\"^String.substring(s,1,size s-1)",            "               in  if n<0 then \"-\"^String.substring(s,1,size s-1)",
204            "                   else s",            "                   else s",
205            "               end",            "               end",
206            "    fun emit_label lab = emit(Label.toString lab)",            "    fun emit_label lab = emit(P.Client.AsmPseudoOps.lexpToString(T.LABEL lab))",
207            "    fun emit_label lab = emit(LabelExp.toString(T.LABEL lab))",            "    fun emit_labexp le = emit(P.Client.AsmPseudoOps.lexpToString (T.LABEXP le))",
           "    fun emit_labexp le = emit(LabelExp.toString le)",  
208            "    fun emit_const c = emit(Constant.toString c)",            "    fun emit_const c = emit(Constant.toString c)",
209            "    fun emit_int i = emit(ms i)",            "    fun emit_int i = emit(ms i)",
210            "    fun paren f = (emit \"(\"; f(); emit \")\")",            "    fun paren f = (emit \"(\"; f(); emit \")\")",
211            "    fun defineLabel lab = emit(Label.toString lab^\":\\n\")",            "    fun defineLabel lab = emit(P.Client.AsmPseudoOps.defineLabel lab^\":\\n\")",
212            "    fun entryLabel lab = defineLabel lab",            "    fun entryLabel lab = defineLabel lab",
213            "    fun comment msg = (tab(); emit(\"/* \" ^ msg ^ \" */\\n\"))",            "    fun comment msg = (tab(); emit(\"/* \" ^ msg ^ \" */\\n\"))",
214            "    fun annotation a = (comment(Annotations.toString a); nl())",            "    fun annotation a = (comment(Annotations.toString a); nl())",
# Line 216  Line 218 
218            "    fun emit_region mem = comment(I.Region.toString mem)",            "    fun emit_region mem = comment(I.Region.toString mem)",
219            "    val emit_region = ",            "    val emit_region = ",
220            "       if !show_region then emit_region else doNothing",            "       if !show_region then emit_region else doNothing",
221            "    fun pseudoOp pOp = emit(P.toString pOp)",            "    fun pseudoOp pOp = (emit(P.toString pOp); emit \"\\n\")",
222            "    fun init size = (comment(\"Code Size = \" ^ ms size); nl())",            "    fun init size = (comment(\"Code Size = \" ^ ms size); nl())",
223            "    val emitCellInfo = AsmFormatUtil.reginfo",            "    val emitCellInfo = AsmFormatUtil.reginfo",
224            "                             (emit,formatAnnotations)",            "                             (emit,formatAnnotations)",

Legend:
Removed from v.983  
changed lines
  Added in v.984

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