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/ppc/ra/ppcRewrite.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/ppc/ra/ppcRewrite.sml

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

revision 412, Fri Sep 3 00:25:03 1999 UTC revision 545, Thu Feb 24 13:56:44 2000 UTC
# Line 2  Line 2 
2    structure I = Instr    structure I = Instr
3    
4    fun ea(NONE, _, _, _) = NONE    fun ea(NONE, _, _, _) = NONE
5      | ea(e as SOME(I.Direct r), rs, rt, mapr) =      | ea(e as SOME(I.Direct r), rs, rt, mapr : I.C.cell -> I.C.cell) =
6         if mapr r=rs then SOME(I.Direct rt) else e         if mapr r=rs then SOME(I.Direct rt) else e
7      | ea(e as SOME(I.FDirect r), rs, rt, mapr) =      | ea(e as SOME(I.FDirect r), rs, rt, mapr) =
8         if mapr r=rs then SOME(I.FDirect rt) else e         if mapr r=rs then SOME(I.FDirect rt) else e
# Line 10  Line 10 
10         if mapr base=rs then SOME(I.Displace{base=rt, disp=disp})         if mapr base=rs then SOME(I.Displace{base=rt, disp=disp})
11         else e         else e
12    
13    fun rewriteUse(mapr, instr, rs, rt) = let    fun rewriteUse(mapr : I.C.cell -> I.C.cell, instr, rs, rt) = let
14      fun rplac r = if mapr r=rs then rt else r      fun rplac r = if mapr r=rs then rt else r
15      fun rwOperand(opnd as I.RegOp r) =      fun rwOperand(opnd as I.RegOp r) =
16           if mapr r = rs then I.RegOp rt else opnd           if mapr r = rs then I.RegOp rt else opnd
# Line 50  Line 50 
50       | _ => instr       | _ => instr
51    end    end
52    
53    fun rewriteDef(mapr, instr, rs, rt) = let    fun rewriteDef(mapr : I.C.cell -> I.C.cell, instr, rs, rt) = let
54      fun rplac r = if mapr r = rs then rt else r      fun rplac r = if mapr r = rs then rt else r
55    in    in
56      case instr      case instr
# Line 75  Line 75 
75       | _ => instr       | _ => instr
76    end    end
77    
78    fun frewriteUse(mapr, instr, fs, ft) = let    fun frewriteUse(mapr : I.C.cell -> I.C.cell, instr, fs, ft) = let
79      fun rplac r = if mapr r = fs then ft else r      fun rplac r = if mapr r = fs then ft else r
80    in    in
81      case instr      case instr
# Line 98  Line 98 
98    end    end
99    
100    
101    fun frewriteDef(mapr, instr, fs, ft) = let    fun frewriteDef(mapr : I.C.cell -> I.C.cell, instr, fs, ft) = let
102      fun rplac r = if mapr r = fs then ft else r      fun rplac r = if mapr r = fs then ft else r
103    in    in
104      case instr      case instr

Legend:
Removed from v.412  
changed lines
  Added in v.545

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