Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/emit/clusterEmit.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/emit/clusterEmit.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 499 - (download) (annotate)
Tue Dec 7 15:44:50 1999 UTC (19 years, 10 months ago) by monnier
File size: 909 byte(s)
This commit was generated by cvs2svn to compensate for changes in r498,
which included commits to RCS files with non-trunk default branches.
 * This module takes a flowgraph and an assembly emitter module and 
 * ties them together into one.  The output is sent to AsmStream.
 *  --Allen
functor ClusterEmit
  (structure F : FLOWGRAPH
      where I = F.I and P = F.P) : ASSEMBLY_EMITTER = 
  type flowgraph = F.cluster
  fun asmEmit(F.CLUSTER{blocks,regmap,annotations=an,...}) = 
  let val E.S.STREAM{pseudoOp,defineLabel,emit,annotation,comment,...} = 
             E.makeStream (!an)
      val emit = emit(E.I.C.lookup regmap)
      fun emitAn a = if Annotations.toString a = "" then () else annotation(a)
      fun emitIt(F.PSEUDO pOp) = pseudoOp pOp
        | emitIt(F.LABEL lab)  = defineLabel lab
        | emitIt(F.BBLOCK{insns, annotations=a, ...}) = 
          (app emitAn (!a);
           app emit (rev (!insns))
  in  app annotation (!an);
      app emitIt blocks

ViewVC Help
Powered by ViewVC 1.0.0