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/idlbasis-devel/src/MLRISC/ppc/mltree/ppc.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/MLRISC/ppc/mltree/ppc.sml

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

revision 858, Wed Jun 27 21:20:27 2001 UTC revision 859, Wed Jun 27 21:43:12 2001 UTC
# Line 97  Line 97 
97      (val signed = true)      (val signed = true)
98    
99    fun selectInstructions    fun selectInstructions
100        (S.STREAM{emit,comment,        (S.STREAM{emit,comment,getAnnotations,
101                  defineLabel,entryLabel,pseudoOp,annotation,                  defineLabel,entryLabel,pseudoOp,annotation,
102                  beginCluster,endCluster,exitBlock,...}) =                  beginCluster,endCluster,exitBlock,...}) =
103    let (* mark an instruction with annotations *)    let (* mark an instruction with annotations *)
# Line 261  Line 261 
261            in  emit(MTLR(rs));            in  emit(MTLR(rs));
262                mark(I.BCLR{bo=I.ALWAYS,bf=CR0,bit=I.LT,LK=false,labels=labs},an)                mark(I.BCLR{bo=I.ALWAYS,bf=CR0,bit=I.LT,LK=false,labels=labs},an)
263            end            end
264          | stmt(T.CALL{funct, targets, defs, uses, region, ...}, an) =          | stmt(T.CALL{funct, targets, defs, uses, region, pops, ...}, an) =
265            let val defs=cellset(defs)              call(funct, targets, defs, uses, region, [], an, pops)
266                val uses=cellset(uses)          | stmt(T.FLOW_TO(T.CALL{funct, targets, defs, uses, region, pops,...},
267             in emit(MTLR(expr funct));                           cutTo), an) =
268                mark(I.CALL{def=defs, use=uses, mem=region}, an)              call(funct, targets, defs, uses, region, cutTo, an, pops)
            end  
