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 410, Fri Sep 3 00:25:03 1999 UTC revision 411, Fri Sep 3 00:25:03 1999 UTC
# Line 1  Line 1 
1  functor HppaLabelComp  functor HppaLabelComp
2    (structure MLTree : MLTREE    (structure MLTree : MLTREE
3     structure Instr : HPPAINSTR     structure Instr : HPPAINSTR
4         sharing Instr.Region = MLTree.Region
5       sharing Instr.Constant = MLTree.Constant) =       sharing Instr.Constant = MLTree.Constant) =
6  struct  struct
7    structure T = MLTree    structure T = MLTree
# Line 21  Line 22 
22    fun ldLabelEA emit lexp = (0, I.LabExp(lexp, I.T))    fun ldLabelEA emit lexp = (0, I.LabExp(lexp, I.T))
23    
24    (* should change the return pointer to 2 to follow HPUX conventions *)    (* should change the return pointer to 2 to follow HPUX conventions *)
25    fun doCall({stm,rexp,emit}:reduce, T.CALL(exp, def, use)) = let    fun doCall({stm,rexp,emit}:reduce, T.CALL(exp, def, use, mem)) = let
26          val addCCreg = C.addCell C.CC          val addCCreg = C.addCell C.CC
27          fun live([], acc) = acc          fun live([], acc) = acc
28            | live(T.GPR(T.REG r)::regs, acc) = live(regs, C.addReg(r, acc))            | live(T.GPR(T.REG(_, r))::regs, acc) = live(regs, C.addReg(r, acc))
29            | live(T.FPR(T.FREG f)::regs, acc) = live(regs, C.addFreg(f, acc))            | live(T.FPR(T.FREG(_, f))::regs, acc) = live(regs, C.addFreg(f, acc))
30            | live(T.CCR(T.CC c)::regs, acc) = live(regs, addCCreg(c, acc))            | live(T.CCR(T.CC c)::regs, acc) = live(regs, addCCreg(c, acc))
31            | live(_::regs, acc) = live(regs, acc)            | live(_::regs, acc) = live(regs, acc)
32          val returnPtr = 31          val returnPtr = 31
33          val defs = C.addReg(returnPtr, live(def, C.empty))          val defs = C.addReg(returnPtr, live(def, C.empty))
34          val uses = live(use, C.empty)          val uses = live(use, C.empty)
35        in emit(I.BLE{b=rexp exp, d=I.IMMED 0, sr=5, t=returnPtr, defs=defs, uses=uses})        in emit(I.BLE{b=rexp exp, d=I.IMMED 0, sr=5, t=returnPtr,
36                        defs=defs, uses=uses, mem=mem})
37        end        end
38      | doCall _ = error "doCall"      | doCall _ = error "doCall"
39    

Legend:
Removed from v.410  
changed lines
  Added in v.411

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