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/alpha32/alpha32Instr.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/alpha32/alpha32Instr.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 224 - (view) (download)

1 : monnier 16 (* alpha32Instr.sml
2 :     *
3 :     * COPYRIGHT (c) 1996 Bell Laboratories.
4 :     *
5 :     *)
6 :    
7 :     functor Alpha32Instr
8 :     (structure Const : CONSTANT
9 :     structure Region: REGION): ALPHA32INSTR =
10 :     struct
11 :     structure C = Alpha32Cells
12 :     structure Constant = Const
13 :     structure Region = Region
14 :    
15 :     (* Instruction formats *)
16 :     datatype ea =
17 :     Direct of int
18 :     | FDirect of int
19 :     | Displace of {base:int, disp:int}
20 :    
21 :    
22 :     datatype operand =
23 :     REGop of int
24 :     | IMMop of int
25 :     | HILABop of LabelExp.labexp
26 :     | LOLABop of LabelExp.labexp
27 :     | LABop of LabelExp.labexp
28 :     | CONSTop of Const.const
29 :    
30 :     datatype cond_code =
31 :     CC_EQ | CC_NEQ
32 :     | CC_LT | CC_LE | CC_GT | CC_GE
33 :     | CC_LTU | CC_LEU | CC_GTU | CC_GEU
34 :    
35 :     datatype branch = BR | BEQ | BGE | BGT | BLE | BLT | BNE | BLBC | BLBS
36 :    
37 :     datatype load = LDL | LDQ | LDQ_U
38 :     datatype store = STL | STQ | STQ_U
39 :     datatype fload = LDT | LDS
40 :     datatype fstore = STT
41 :    
42 :     datatype operate =
43 :     ZAP | ADDL | ADDQ | SUBL | SUBQ | MULL
44 :     | S4ADDL | S8ADDL
45 :     | CMPULE | CMPULT | CMPEQ | CMPLE | CMPLT | SGNXL
46 :     | AND | BIS | XOR | SRA | SRL | SLL
47 :     | INSBL | EXTBL | EXTQH | MSKBL | MSKLH
48 :    
49 :     datatype pseudo_op = DIVL | DIVLU
50 :    
51 :     datatype operateV = ADDLV | SUBLV | MULLV
52 :    
53 :     datatype foperate =
54 :     CPYS | CPYSN
55 :     | CVTQT | CVTLQ
56 :     | CMPTEQ | CMPTLT | CMPTLE | CMPTUN
57 :     datatype foperateV = CVTTQ | ADDT | SUBT | MULT | DIVT
58 :    
59 :     datatype osf_user_palcode =
60 :     BPT | BUGCHK | CALLSYS | GENTRAP | IMB | RDUNIQUE | WRUNIQUE
61 :    
62 :     datatype instruction =
63 :     DEFFREG of int (* define a floating point register *)
64 :    
65 :     (* Load/Store *)
66 :     | LDA of {r:int, b:int, d:operand} (* use of REGop is illegal as operand *)
67 :     | LDAH of {r:int, b:int, d:operand} (* use of REGop is illegal as operand *)
68 :    
69 :     | LOAD of {ldOp:load, r:int, b:int, d:operand, mem:Region.region}
70 :     | STORE of {stOp:store, r:int, b:int, d:operand, mem:Region.region}
71 :     | FLOAD of {ldOp:fload, r:int, b:int, d:operand, mem:Region.region}
72 :     | FSTORE of {stOp:fstore, r:int, b:int, d:operand, mem:Region.region}
73 :    
74 :     (* Control Instructions *)
75 :     | JMPL of {r:int, b:int, d:int} * Label.label list
76 :     | JSR of {r:int, b:int, d:int} * C.cellset * C.cellset
77 :     | BRANCH of branch * int * Label.label
78 :     | FBRANCH of branch * int * Label.label
79 :    
80 :     (* Integer Operate *)
81 :     | OPERATE of {oper:operate, ra:int, rb:operand, rc:int}
82 :     | OPERATEV of {oper:operateV, ra:int, rb:operand, rc:int}
83 :     | PSEUDOARITH of {oper: pseudo_op, ra:int, rb:operand, rc:int, tmps: C.cellset}
84 :    
85 :     (* Copy instructions *)
86 :     | COPY of {dst: int list, src:int list, impl: instruction list option ref,
87 :     tmp: ea option}
88 :     | FCOPY of {dst: int list, src:int list, impl: instruction list option ref,
89 :     tmp: ea option}
90 :    
91 :     (* Floating Point Operate *)
92 :     | FOPERATE of {oper:foperate, fa:int, fb:int, fc:int}
93 :     | FOPERATEV of {oper:foperateV, fa:int, fb:int, fc:int}
94 :    
95 :     (* Misc *)
96 :     | TRAPB (* Trap barrier *)
97 :    
98 :     | CALL_PAL of {code:osf_user_palcode, def:int list, use:int list}
99 :    
100 :     end
101 :    
102 :    
103 :    
104 :    
105 :     (*
106 : monnier 223 * $Log: alpha32Instr.sml,v $
107 :     * Revision 1.1.1.1 1998/04/08 18:39:01 george
108 :     * Version 110.5
109 :     *
110 : monnier 16 *)

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