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/alpha/mltree/alpha.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/alpha/mltree/alpha.sml

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

revision 554, Thu Mar 2 21:29:44 2000 UTC revision 555, Fri Mar 3 16:10:30 2000 UTC
# Line 12  Line 12 
12     (structure AlphaInstr : ALPHAINSTR     (structure AlphaInstr : ALPHAINSTR
13      structure AlphaMLTree : MLTREE      structure AlphaMLTree : MLTREE
14      structure PseudoInstrs : ALPHA_PSEUDO_INSTR      structure PseudoInstrs : ALPHA_PSEUDO_INSTR
15        structure ExtensionComp : MLTREE_EXTENSION_COMP
16           where T = AlphaMLTree and I = AlphaInstr
17         sharing AlphaMLTree.Region   = AlphaInstr.Region         sharing AlphaMLTree.Region   = AlphaInstr.Region
18         sharing AlphaMLTree.LabelExp = AlphaInstr.LabelExp         sharing AlphaMLTree.LabelExp = AlphaInstr.LabelExp
19         sharing PseudoInstrs.I = AlphaInstr         sharing PseudoInstrs.I = AlphaInstr
# Line 140  Line 142 
142    fun error msg = MLRiscErrorMsg.error("Alpha",msg)    fun error msg = MLRiscErrorMsg.error("Alpha",msg)
143    
144    type instrStream = (I.instruction,C.regmap,C.cellset) T.stream    type instrStream = (I.instruction,C.regmap,C.cellset) T.stream
145    type ('s,'r,'f,'c) mltreeStream =    type mltreeStream = (T.stm,C.regmap,T.mlrisc list) T.stream
      (('s,'r,'f,'c) T.stm,C.regmap,('s,'r,'f,'c) T.mlrisc list) T.stream  
   type ('s,'r,'f,'c) reducer =  
      (I.instruction,C.regmap,C.cellset,I.operand,I.addressing_mode,'s,'r,'f,'c)  
        T.reducer  
   type ('s,'r,'f,'c) extender =  
      (I.instruction,C.regmap,C.cellset,I.operand,I.addressing_mode,'s,'r,'f,'c)  
        T.extender  
   
146    
147    (*    (*
148     * This module is used to simulate operations of non-standard widths.     * This module is used to simulate operations of non-standard widths.
# Line 291  Line 285 
285    datatype commutative = COMMUTE | NOCOMMUTE    datatype commutative = COMMUTE | NOCOMMUTE
286    
287    fun selectInstructions    fun selectInstructions
         (T.EXTENDER{compileStm, compileRexp, compileFexp, compileCCexp, ...})  
288          (instrStream as          (instrStream as
289           S.STREAM{emit,beginCluster,endCluster,           S.STREAM{emit,beginCluster,endCluster,
290                    defineLabel,entryLabel,pseudoOp,annotation,                    defineLabel,entryLabel,pseudoOp,annotation,
# Line 1020  Line 1013 
1013            | T.CVTI2I(64, T.ZERO_EXTEND, 32, e) => doExpr(e, d, an)            | T.CVTI2I(64, T.ZERO_EXTEND, 32, e) => doExpr(e, d, an)
1014    
1015            | T.PRED(e, c) => doExpr(e, d, A.CTRLUSE c::an)            | T.PRED(e, c) => doExpr(e, d, A.CTRLUSE c::an)
1016            | T.REXT e => compileRexp (reducer()) {e=e, an=an, rd=d}            | T.REXT e => ExtensionComp.compileRext (reducer()) {e=e, an=an, rd=d}
1017    
1018             (* Defaults *)             (* Defaults *)
1019            | e => doExpr(Gen.compileRexp e,d,an)            | e => doExpr(Gen.compileRexp e,d,an)
# Line 1124  Line 1117 
1117            | T.FMARK(e,A.MARKREG f) => (f d; doFexpr(e,d,an))            | T.FMARK(e,A.MARKREG f) => (f d; doFexpr(e,d,an))
1118            | T.FMARK(e,a) => doFexpr(e,d,a::an)            | T.FMARK(e,a) => doFexpr(e,d,a::an)
1119            | T.FPRED(e,c) => doFexpr(e, d, A.CTRLUSE c::an)            | T.FPRED(e,c) => doFexpr(e, d, A.CTRLUSE c::an)
1120            | T.FEXT e => compileFexp (reducer()) {e=e, fd=d, an=an}            | T.FEXT e => ExtensionComp.compileFext (reducer()) {e=e, fd=d, an=an}
1121            | _ => error "doFexpr"            | _ => error "doFexpr"
1122    
1123            (* check whether an expression is andb(e,1) *)            (* check whether an expression is andb(e,1) *)
# Line 1381  Line 1374 
1374          | doCCexpr(T.FCMP(fty,cond,e1,e2),d,an) = error "doCCexpr"          | doCCexpr(T.FCMP(fty,cond,e1,e2),d,an) = error "doCCexpr"
1375          | doCCexpr(T.CCMARK(e,A.MARKREG f),d,an) = (f d; doCCexpr(e,d,an))          | doCCexpr(T.CCMARK(e,A.MARKREG f),d,an) = (f d; doCCexpr(e,d,an))
1376          | doCCexpr(T.CCMARK(e,a),d,an) = doCCexpr(e,d,a::an)          | doCCexpr(T.CCMARK(e,a),d,an) = doCCexpr(e,d,a::an)
1377          | doCCexpr(T.CCEXT e,d,an) = compileCCexp (reducer()) {e=e, cd=d, an=an}          | doCCexpr(T.CCEXT e,d,an) =
1378                 ExtensionComp.compileCCext (reducer()) {e=e, ccd=d, an=an}
1379          | doCCexpr _ = error "doCCexpr"          | doCCexpr _ = error "doCCexpr"
1380    
1381        and ccExpr(T.CC(_,r)) = r        and ccExpr(T.CC(_,r)) = r
# Line 1410  Line 1404 
1404            | T.FSTORE(64,ea,data,mem) => fstore(I.STT,ea,data,mem,an)            | T.FSTORE(64,ea,data,mem) => fstore(I.STT,ea,data,mem,an)
1405            | T.DEFINE l => defineLabel l            | T.DEFINE l => defineLabel l
1406            | T.ANNOTATION(s,a) => stmt(s,a::an)            | T.ANNOTATION(s,a) => stmt(s,a::an)
1407            | T.EXT s => compileStm (reducer()) {stm=s,an=an}            | T.EXT s => ExtensionComp.compileSext (reducer()) {stm=s,an=an}
1408            | s => doStmts (Gen.compileStm s)            | s => doStmts (Gen.compileStm s)
1409    
1410        and reducer() =        and reducer() =

Legend:
Removed from v.554  
changed lines
  Added in v.555

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