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 429 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/MLRISC/instructions/stream.sig

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 :     structure B : BLOCK_NAMES
14 :    
15 : monnier 429 datatype ('a,'b,'c,'d,'e,'f) stream =
16 : monnier 409 STREAM of
17 : monnier 429 { beginCluster: int -> 'b, (* start new compilation unit *)
18 :     endCluster : 'c -> unit, (* end compilation unit *)
19 :     emit : 'a, (* emit instruction *)
20 :     pseudoOp : P.pseudo_op -> unit, (* emit a pseudo op *)
21 :     defineLabel : Label.label -> unit, (* define a local label *)
22 :     entryLabel : Label.label -> unit, (* define an external label *)
23 :     comment : string -> unit, (* emit comment *)
24 :     blockName : B.name -> unit, (* change block name *)
25 :     annotation : Annotations.annotation -> unit, (* add annotation *)
26 :     exitBlock : 'd -> unit, (* mark the end of a procedure *)
27 :     alias : 'e -> unit, (* generate alias information *)
28 :     phi : 'f -> unit (* generate phi-function *)
29 :     }
30 : monnier 409
31 : monnier 429 (* Note:
32 :     o Each compilation unit should be wrapped between beginCluster/endCluster.
33 :    
34 :     o The method annotation adds an annotation to the current basic block,
35 :     not to the current instruction.
36 :    
37 :     o The method comment add a comment to the current basic block.
38 :     Usually comment(msg) is the same as
39 :     annotation(BasicAnnotations.COMMENT msg).
40 :     *)
41 :    
42 : monnier 409 end

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