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/branches/SMLNJ/src/MLRISC/hppa/ra/hppaRewrite.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/MLRISC/hppa/ra/hppaRewrite.sml

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

revision 468, Wed Nov 10 22:42:52 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 6  Line 6 
6  functor HppaRewrite(Instr:HPPAINSTR) = struct  functor HppaRewrite(Instr:HPPAINSTR) = struct
7    structure I = Instr    structure I = Instr
8    
9      fun error msg = MLRiscErrorMsg.error("HppaRewrite",msg)
10    
11    fun rewriteUse(mapr, instr, rs, rt) = let    fun rewriteUse(mapr, instr, rs, rt) = let
12      fun replc r = if mapr r=rs then rt else r      fun replc r = if mapr r=rs then rt else r
13    in    in
# Line 19  Line 21 
21       | I.ARITH{a, r1, r2, t} => I.ARITH{a=a, r1=replc r1, r2=replc r2, t=t}       | I.ARITH{a, r1, r2, t} => I.ARITH{a=a, r1=replc r1, r2=replc r2, t=t}
22       | I.ARITHI{ai, r, i, t} => I.ARITHI{ai=ai, r=replc r, i=i, t=t}       | I.ARITHI{ai, r, i, t} => I.ARITHI{ai=ai, r=replc r, i=i, t=t}
23       | I.COMCLR_LDO{cc, r1, r2, b, i, t1, t2} =>       | I.COMCLR_LDO{cc, r1, r2, b, i, t1, t2} =>
24             if t1 <> t2 andalso mapr t2 = rs then
25                error "rewriteUse: COMCLR_LDO"
26             else
27           I.COMCLR_LDO{cc=cc, r1=replc r1, r2=replc r2, b=replc b, i=i,           I.COMCLR_LDO{cc=cc, r1=replc r1, r2=replc r2, b=replc b, i=i,
28                        t1=t1, t2=t2}                        t1=t1, t2=t2}
29       | I.SHIFTV{sv, r, len, t} => I.SHIFTV{sv=sv, r=replc r, len=len, t=t}       | I.SHIFTV{sv, r, len, t} => I.SHIFTV{sv=sv, r=replc r, len=len, t=t}
# Line 61  Line 66 
66       | I.LOAD{l, r1, r2, t, mem} => I.LOAD{l=l,r1=r1,r2=r2,t=replc t,mem=mem}       | I.LOAD{l, r1, r2, t, mem} => I.LOAD{l=l,r1=r1,r2=r2,t=replc t,mem=mem}
67       | I.LOADI{li, i, r, t, mem} => I.LOADI{li=li,i=i,r=r,t=replc t,mem=mem}       | I.LOADI{li, i, r, t, mem} => I.LOADI{li=li,i=i,r=r,t=replc t,mem=mem}
68       | I.COMCLR_LDO{cc, r1, r2, b, i, t1, t2} =>       | I.COMCLR_LDO{cc, r1, r2, b, i, t1, t2} =>
69             if t1 <> t2 andalso mapr t2 = rs then
70                error "rewriteDef: COMCLR_LDO"
71             else
72            I.COMCLR_LDO{cc=cc, r1=r1, r2=r2, b=b, i=i, t1=replc t1, t2=replc t2}            I.COMCLR_LDO{cc=cc, r1=r1, r2=r2, b=b, i=i, t1=replc t1, t2=replc t2}
73       | I.SHIFTV{sv, r, len, t} => I.SHIFTV{sv=sv, r=r, len=len, t=replc t}       | I.SHIFTV{sv, r, len, t} => I.SHIFTV{sv=sv, r=r, len=len, t=replc t}
74       | I.SHIFT{s, r, p, len, t} => I.SHIFT{s=s, r=r, p=p, len=len, t=replc t}       | I.SHIFT{s, r, p, len, t} => I.SHIFT{s=s, r=r, p=p, len=len, t=replc t}

Legend:
Removed from v.468  
changed lines
  Added in v.469

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