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/Doc/latex/mc.tex
ViewVC logotype

View of /sml/trunk/src/MLRISC/Doc/latex/mc.tex

Parent Directory Parent Directory | Revision Log Revision Log

Revision 547 - (download) (as text) (annotate)
Fri Feb 25 23:54:34 2000 UTC (19 years, 7 months ago) by leunga
File size: 1674 byte(s)

New documentation files for MLRISC.  This version includes MLTREE extensions.
\section{Machine Code Emitters}

MLRISC lets the client to directly emit machine code and bypass the traditional
assembly mechanism. 

Machine code emitters in MLRISC satisfy the signature 
which is defined as:

   structure I : \href{instructions.html}{INSTRUCTIONS}
   structure C : \href{cells.html}{CELLS}
   structure S : \href{streams.html}{INSTRUCTION_STREAM}
   structure P : \href{pseudo-ops.html}{PSEUDO_OPS}
      sharing I.C = C  
      sharing S.P = P

   val makeStream : Annotations.annotations ->
                     ((int -> int) -> I.instruction -> unit,
                      unit,'b,'c,'d,'e) S.stream


The function \sml{makeStream} returns an instruction stream.
The output, a stream of bytes, is direct to the client supplied
structure which satisfy the 
\mlrischref{emit/code-string.sig}{CODE\_STRING} interface.
This signature is defined as follows:
signature CODE_STRING = sig
  type code_string
  val init          : int -> unit
  val update        : int * Word8.word -> unit
  val getCodeString : unit -> code_string

\subsubsection{More Details}

Machine code emitters are automatically generated by the 
\href{mlrisc-md.html}{MDGen} tool.  Some specific generated
emitters are listed below:
 \item \mlrischref{sparc/emit/sparcMC.sml}{Sparc}
 \item \mlrischref{hppa/emit/hppaMC.sml}{Hppa}
 \item \mlrischref{alpha/emit/alphaMC.sml}{Alpha}
 \item \mlrischref{ppc/emit/ppcMC.sml}{Power PC}
 \item \mlrischref{x86/emit/x86MC.sml}{X86}

ViewVC Help
Powered by ViewVC 1.0.0