Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/instructions/stream.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/instructions/stream.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 744 - (view) (download) (as text)

1 : monnier 409 (*
2 :     * This is a generic instruction stream datatype.
3 :     * Components such as assemblers, machine code emitters, instruction
4 :     * selection modules communicate with each via this interface.
5 :     *
6 :     * -- Allen
7 :     *)
8 :    
9 :     signature INSTRUCTION_STREAM =
10 :     sig
11 :    
12 :     structure P : PSEUDO_OPS
13 :    
14 : leunga 744 datatype ('a,'b,'c) stream =
15 : monnier 409 STREAM of
16 : leunga 744 { beginCluster: int -> unit, (* start new compilation unit *)
17 :     endCluster : 'b -> unit, (* end compilation unit *)
18 :     emit : 'a -> unit, (* emit instruction *)
19 : monnier 429 pseudoOp : P.pseudo_op -> unit, (* emit a pseudo op *)
20 :     defineLabel : Label.label -> unit, (* define a local label *)
21 :     entryLabel : Label.label -> unit, (* define an external label *)
22 :     comment : string -> unit, (* emit comment *)
23 :     annotation : Annotations.annotation -> unit, (* add annotation *)
24 : leunga 744 exitBlock : 'c -> unit (* mark the end of a procedure *)
25 : monnier 429 }
26 : monnier 409
27 : monnier 429 (* Note:
28 :     o Each compilation unit should be wrapped between beginCluster/endCluster.
29 :    
30 :     o The method annotation adds an annotation to the current basic block,
31 :     not to the current instruction.
32 :    
33 :     o The method comment add a comment to the current basic block.
34 :     Usually comment(msg) is the same as
35 :     annotation(BasicAnnotations.COMMENT msg).
36 :     *)
37 :    
38 : monnier 409 end

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