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

Diff of /sml/trunk/src/MLRISC/hppa/backpatch/hppaJumps.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  functor HppaJumps  functor HppaJumps
7    (structure Instr:HPPAINSTR    (structure Instr:HPPAINSTR
8     structure Shuffle:HPPASHUFFLE     structure Shuffle:HPPASHUFFLE
9        sharing Shuffle.I = Instr) : SDI_JUMPS =                           where I = Instr
10        structure MLTreeEval : MLTREE_EVAL
11                             where T = Instr.T
12      ) : SDI_JUMPS =
13  struct  struct
14    structure I = Instr    structure I = Instr
15    structure C = Instr.C    structure C = Instr.C
   structure LE = I.LabelExp  
16    structure Const = I.Constant    structure Const = I.Constant
17    
18    fun error msg = MLRiscErrorMsg.error("HppaJumps",msg)    fun error msg = MLRiscErrorMsg.error("HppaJumps",msg)
# Line 75  Line 77 
77      fun memDisp(c, short, long) = if im14(c) then short else long      fun memDisp(c, short, long) = if im14(c) then short else long
78    in    in
79      case instr      case instr
80       of I.LDO{i=I.LabExp(lexp, _), ...} => memDisp(LE.valueOf lexp, 4, 12)       of I.LDO{i=I.LabExp(lexp, _), ...} => memDisp(MLTreeEval.valueOf lexp, 4, 12)
81        | I.LOADI{i=I.LabExp(lexp, _), ...} => memDisp(LE.valueOf lexp, 4, 12)        | I.LOADI{i=I.LabExp(lexp, _), ...} => memDisp(MLTreeEval.valueOf lexp, 4, 12)
82        | I.STORE{d=I.LabExp(lexp, _), ...} => memDisp(LE.valueOf lexp, 4, 12)        | I.STORE{d=I.LabExp(lexp, _), ...} => memDisp(MLTreeEval.valueOf lexp, 4, 12)
83        | I.COMICLR_LDO{i1=I.LabExp(lexp,_), ...} =>        | I.COMICLR_LDO{i1=I.LabExp(lexp,_), ...} =>
84            if im11(LE.valueOf lexp) then 8 else 16            if im11(MLTreeEval.valueOf lexp) then 8 else 16
85        | I.ARITHI{ai, i=I.LabExp(lexp,_), ...} => let        | I.ARITHI{ai, i=I.LabExp(lexp,_), ...} => let
86            fun arithImmed() = if im11(LE.valueOf lexp) then 4 else 12            fun arithImmed() = if im11(MLTreeEval.valueOf lexp) then 4 else 12
87          in          in
88            case ai            case ai
89            of I.ADDI => arithImmed()            of I.ADDI => arithImmed()

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