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/instructions/hppaProps.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/hppa/instructions/hppaProps.sml

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

revision 888, Thu Jul 19 20:24:21 2001 UTC revision 889, Thu Jul 19 20:35:20 2001 UTC
# Line 9  Line 9 
9    structure I = HppaInstr    structure I = HppaInstr
10    structure C = HppaInstr.C    structure C = HppaInstr.C
11    structure LE = I.LabelExp    structure LE = I.LabelExp
12      structure CB = CellsBasis
13    
14    exception NegateConditional    exception NegateConditional
15    
# Line 18  Line 19 
19                  | IK_CALL_WITH_CUTS | IK_PHI | IK_SOURCE | IK_SINK                  | IK_CALL_WITH_CUTS | IK_PHI | IK_SOURCE | IK_SINK
20    datatype target = LABELLED of Label.label | FALLTHROUGH | ESCAPES    datatype target = LABELLED of Label.label | FALLTHROUGH | ESCAPES
21    
22    val zeroR = Option.valOf(C.zeroReg C.GP)    val zeroR = Option.valOf(C.zeroReg CB.GP)
23    val r31   = C.Reg C.GP 31    val r31   = C.Reg CB.GP 31
24    
25     (*========================================================================     (*========================================================================
26      *  Instruction Kinds      *  Instruction Kinds
# Line 167  Line 168 
168       | hashOpn(I.LabExp(l,f)) = I.LabelExp.hash l + hashFieldSel f       | hashOpn(I.LabExp(l,f)) = I.LabelExp.hash l + hashFieldSel f
169       | hashOpn(I.HILabExp(l,f)) = I.LabelExp.hash l + hashFieldSel f + 0w10000       | hashOpn(I.HILabExp(l,f)) = I.LabelExp.hash l + hashFieldSel f + 0w10000
170       | hashOpn(I.LOLabExp(l,f)) = I.LabelExp.hash l + hashFieldSel f + 0w20000       | hashOpn(I.LOLabExp(l,f)) = I.LabelExp.hash l + hashFieldSel f + 0w20000
171       | hashOpn(I.REG r) = C.hashCell r       | hashOpn(I.REG r) = CB.hashCell r
172     fun eqOpn(I.IMMED i,I.IMMED j) = i = j     fun eqOpn(I.IMMED i,I.IMMED j) = i = j
173       | eqOpn(I.REG x,I.REG y) = C.sameColor(x,y)       | eqOpn(I.REG x,I.REG y) = CB.sameColor(x,y)
174       | eqOpn(I.LabExp(a,b),I.LabExp(c,d)) =       | eqOpn(I.LabExp(a,b),I.LabExp(c,d)) =
175            b = d andalso I.LabelExp.==(a,c)            b = d andalso I.LabelExp.==(a,c)
176       | eqOpn(I.HILabExp(a,b),I.HILabExp(c,d)) =       | eqOpn(I.HILabExp(a,b),I.HILabExp(c,d)) =
# Line 195  Line 196 
196        | I.ARITH {a, r1, r2, t, ...} => trap(a, [t], [r1,r2])        | I.ARITH {a, r1, r2, t, ...} => trap(a, [t], [r1,r2])
197        | I.ARITHI {ai, r, t, ...}    => trapi(ai, [t], [r])        | I.ARITHI {ai, r, t, ...}    => trapi(ai, [t], [r])
198        | I.COMCLR_LDO{r1, r2, b, t1, t2, ...}=>        | I.COMCLR_LDO{r1, r2, b, t1, t2, ...}=>
199            if C.sameColor(t1,t2) then ([t1], [b, r1, r2])            if CB.sameColor(t1,t2) then ([t1], [b, r1, r2])
200            else ([t1, t2], [b, r1, r2, t2])            else ([t1, t2], [b, r1, r2, t2])
201        | I.COMICLR_LDO{i1, r2, b, t1, t2, ...}=>        | I.COMICLR_LDO{i1, r2, b, t1, t2, ...}=>
202            if C.sameColor(t1,t2) then ([t1], [b, r2])            if CB.sameColor(t1,t2) then ([t1], [b, r2])
203            else ([t1, t2], [b, r2, t2])            else ([t1, t2], [b, r2, t2])
204        | I.SHIFTV {r, t, ...}        => ([t], [r])        | I.SHIFTV {r, t, ...}        => ([t], [r])
205        | I.SHIFT {r, t, ...}         => ([t], [r])        | I.SHIFT {r, t, ...}         => ([t], [r])
# Line 220  Line 221 
221        | I.FSTOREX {b, x, ...}       => ([],  [b,x])        | I.FSTOREX {b, x, ...}       => ([],  [b,x])
222        | I.FLOAD {b, ...}            => ([],  [b])        | I.FLOAD {b, ...}            => ([],  [b])
223        | I.FLOADX{b, x, ...}         => ([],  [b,x])        | I.FLOADX{b, x, ...}         => ([],  [b,x])
224        | I.ANNOTATION{a=C.DEF_USE{cellkind=C.GP,defs,uses}, i, ...} =>        | I.ANNOTATION{a=CB.DEF_USE{cellkind=CB.GP,defs,uses}, i, ...} =>
225          let val (d,u) = defUseR i in (defs@d, u@uses) end          let val (d,u) = defUseR i in (defs@d, u@uses) end
226        | I.ANNOTATION{a, i, ...} => defUseR i        | I.ANNOTATION{a, i, ...} => defUseR i
227        | _   => ([],[])        | _   => ([],[])
# Line 240  Line 241 
241         | I.BLE{defs, uses, ...}    => (C.getFreg defs, C.getFreg uses)         | I.BLE{defs, uses, ...}    => (C.getFreg defs, C.getFreg uses)
242         | I.FCOPY{dst, src, tmp=SOME(I.FDirect f), ...} => (f::dst, src)         | I.FCOPY{dst, src, tmp=SOME(I.FDirect f), ...} => (f::dst, src)
243         | I.FCOPY{dst, src, ...}    => (dst, src)         | I.FCOPY{dst, src, ...}    => (dst, src)
244         | I.ANNOTATION{a=C.DEF_USE{cellkind=C.FP,defs,uses}, i, ...} =>         | I.ANNOTATION{a=CB.DEF_USE{cellkind=CB.FP,defs,uses}, i, ...} =>
245           let val (d,u) = defUseF i in (defs@d, u@uses) end           let val (d,u) = defUseF i in (defs@d, u@uses) end
246         | I.ANNOTATION{a, i, ...} => defUseF i         | I.ANNOTATION{a, i, ...} => defUseF i
247         | _ => ([],[])         | _ => ([],[])
248    
249    fun defUse C.GP = defUseR    fun defUse CB.GP = defUseR
250      | defUse C.FP = defUseF      | defUse CB.FP = defUseF
251      | defUse _ = error "defUse"      | defUse _ = error "defUse"
252    
253    (*========================================================================    (*========================================================================

Legend:
Removed from v.888  
changed lines
  Added in v.889

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