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/compiler/CodeGen/hppa/hppaLabelComp.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/CodeGen/hppa/hppaLabelComp.sml

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

revision 554, Thu Mar 2 21:29:44 2000 UTC revision 555, Fri Mar 3 16:10:30 2000 UTC
# Line 9  Line 9 
9    structure C = I.C    structure C = I.C
10    structure LE = I.LabelExp    structure LE = I.LabelExp
11    
12    type ('s,'r,'f,'c) reduce =    type reduce =
13      { stm: ('s,'r,'f,'c) T.stm -> unit,      { stm: T.stm -> unit,
14        rexp: ('s,'r,'f,'c) T.rexp -> int,        rexp: T.rexp -> int,
15        emit: I.instruction -> unit }        emit: I.instruction -> unit }
16    
17    fun error msg = ErrorMsg.impossible("HppaLabelComp." ^ msg)    fun error msg = ErrorMsg.impossible("HppaLabelComp." ^ msg)
# Line 20  Line 20 
20    fun ldLabelEA emit lexp = (0, I.LabExp(lexp, I.T))    fun ldLabelEA emit lexp = (0, I.LabExp(lexp, I.T))
21    
22    (* should change the return pointer to 2 to follow HPUX conventions *)    (* should change the return pointer to 2 to follow HPUX conventions *)
23    fun doCall({stm,rexp,emit}:('s,'r,'f,'c) reduce,    fun doCall({stm,rexp,emit}:reduce,
24               T.CALL(exp, flow, def, use, cdef, cuse, mem)) =               T.CALL(exp, flow, def, use, cdef, cuse, mem)) =
25    let    let
26          val addCCreg = C.addCell C.CC          val addCCreg = C.addCell C.CC
# Line 38  Line 38 
38        end        end
39      | doCall _ = error "doCall"      | doCall _ = error "doCall"
40    
41    fun doJmp({stm,rexp,emit}:('s,'r,'f,'c) reduce, T.JMP(ctrl, exp, labs)) =    fun doJmp({stm,rexp,emit}:reduce, T.JMP(ctrl, exp, labs)) =
42      (case exp      (case exp
43       of T.LABEL(LE.LABEL lab) => emit(I.B{lab=lab,n=true})       of T.LABEL(LE.LABEL lab) => emit(I.B{lab=lab,n=true})
44        | T.LABEL _ => error "doJmp: LABEL"        | T.LABEL _ => error "doJmp: LABEL"

Legend:
Removed from v.554  
changed lines
  Added in v.555

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