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

Diff of /sml/trunk/src/MLRISC/sparc/instructions/sparcProps.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 4  Line 4 
4    structure C = I.C    structure C = I.C
5    structure T = I.T    structure T = I.T
6    structure LE = I.LabelExp    structure LE = I.LabelExp
7      structure CB = CellsBasis
8    
9    exception NegateConditional    exception NegateConditional
10    
# Line 13  Line 14 
14                  | IK_CALL_WITH_CUTS | IK_PHI | IK_SOURCE | IK_SINK                  | IK_CALL_WITH_CUTS | IK_PHI | IK_SOURCE | IK_SINK
15    datatype target = LABELLED of Label.label | FALLTHROUGH | ESCAPES    datatype target = LABELLED of Label.label | FALLTHROUGH | ESCAPES
16    
17    val zeroR = Option.valOf(C.zeroReg C.GP)    val zeroR = Option.valOf(C.zeroReg CB.GP)
18    val r15   = C.Reg C.GP 15    val r15   = C.Reg CB.GP 15
19    val r31   = C.Reg C.GP 31    val r31   = C.Reg CB.GP 31
20    
21    (*========================================================================    (*========================================================================
22     *  Instruction Kinds     *  Instruction Kinds
# Line 157  Line 158 
158    (*========================================================================    (*========================================================================
159     *  Equality and hashing     *  Equality and hashing
160     *========================================================================*)     *========================================================================*)
161     fun hashOpn(I.REG r) = C.hashCell r     fun hashOpn(I.REG r) = CB.hashCell r
162       | hashOpn(I.IMMED i) = Word.fromInt i       | hashOpn(I.IMMED i) = Word.fromInt i
163       | hashOpn(I.LAB l) = LE.hash l       | hashOpn(I.LAB l) = LE.hash l
164       | hashOpn(I.LO l) = LE.hash l       | hashOpn(I.LO l) = LE.hash l
165       | hashOpn(I.HI l) = LE.hash l       | hashOpn(I.HI l) = LE.hash l
166     fun eqOpn(I.REG a,I.REG b) = C.sameColor(a,b)     fun eqOpn(I.REG a,I.REG b) = CB.sameColor(a,b)
167       | eqOpn(I.IMMED a,I.IMMED b) = a = b       | eqOpn(I.IMMED a,I.IMMED b) = a = b
168       | eqOpn(I.LAB a,I.LAB b) = LE.==(a,b)       | eqOpn(I.LAB a,I.LAB b) = LE.==(a,b)
169       | eqOpn(I.LO a,I.LO b) = LE.==(a,b)       | eqOpn(I.LO a,I.LO b) = LE.==(a,b)
# Line 200  Line 201 
201          | I.Ticc{r,i,...} => oper(i,[],[r])          | I.Ticc{r,i,...} => oper(i,[],[r])
202          | I.RDY{d,...} => ([d],[])          | I.RDY{d,...} => ([d],[])
203          | I.WRY{r,i,...} => oper(i,[],[r])          | I.WRY{r,i,...} => oper(i,[],[r])
204          | I.ANNOTATION{a=C.DEF_USE{cellkind=C.GP,defs,uses}, i, ...} =>          | I.ANNOTATION{a=CB.DEF_USE{cellkind=CB.GP,defs,uses}, i, ...} =>
205            let val (d,u) = defUseR i in (defs@d, u@uses) end            let val (d,u) = defUseR i in (defs@d, u@uses) end
206          | I.ANNOTATION{a, i, ...} => defUseR i          | I.ANNOTATION{a, i, ...} => defUseR i
207          | _ => ([],[])          | _ => ([],[])
# Line 220  Line 221 
221        | I.FMOVfcc{r,d,...} => ([d],[r,d])        | I.FMOVfcc{r,d,...} => ([d],[r,d])
222        | I.FCOPY{src,dst,tmp=SOME(I.FDirect r),...} => (r::dst,src)        | I.FCOPY{src,dst,tmp=SOME(I.FDirect r),...} => (r::dst,src)
223        | I.FCOPY{src,dst,...} => (dst,src)        | I.FCOPY{src,dst,...} => (dst,src)
224        | I.ANNOTATION{a=C.DEF_USE{cellkind=C.FP,defs,uses}, i, ...} =>        | I.ANNOTATION{a=CB.DEF_USE{cellkind=CB.FP,defs,uses}, i, ...} =>
225          let val (d,u) = defUseF i in (defs@d, u@uses) end          let val (d,u) = defUseF i in (defs@d, u@uses) end
226        | I.ANNOTATION{a, i, ...} => defUseF i        | I.ANNOTATION{a, i, ...} => defUseF i
227        | _ => ([],[])        | _ => ([],[])
228    
229    fun defUse C.GP = defUseR    fun defUse CB.GP = defUseR
230      | defUse C.FP = defUseF      | defUse CB.FP = defUseF
231      | defUse _    = error "defUse"      | defUse _    = error "defUse"
232    
233    (*========================================================================    (*========================================================================

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