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/x86/emit/x86Asm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/emit/x86Asm.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 5  Line 5 
5   *)   *)
6    
7    
8  functor X86AsmEmitter(structure Instr : X86INSTR  functor X86AsmEmitter(structure S : INSTRUCTION_STREAM
9                          structure Instr : X86INSTR
10                             where T = S.P.T
11                        structure Shuffle : X86SHUFFLE                        structure Shuffle : X86SHUFFLE
12                           where I = Instr                           where I = Instr
13                          structure MLTreeEval : MLTREE_EVAL
14                             where T = Instr.T
15    
16  (*#line 509.7 "x86/x86.mdl"*)  (*#line 509.7 "x86/x86.mdl"*)
17                        structure MemRegs : MEMORY_REGISTERS where I=Instr                        structure MemRegs : MEMORY_REGISTERS where I=Instr
# Line 19  Line 23 
23     structure I  = Instr     structure I  = Instr
24     structure C  = I.C     structure C  = I.C
25     structure T  = I.T     structure T  = I.T
26     structure S  = T.Stream     structure S  = S
27     structure P  = S.P     structure P  = S.P
    structure LabelExp = I.LabelExp  
28     structure Constant = I.Constant     structure Constant = I.Constant
29    
30     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"
# Line 47  Line 50 
50                    in  if n<0 then "-"^String.substring(s,1,size s-1)                    in  if n<0 then "-"^String.substring(s,1,size s-1)
51                        else s                        else s
52                    end                    end
53         fun emit_label lab = emit(Label.toString lab)         fun emit_label lab = emit(P.Client.AsmPseudoOps.lexpToString(T.LABEL lab))
54         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)  
55         fun emit_const c = emit(Constant.toString c)         fun emit_const c = emit(Constant.toString c)
56         fun emit_int i = emit(ms i)         fun emit_int i = emit(ms i)
57         fun paren f = (emit "("; f(); emit ")")         fun paren f = (emit "("; f(); emit ")")
58         fun defineLabel lab = emit(Label.toString lab^":\n")         fun defineLabel lab = emit(P.Client.AsmPseudoOps.defineLabel lab^":\n")
59         fun entryLabel lab = defineLabel lab         fun entryLabel lab = defineLabel lab
60         fun comment msg = (tab(); emit("/* " ^ msg ^ " */\n"))         fun comment msg = (tab(); emit("/* " ^ msg ^ " */\n"))
61         fun annotation a = (comment(Annotations.toString a); nl())         fun annotation a = (comment(Annotations.toString a); nl())
# Line 63  Line 65 
65         fun emit_region mem = comment(I.Region.toString mem)         fun emit_region mem = comment(I.Region.toString mem)
66         val emit_region =         val emit_region =
67            if !show_region then emit_region else doNothing            if !show_region then emit_region else doNothing
68         fun pseudoOp pOp = emit(P.toString pOp)         fun pseudoOp pOp = (emit(P.toString pOp); emit "\n")
69         fun init size = (comment("Code Size = " ^ ms size); nl())         fun init size = (comment("Code Size = " ^ ms size); nl())
70         val emitCellInfo = AsmFormatUtil.reginfo         val emitCellInfo = AsmFormatUtil.reginfo
71                                  (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