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/sparc/emit/sparcMC.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/sparc/emit/sparcMC.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 6  Line 6 
6    
7    
8  functor SparcMCEmitter(structure Instr : SPARCINSTR  functor SparcMCEmitter(structure Instr : SPARCINSTR
9                           structure MLTreeEval : MLTREE_EVAL where T = Instr.T
10                           structure Stream : INSTRUCTION_STREAM
11                         structure CodeString : CODE_STRING                         structure CodeString : CODE_STRING
12                        ) : INSTRUCTION_EMITTER =                        ) : INSTRUCTION_EMITTER =
13  struct  struct
14     structure I = Instr     structure I = Instr
15     structure C = I.C     structure C = I.C
    structure LabelExp = I.LabelExp  
16     structure Constant = I.Constant     structure Constant = I.Constant
17     structure T = I.T     structure T = I.T
18     structure S = T.Stream     structure S = Stream
19     structure P = S.P     structure P = S.P
20     structure W = Word32     structure W = Word32
21    
# Line 34  Line 35 
35         val emit_int = itow         val emit_int = itow
36         fun emit_word w = w         fun emit_word w = w
37         fun emit_label l = itow(Label.addrOf l)         fun emit_label l = itow(Label.addrOf l)
38         fun emit_labexp le = itow(LabelExp.valueOf le)         fun emit_labexp le = itow(MLTreeEval.valueOf le)
39         fun emit_const c = itow(Constant.valueOf c)         fun emit_const c = itow(Constant.valueOf c)
40         val loc = ref 0         val loc = ref 0
41    
# Line 239  Line 240 
240            (case i of            (case i of
241              I.REG rs2 => error "opn"              I.REG rs2 => error "opn"
242            | I.IMMED i => itow i            | I.IMMED i => itow i
243            | I.LAB l => itow (LabelExp.valueOf l)            | I.LAB l => itow (MLTreeEval.valueOf l)
244            | I.LO l => lo10 (LabelExp.valueOf l)            | I.LO l => lo10 (MLTreeEval.valueOf l)
245            | I.HI l => hi22 (LabelExp.valueOf l)            | I.HI l => hi22 (MLTreeEval.valueOf l)
246            )            )
247         end         end
248     and rr {op1, rd, op3, rs1, rs2} =     and rr {op1, rd, op3, rs1, rs2} =

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