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 651 - (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 : monnier 429 datatype ('a,'b,'c,'d,'e,'f) stream =
15 : monnier 409 STREAM of
16 : monnier 429 { beginCluster: int -> 'b, (* start new compilation unit *)
17 :     endCluster : 'c -> unit, (* end compilation unit *)
18 :     emit : 'a, (* emit instruction *)
19 :     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 :     exitBlock : 'd -> unit, (* mark the end of a procedure *)
25 :     alias : 'e -> unit, (* generate alias information *)
26 :     phi : 'f -> unit (* generate phi-function *)
27 :     }
28 : monnier 409
29 : monnier 429 (* Note:
30 :     o Each compilation unit should be wrapped between beginCluster/endCluster.
31 :    
32 :     o The method annotation adds an annotation to the current basic block,
33 :     not to the current instruction.
34 :    
35 :     o The method comment add a comment to the current basic block.
36 :     Usually comment(msg) is the same as
37 :     annotation(BasicAnnotations.COMMENT msg).
38 :     *)
39 :    
40 : monnier 409 end

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