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/branches/SMLNJ/src/MLRISC/hppa/hppaInstr.sml
ViewVC logotype

Annotation of /sml/branches/SMLNJ/src/MLRISC/hppa/hppaInstr.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 106 - (view) (download)

1 : monnier 16 (* hppaInstr.sml
2 :     *
3 :     * COPYRIGHT (c) 1996 Bell Laboratories.
4 :     *
5 :     *)
6 :    
7 :     functor HppaInstr(structure Const : CONSTANT
8 :     structure Region : REGION) : HPPAINSTR =
9 :     struct
10 :     structure C = HppaCells
11 :     structure Constant = Const
12 :     structure Region = Region
13 :    
14 :     type csets = int list * int list
15 :    
16 :     datatype store = STW | STH | STB
17 :    
18 :     (* All branching is done with nullification *)
19 :     datatype cmp = COMBT | COMBF
20 :    
21 :     datatype cmpi = COMIBT | COMIBF
22 :    
23 :     datatype load = LDWX | LDHX | LDBX
24 :    
25 :     datatype loadi = LDW | LDH | LDB
26 :    
27 :     datatype arith = ADD | ADDO | SH1ADD | SH1ADDO
28 :     | SUB | SUBO | OR | XOR | AND
29 :    
30 :     datatype arithi = ADDI | ADDIO | ADDIL | SUBI | SUBIO
31 :    
32 :     datatype shiftv = VEXTRU | VEXTRS | ZVDEP
33 :    
34 :     datatype shift = EXTRU | EXTRS | ZDEP
35 :    
36 :     datatype farith = FADD | FSUB | FMPY | FDIV | XMPYU
37 :    
38 :     (* FCNVXF --- the source is the LHS single precision floating register *)
39 :     datatype funary = FCPY | FABS | FCNVXF
40 :    
41 :     datatype fstore = FSTDS | FSTWS
42 :    
43 :     datatype fstorex = FSTDX | FSTWX
44 :    
45 :     (* FLDWX and FLDWS -- loads the RHS of the floating register *)
46 :     datatype floadx = FLDDX | FLDWX
47 :    
48 :     datatype fload = FLDDS | FLDWS
49 :    
50 :     datatype bcond = EQ | LT | LE | LTU | LEU | NE | GE | GT | GTU | GEU
51 : monnier 106 datatype fcond = ? | !<=> | == | ?= | !<> | !?>= | < | ?< | !>= | !?> |
52 :     <= | ?<= | !> | !?<= | > | ?> | !<= | !?< | >= | ?>= |
53 :     !< | !?= | <> | != | !? | <=>
54 : monnier 16
55 :     datatype scond = ALL_ZERO | LEFTMOST_ONE | LEFTMOST_ZERO | RIGHTMOST_ONE
56 :     | RIGHTMOST_ZERO
57 :    
58 :     datatype field_selector = F | S | D | R | T | P
59 :    
60 :     datatype ea =
61 :     Direct of int
62 :     | FDirect of int
63 :     | Displace of {base:int, disp:int}
64 :    
65 :     datatype operand =
66 :     IMMED of int
67 :     | LabExp of LabelExp.labexp * field_selector
68 :     | HILabExp of LabelExp.labexp * field_selector
69 :     | LOLabExp of LabelExp.labexp * field_selector
70 :     | ConstOp of Constant.const
71 :    
72 :     (* FLDWS, FLDWX = define the R half of the FP register.
73 :     * FSTWS = uses the R half of the FP register.
74 :     *)
75 :     datatype instruction =
76 :     STORE of {st:store, b:int, d:operand, r:int, mem:Region.region}
77 :     | LOAD of {l:load, r1:int, r2:int, t:int, mem:Region.region}
78 :     | LOADI of {li:loadi, i:operand, r:int, t:int, mem:Region.region}
79 :     | ARITH of {a:arith, r1:int, r2:int, t:int}
80 :     | ARITHI of {ai:arithi, i:operand, r:int, t:int}
81 :     | COMCLR of {cc:bcond, r1:int, r2:int, t:int}
82 :     | SHIFTV of {sv:shiftv, r:int, len:int, t:int}
83 :     | SHIFT of {s:shift, r:int, p:int, len:int, t:int}
84 :     | BCOND of {cmp: cmp, bc:bcond, r1:int, r2:int, n:bool,
85 :     t:Label.label, f:Label.label}
86 :     | BCONDI of {cmpi: cmpi, bc:bcond, i:int, r2:int, n:bool,
87 :     t:Label.label, f:Label.label}
88 :     | B of {lab: Label.label, n:bool}
89 :     | FBCC of {t:Label.label, f:Label.label, n:bool}
90 :     | BV of {x:int, b:int, labs: Label.label list, n:bool}
91 :     | BL of {x:operand, t:int, defs: C.cellset, uses:C.cellset,n:bool}
92 :     | BLE of {d:operand, b:int, sr:int, t:int,
93 :     defs: C.cellset, uses:C.cellset}
94 :     | LDIL of {i:operand, t:int}
95 :     | LDO of {i:operand, b:int, t:int}
96 :     | MTCTL of {r:int, t:int}
97 :     | FSTORE of {fst:fstore, b:int, d:int, r:int, mem:Region.region}
98 :     | FSTOREX of {fstx:fstorex, b:int, x:int, r:int, mem:Region.region}
99 :     | FLOAD of {fl:fload, b:int, d:int, t:int, mem:Region.region}
100 :     | FLOADX of {flx:floadx, b:int, x:int, t:int, mem:Region.region}
101 :     | FARITH of {fa:farith, r1:int, r2:int, t:int}
102 :     | FUNARY of {fu:funary, f:int, t:int}
103 :     | FCMP of fcond * int * int
104 :     | FTEST
105 :     | BREAK of int * int
106 :     | NOP
107 :     | COPY of {dst:int list, src:int list,
108 :     impl:instruction list option ref, tmp: ea option}
109 :     | FCOPY of {dst:int list, src:int list,
110 :     impl:instruction list option ref, tmp: ea option}
111 :     end
112 :    
113 :     (*
114 :     * $Log: hppaInstr.sml,v $
115 : monnier 106 * Revision 1.2 1998/05/19 15:45:22 george
116 :     * Introduced the full set of IEEE comparision operators.
117 :     *
118 : monnier 93 * Revision 1.1.1.1 1998/04/08 18:39:01 george
119 :     * Version 110.5
120 : monnier 16 *
121 :     *)

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