269          | stmt(T.RET flow,an) = mark(RET,an)          | stmt(T.RET flow,an) = mark(RET,an)
270          | stmt(T.STORE(ty,ea,data,mem),an) = store(ty,ea,data,mem,an)          | stmt(T.STORE(ty,ea,data,mem),an) = store(ty,ea,data,mem,an)
271          | stmt(T.FSTORE(ty,ea,data,mem),an) = fstore(ty,ea,data,mem,an)          | stmt(T.FSTORE(ty,ea,data,mem),an) = fstore(ty,ea,data,mem,an)
# Line 275  Line 274 
274          | stmt(T.ANNOTATION(s,a),an) = stmt(s,a::an)          | stmt(T.ANNOTATION(s,a),an) = stmt(s,a::an)
275          | stmt(s, _) = doStmts(Gen.compileStm s)          | stmt(s, _) = doStmts(Gen.compileStm s)
276    
277          and call(funct, targets, defs, uses, region, cutsTo, an, 0) =
278              let val defs=cellset(defs)
279                  val uses=cellset(uses)
280              in  emit(MTLR(expr funct));
281                  mark(I.CALL{def=defs, use=uses, cutsTo=cutsTo, mem=region}, an)
282              end
283            | call _ = error "pops<>0 not implemented"
284    
285        and branch(T.CMP(_, _, T.LI _, T.LI _), _, _) = error "branch"        and branch(T.CMP(_, _, T.LI _, T.LI _), _, _) = error "branch"
286          | branch(T.CMP(ty, cc, e1 as T.LI _, e2), lab, an) =          | branch(T.CMP(ty, cc, e1 as T.LI _, e2), lab, an) =
287            let val cc' = T.Basis.swapCond cc            let val cc' = T.Basis.swapCond cc
# Line 648  Line 655 
655            | T.FADD(32,T.FMUL(32,a,c),b) => f3(I.FMADDS,a,b,c,ft,an)            | T.FADD(32,T.FMUL(32,a,c),b) => f3(I.FMADDS,a,b,c,ft,an)
656            | T.FADD(32,b,T.FMUL(32,a,c)) => f3(I.FMADDS,a,b,c,ft,an)            | T.FADD(32,b,T.FMUL(32,a,c)) => f3(I.FMADDS,a,b,c,ft,an)
657            | T.FSUB(32,T.FMUL(32,a,c),b) => f3(I.FMSUBS,a,b,c,ft,an)            | T.FSUB(32,T.FMUL(32,a,c),b) => f3(I.FMSUBS,a,b,c,ft,an)
658            | T.FSUB(32,b,T.FMUL(32,a,c)) => f3(I.FNMADDS,a,b,c,ft,an)            | T.FSUB(32,b,T.FMUL(32,a,c)) => f3(I.FNMSUBS,a,b,c,ft,an)
659            | T.FNEG(32,T.FADD(32,T.FMUL(32,a,c),b)) => f3(I.FNMSUBS,a,b,c,ft,an)            | T.FNEG(32,T.FADD(32,T.FMUL(32,a,c),b)) => f3(I.FNMADDS,a,b,c,ft,an)
660            | T.FNEG(32,T.FADD(32,b,T.FMUL(32,a,c))) => f3(I.FNMSUBS,a,b,c,ft,an)            | T.FNEG(32,T.FADD(32,b,T.FMUL(32,a,c))) => f3(I.FNMADDS,a,b,c,ft,an)
661            | T.FSUB(32,T.FNEG(32,T.FMUL(32,a,c)),b) => f3(I.FNMSUBS,a,b,c,ft,an)            | T.FSUB(32,T.FNEG(32,T.FMUL(32,a,c)),b) => f3(I.FNMADDS,a,b,c,ft,an)
662    
663            | T.FADD(32, e1, e2) => fbinary(I.FADDS, e1, e2, ft, an)            | T.FADD(32, e1, e2) => fbinary(I.FADDS, e1, e2, ft, an)
664            | T.FSUB(32, e1, e2) => fbinary(I.FSUBS, e1, e2, ft, an)            | T.FSUB(32, e1, e2) => fbinary(I.FSUBS, e1, e2, ft, an)
# Line 665  Line 672 
672            | T.FADD(64,T.FMUL(64,a,c),b) => f3(I.FMADD,a,b,c,ft,an)            | T.FADD(64,T.FMUL(64,a,c),b) => f3(I.FMADD,a,b,c,ft,an)
673            | T.FADD(64,b,T.FMUL(64,a,c)) => f3(I.FMADD,a,b,c,ft,an)            | T.FADD(64,b,T.FMUL(64,a,c)) => f3(I.FMADD,a,b,c,ft,an)
674            | T.FSUB(64,T.FMUL(64,a,c),b) => f3(I.FMSUB,a,b,c,ft,an)            | T.FSUB(64,T.FMUL(64,a,c),b) => f3(I.FMSUB,a,b,c,ft,an)
675            | T.FSUB(64,b,T.FMUL(64,a,c)) => f3(I.FNMADD,a,b,c,ft,an)            | T.FSUB(64,b,T.FMUL(64,a,c)) => f3(I.FNMSUB,a,b,c,ft,an)
676            | T.FNEG(64,T.FADD(64,T.FMUL(64,a,c),b)) => f3(I.FNMSUB,a,b,c,ft,an)            | T.FNEG(64,T.FADD(64,T.FMUL(64,a,c),b)) => f3(I.FNMADD,a,b,c,ft,an)
677            | T.FNEG(64,T.FADD(64,b,T.FMUL(64,a,c))) => f3(I.FNMSUB,a,b,c,ft,an)            | T.FNEG(64,T.FADD(64,b,T.FMUL(64,a,c))) => f3(I.FNMADD,a,b,c,ft,an)
678            | T.FSUB(64,T.FNEG(64,T.FMUL(64,a,c)),b) => f3(I.FNMSUB,a,b,c,ft,an)            | T.FSUB(64,T.FNEG(64,T.FMUL(64,a,c)),b) => f3(I.FNMADD,a,b,c,ft,an)
679    
680            | T.FADD(64, e1, e2) => fbinary(I.FADD, e1, e2, ft, an)            | T.FADD(64, e1, e2) => fbinary(I.FADD, e1, e2, ft, an)
681            | T.FSUB(64, e1, e2) => fbinary(I.FSUB, e1, e2, ft, an)            | T.FSUB(64, e1, e2) => fbinary(I.FSUB, e1, e2, ft, an)
# Line 736  Line 743 
743           entryLabel   = entryLabel,           entryLabel   = entryLabel,
744           comment      = comment,           comment      = comment,
745           annotation   = annotation,           annotation   = annotation,
746             getAnnotations=getAnnotations,
747           exitBlock    = fn mlrisc => exitBlock(cellset mlrisc)           exitBlock    = fn mlrisc => exitBlock(cellset mlrisc)
748         }         }
749     end     end

Legend:
Removed from v.858  
changed lines
  Added in v.859

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