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/SSA/ssa-exp.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/SSA/ssa-exp.sig

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : monnier 221 (*
2 :     * exp describes the semantics of an instruction
3 :     *)
4 :     signature SSA_EXP =
5 :     sig
6 :    
7 :     datatype cond = LT | LTU | LE | LEU | EQ | NE | GE | GEU | GT | GTU
8 :     | VC | VS | SETCC
9 :     datatype fcond = ? | !<=> | == | ?= | !<> | !?>= | < | ?< | !>= | !?> |
10 :     <= | ?<= | !> | !?<= | > | ?> | !<= | !?< | >= | ?>= |
11 :     !< | !?= | <> | != | !? | <=> | SETFCC
12 :    
13 :     (* supported types *)
14 :     datatype ty = I8 | U8 | I16 | U16 | I32 | U32 | I64 | U64 | F | D
15 :    
16 :     (* arithmetic operations *)
17 :     datatype binop = ADD | SUB | MUL | DIV | MOD
18 :     | ADDT | SUBT | MULT | DIVT | MODT
19 :     | ANDB | ORB | XORB | SRA | SRL | SLL
20 :     | CMP of cond | FCMP of fcond | SET of cond
21 :     | TRAP of cond
22 :     datatype unary = ABS | NEG | NOT | NOTB | SQRT | CVT of ty
23 :     | CC of cond | FCC of fcond
24 :    
25 :     datatype exp =
26 :     LI
27 :     | ID of int
28 :     | COPY
29 :     | PC
30 :     | XFER
31 :     | BINOP of binop * ty * exp * exp
32 :     | UNARY of unary * ty * exp
33 :     | LOAD of ty * exp (* addr *)
34 :     | STORE of ty * exp * exp (* data addr *)
35 :     | INIT of ty * exp * exp (* data addr *)
36 :     | DEALLOC of exp
37 :     | JMP of exp
38 :     | BRANCH of exp
39 :     | CALL of exp
40 :     | RET
41 :     | NOP
42 :     | PAR of exp list (* parallel actions *)
43 :     | PHI of int
44 :     | PINNED of exp
45 :     | MISC of {hash:int,arity:int,name:string,attribs:int} ref
46 :    
47 :     val A_TRAPPING : int
48 :     val A_PINNED : int
49 :     val A_MUTATOR : int
50 :     val A_LOOKER : int
51 :     val A_PURE : int
52 :    
53 :     val hash : exp -> int (* hash function *)
54 :     val toString : string list -> exp -> string (* pretty print *)
55 :     val revCond : cond -> cond (* reverse *)
56 :     val revFcond : fcond -> fcond (* reverse *)
57 :    
58 :     (* generate a new instruction *)
59 :     val misc : {name:string,arity:int,attribs:int} -> exp
60 :    
61 :     val isCommutative : exp -> bool (* commutative operation? *)
62 :     val isTrapping : exp -> bool (* can it generate an arithmetic trap? *)
63 :     val isPinned : exp -> bool (* is it safe to removed it? *)
64 :    
65 :     val isMutator : exp -> bool
66 :     val isLooker : exp -> bool
67 :     val isPure : exp -> bool
68 :    
69 :     val can'tMoveDown : exp -> bool (* can't be moved downward *)
70 :     val can'tMoveUp : exp -> bool (* can't be moved upward *)
71 :     end
72 :    
73 :     (*
74 : monnier 227 * $Log$
75 : monnier 221 *)

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