Machine Code Emitters
Overview
MLRISC lets the client to directly emit machine code and bypass the traditional
assembly mechanism.
Machine code emitters in MLRISC satisfy the signature
INSTRUCTION_EMITTER,
which is defined as:
signature INSTRUCTION_EMITTER =
sig
structure I : INSTRUCTIONS
structure C : CELLS
structure S : INSTRUCTION_STREAM
structure P : 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
end
The function makeStream returns an instruction stream.
The output, a stream of bytes, is direct to the client supplied
structure which satisfy the
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
end
More Details
Machine code emitters are automatically generated by the
MDGen tool. Some specific generated
emitters are listed below:
- Sparc
- Hppa
- Alpha
- Power PC
- X86
|
|
Generated by
mltex2html
|
Last modified: Mon Jun 8 14:18:05 UTC 2009 by buildd@vernadsky
|
|