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

View of /sml/trunk/src/MLRISC/mltree/mltree-stream.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 985 - (download) (annotate)
Wed Nov 21 19:09:12 2001 UTC (17 years, 9 months ago) by george
File size: 1683 byte(s)
  Implemented a complete redesign of MLRISC pseudo-ops. Now there
  ought to never be any question of incompatabilities with
  pseudo-op syntax expected by host assemblers.

  For now, only modules supporting GAS syntax are implemented
  but more should follow, such as MASM, and vendor assembler
  syntax, e.g. IBM as, Sun as, etc.
signature MLTREE_STREAM = sig
  structure T : MLTREE
  structure S : INSTRUCTION_STREAM

  (*
   * Instruction streams
   *)
  type ('i,'cellset, 'cfg) stream = ('i, T.an list, 'cellset, 'cfg) S.stream 

  (* 
   * Extension mechanism
   *)
  datatype ('instr, 'cellset, 'operand, 'addressing_mode, 'cfg) reducer =
    REDUCER of
      {reduceRexp    : T.rexp -> T.reg,
       reduceFexp    : T.fexp -> T.reg,
       reduceCCexp   : T.ccexp -> T.reg,
       reduceStm     : T.stm * T.an list -> unit,
       operand       : T.rexp -> 'operand,
       reduceOperand : 'operand -> T.reg,
       addressOf     : T.rexp -> 'addressing_mode,
       emit          : 'instr * T.an list -> unit,
       instrStream   : ('instr,'cellset, 'cfg) stream,
       mltreeStream  : (T.stm,T.mlrisc list, 'cfg) stream
      }
end




functor MLTreeStream
   ( structure T : MLTREE
     structure S : INSTRUCTION_STREAM
    ) : MLTREE_STREAM = 
struct
  structure T = T
  structure S = S
  (*
   * Instruction streams
   *)
  type ('i,'cellset, 'cfg) stream = ('i, T.an list, 'cellset, 'cfg) S.stream 

  (* 
   * Extension mechanism
   *)
  datatype ('instr,'cellset,'operand,'addressing_mode, 'cfg) reducer =
    REDUCER of
    { reduceRexp    : T.rexp -> T.reg,
      reduceFexp    : T.fexp -> T.reg,
      reduceCCexp   : T.ccexp -> T.reg,
      reduceStm     : T.stm * T.an list -> unit,
      operand       : T.rexp -> 'operand,
      reduceOperand : 'operand -> T.reg,
      addressOf     : T.rexp -> 'addressing_mode,
      emit          : 'instr * T.an list -> unit,
      instrStream   : ('instr,'cellset, 'cfg) stream,
      mltreeStream  : (T.stm,T.mlrisc list, 'cfg) stream
    }
  
end


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