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/backpatch/sparcJumps.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/sparc/backpatch/sparcJumps.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  functor SparcJumps  functor SparcJumps
7    (structure Instr:SPARCINSTR    (structure Instr:SPARCINSTR
8     structure Shuffle:SPARCSHUFFLE     structure Shuffle:SPARCSHUFFLE where I = Instr
9        sharing Shuffle.I = Instr) : SDI_JUMPS =     structure MLTreeEval : MLTREE_EVAL where T = Instr.T
10      ) : SDI_JUMPS =
11  struct  struct
12    structure I = Instr    structure I = Instr
13    structure C = Instr.C    structure C = Instr.C
   structure LE = I.LabelExp  
14    structure Const = I.Constant    structure Const = I.Constant
15    
16    fun error msg = MLRiscErrorMsg.error("SparcJumps",msg)    fun error msg = MLRiscErrorMsg.error("SparcJumps",msg)
# Line 87  Line 87 
87          | oper(I.REG _,_) = 4          | oper(I.REG _,_) = 4
88          | oper(I.HI _,_) = 4          | oper(I.HI _,_) = 4
89          | oper(I.LO _,_) = 4          | oper(I.LO _,_) = 4
90          | oper(I.LAB lexp,hi) = if immed13(LE.valueOf lexp) then 4 else hi          | oper(I.LAB lexp,hi) = if immed13(MLTreeEval.valueOf lexp) then 4 else hi
91        fun displacement lab = ((labMap lab) - loc) div 4        fun displacement lab = ((labMap lab) - loc) div 4
92        fun branch22 lab = if immed22(displacement lab) then 4 else 16        fun branch22 lab = if immed22(displacement lab) then 4 else 16
93        fun branch19 lab = if immed19(displacement lab) then 4 else 16        fun branch19 lab = if immed19(displacement lab) then 4 else 16
# Line 143  Line 143 
143        }        }
144    end    end
145    
146    fun split(I.LAB lexp) = split22_10(LE.valueOf lexp)    fun split(I.LAB lexp) = split22_10(MLTreeEval.valueOf lexp)
147      | split _ = error "split"      | split _ = error "split"
148    
149    (* Expand the immediate constant into two instructions *)    (* Expand the immediate constant into two instructions *)

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