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/alpha/emit/alphaAsm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/alpha/emit/alphaAsm.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 AlphaAsmEmitter(structure Instr : ALPHAINSTR  functor AlphaAsmEmitter(structure S : INSTRUCTION_STREAM
9                            structure Instr : ALPHAINSTR
10                               where T = S.P.T
11                          structure Shuffle : ALPHASHUFFLE                          structure Shuffle : ALPHASHUFFLE
12                             where I = Instr                             where I = Instr
13                            structure MLTreeEval : MLTREE_EVAL
14                               where T = Instr.T
15                         ) : INSTRUCTION_EMITTER =                         ) : INSTRUCTION_EMITTER =
16  struct  struct
17     structure I  = Instr     structure I  = Instr
18     structure C  = I.C     structure C  = I.C
19     structure T  = I.T     structure T  = I.T
20     structure S  = T.Stream     structure S  = S
21     structure P  = S.P     structure P  = S.P
    structure LabelExp = I.LabelExp  
22     structure Constant = I.Constant     structure Constant = I.Constant
23    
24     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"
# Line 41  Line 44 
44                    in  if n<0 then "-"^String.substring(s,1,size s-1)                    in  if n<0 then "-"^String.substring(s,1,size s-1)
45                        else s                        else s
46                    end                    end
47         fun emit_label lab = emit(Label.toString lab)         fun emit_label lab = emit(P.Client.AsmPseudoOps.lexpToString(T.LABEL lab))
48         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)  
49         fun emit_const c = emit(Constant.toString c)         fun emit_const c = emit(Constant.toString c)
50         fun emit_int i = emit(ms i)         fun emit_int i = emit(ms i)
51         fun paren f = (emit "("; f(); emit ")")         fun paren f = (emit "("; f(); emit ")")
52         fun defineLabel lab = emit(Label.toString lab^":\n")         fun defineLabel lab = emit(P.Client.AsmPseudoOps.defineLabel lab^":\n")
53         fun entryLabel lab = defineLabel lab         fun entryLabel lab = defineLabel lab
54         fun comment msg = (tab(); emit("/* " ^ msg ^ " */\n"))         fun comment msg = (tab(); emit("/* " ^ msg ^ " */\n"))
55         fun annotation a = (comment(Annotations.toString a); nl())         fun annotation a = (comment(Annotations.toString a); nl())
# Line 57  Line 59 
59         fun emit_region mem = comment(I.Region.toString mem)         fun emit_region mem = comment(I.Region.toString mem)
60         val emit_region =         val emit_region =
61            if !show_region then emit_region else doNothing            if !show_region then emit_region else doNothing
62         fun pseudoOp pOp = emit(P.toString pOp)         fun pseudoOp pOp = (emit(P.toString pOp); emit "\n")
63         fun init size = (comment("Code Size = " ^ ms size); nl())         fun init size = (comment("Code Size = " ^ ms size); nl())
64         val emitCellInfo = AsmFormatUtil.reginfo         val emitCellInfo = AsmFormatUtil.reginfo
65                                  (emit,formatAnnotations)                                  (emit,formatAnnotations)
# Line 277  Line 279 
279     and emit_osf_user_palcode x = emit (asm_osf_user_palcode x)     and emit_osf_user_palcode x = emit (asm_osf_user_palcode x)
280    
281  (*#line 483.7 "alpha/alpha.mdl"*)  (*#line 483.7 "alpha/alpha.mdl"*)
282     fun isZero (I.LABop le) = (LabelExp.valueOf le) = 0     fun isZero (I.LABop le) = (MLTreeEval.valueOf le) = 0
283       | isZero _ = false       | isZero _ = false
284     fun emitInstr' instr =     fun emitInstr' instr =
285         (case instr of         (case instr of

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