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/mc.html
ViewVC logotype

View of /sml/trunk/src/MLRISC/Doc/mc.html

Parent Directory Parent Directory | Revision Log Revision Log

Revision 499 - (download) (as text) (annotate)
Tue Dec 7 15:44:50 1999 UTC (20 years, 4 months ago) by monnier
File size: 1932 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.
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.07 [en] (X11; I; Linux 2.2.7 i686) [Netscape]">
<BODY bgcolor="#FFFFFF">

<FONT COLOR="#aa0000">Machine Code Emitters</FONT></H1></CENTER>

<h3> Overview </h3>
Machine code emitters in MLRISC satisfy the signature 
<a href="../emit/instruction-emitter.sig" target=code>INSTRUCTION_EMITTER</a>,
which is defined as:

   structure I : <a href="instructions.html">INSTRUCTIONS</a>
   structure C : <a href="cells.html">CELLS</a>
   structure S : <a href="streams.html">INSTRUCTION_STREAM</a>
   structure P : <a href="pseudo-ops.html">PSEUDO_OPS</a>
      sharing I.C = C  
      sharing S.P = P

   val makeStream : Annotations.annotation list -> 
       (I.instruction,'a,'b) S.stream

The function <tt>makeStream</tt> returns an instruction stream.
The output, a stream of bytes, is direct to the client supplied
structure which satisfy the 
<a href="../emit/code-string.sig" target=code>CODE_STRING</a> 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

<h3> More Details </h3>

Machine code emitters are automatically generated by the 
<a href="../MD++/md.html"> MDGen </a> tool.  Some specific generated
emitters are listed below:
 <li> <a href="../sparc/emit/sparcMC.sml" target=code> Sparc </a>
 <li> <a href="../hppa/emit/hppaMC.sml" target=code> Hppa </a>
 <li> <a href="../alpha/emit/alphaMC.sml" target=code> Alpha </a>
 <li> <a href="../ppc/emit/ppcMC.sml" target=code> Power PC </a>
 <li> <a href="../x86/emit/x86MC.sml" target=code> X86 </a>



ViewVC Help
Powered by ViewVC 1.0.0