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/flowgraph/pseudo-ops.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/flowgraph/pseudo-ops.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 984 - (download) (annotate)
Wed Nov 21 19:00:08 2001 UTC (19 years, 8 months ago) by george
File size: 893 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.
(* pseudo-ops.sml
 * COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies
 * MLRISC pseudo-ops.
 * Ties together the assembler and client pseudo-ops

functor PseudoOps(structure Client : CLIENT_PSEUDO_OPS) : PSEUDO_OPS = struct
  structure Client = Client 
  structure Basis = Client.AsmPseudoOps
  structure T = Basis.T
  structure BT = PseudoOpsBasisTyp

  type pseudo_op = Client.pseudo_op Basis.pseudo_op

  fun toString(BT.EXT ext) = Client.toString ext
    | toString pOp = Basis.toString pOp

  fun sizeOf(BT.EXT ext, loc) = Client.sizeOf(ext, loc)
    | sizeOf(pOp, loc) = Basis.sizeOf(pOp, loc)

  fun emitValue(arg as {pOp, loc, emit}) = 
    (case pOp
      of BT.EXT ext => Client.emitValue{pOp=ext, loc=loc, emit=emit}
       | _ => Basis.emitValue arg

  fun adjustLabels(BT.EXT ext, loc) = Client.adjustLabels(ext, loc)
    | adjustLabels _ = false


ViewVC Help
Powered by ViewVC 1.0.0