2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
/* $Id: alpha_ins.h,v 1.1.1.1 1998/01/17 15:56:01 release Exp $ */
|
|
|
32 |
|
|
|
33 |
/*
|
|
|
34 |
alpha_insdecs.h
|
|
|
35 |
This file provides definitions for the components of the alpha
|
|
|
36 |
instruction set. The first field of each instruction is its
|
|
|
37 |
symbolic representation, the second is its binasm representation.
|
|
|
38 |
*/
|
|
|
39 |
|
|
|
40 |
/*
|
|
|
41 |
$Log: alpha_ins.h,v $
|
|
|
42 |
* Revision 1.1.1.1 1998/01/17 15:56:01 release
|
|
|
43 |
* First version to be checked into rolling release.
|
|
|
44 |
*
|
|
|
45 |
* Revision 1.1 1995/08/21 08:42:47 john
|
|
|
46 |
* Changed include file
|
|
|
47 |
*
|
|
|
48 |
* Revision 1.3 1995/06/21 14:24:35 john
|
|
|
49 |
* Added declarations for exception-raising operations
|
|
|
50 |
*
|
|
|
51 |
* Revision 1.2 1995/04/07 11:00:34 john
|
|
|
52 |
* Added some special floating point ops
|
|
|
53 |
*
|
|
|
54 |
* Revision 1.1.1.1 1995/03/23 10:39:01 john
|
|
|
55 |
* Entered into CVS
|
|
|
56 |
*
|
|
|
57 |
* Revision 1.6 1995/03/23 09:58:03 john
|
|
|
58 |
* Instruction now include class information (added for scheduling
|
|
|
59 |
* support)
|
|
|
60 |
*
|
|
|
61 |
* Revision 1.5 1995/01/26 13:33:55 john
|
|
|
62 |
* Added some instructions
|
|
|
63 |
*
|
|
|
64 |
*/
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
#ifndef ALPHA_INSTR_DECS
|
|
|
68 |
#define ALPHA_INSTR_DECS
|
|
|
69 |
#include "ibinasm.h"
|
|
|
70 |
#include "instypes.h"
|
|
|
71 |
#define PASTE(a,b) a##b
|
|
|
72 |
|
|
|
73 |
#ifdef INS_DEFINE
|
|
|
74 |
|
|
|
75 |
#if DO_SCHEDULE
|
|
|
76 |
#define instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_null}
|
|
|
77 |
#define load_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_load}
|
|
|
78 |
#define fload_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_fload}
|
|
|
79 |
#define store_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_store_data}
|
|
|
80 |
#define fstore_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_fstore_data}
|
|
|
81 |
#define ibranch_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_ibranch}
|
|
|
82 |
#define fbranch_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_fbranch}
|
|
|
83 |
#define subroutine_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_subroutine}
|
|
|
84 |
#define iarith_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_iarithmetic}
|
|
|
85 |
#define imultl_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_imultiplyl}
|
|
|
86 |
#define imultq_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_imultiplyq}
|
|
|
87 |
#define ilogical_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_ilogical}
|
|
|
88 |
#define ishift_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_ishift}
|
|
|
89 |
#define icondmove_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_icondmove}
|
|
|
90 |
#define icompare_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_icompare}
|
|
|
91 |
#define fpop_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_fpop}
|
|
|
92 |
#define fdivs_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_fdivs}
|
|
|
93 |
#define fdivd_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_fdivd}
|
|
|
94 |
#define null_instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst),class_null}
|
|
|
95 |
#else
|
|
|
96 |
#define instr(inst) instruction PASTE(i_,inst) = {#inst,PASTE(z,inst)}
|
|
|
97 |
#define load_instr instr
|
|
|
98 |
#define fload_instr instr
|
|
|
99 |
#define store_instr instr
|
|
|
100 |
#define fstore_instr instr
|
|
|
101 |
#define ibranch_instr instr
|
|
|
102 |
#define fbranch_instr instr
|
|
|
103 |
#define subroutine_instr instr
|
|
|
104 |
#define iarith_instr instr
|
|
|
105 |
#define imultl_instr instr
|
|
|
106 |
#define imultq_instr instr
|
|
|
107 |
#define ilogical_instr instr
|
|
|
108 |
#define ishift_instr instr
|
|
|
109 |
#define icondmove_instr instr
|
|
|
110 |
#define icompare_instr instr
|
|
|
111 |
#define fpop_instr instr
|
|
|
112 |
#define fdivs_instr instr
|
|
|
113 |
#define fdivd_instr instr
|
|
|
114 |
#define null_instr instr
|
|
|
115 |
#endif
|
|
|
116 |
|
|
|
117 |
#else /* INS_DEFINE */
|
|
|
118 |
#define instr(inst) extern instruction PASTE(i_,inst)
|
|
|
119 |
#define load_instr instr
|
|
|
120 |
#define fload_instr instr
|
|
|
121 |
#define store_instr instr
|
|
|
122 |
#define fstore_instr instr
|
|
|
123 |
#define ibranch_instr instr
|
|
|
124 |
#define fbranch_instr instr
|
|
|
125 |
#define subroutine_instr instr
|
|
|
126 |
#define iarith_instr instr
|
|
|
127 |
#define imultl_instr instr
|
|
|
128 |
#define imultq_instr instr
|
|
|
129 |
#define ilogical_instr instr
|
|
|
130 |
#define ishift_instr instr
|
|
|
131 |
#define icondmove_instr instr
|
|
|
132 |
#define icompare_instr instr
|
|
|
133 |
#define fpop_instr instr
|
|
|
134 |
#define fdivs_instr instr
|
|
|
135 |
#define fdivd_instr instr
|
|
|
136 |
#define null_instr instr
|
|
|
137 |
#endif
|
|
|
138 |
|
|
|
139 |
/* integer load and store */
|
|
|
140 |
iarith_instr(lda);
|
|
|
141 |
iarith_instr(ldil);
|
|
|
142 |
iarith_instr(ldiq);
|
|
|
143 |
iarith_instr(ldah);
|
|
|
144 |
load_instr(ldl);
|
|
|
145 |
load_instr(ldl_l);
|
|
|
146 |
load_instr(ldq);
|
|
|
147 |
load_instr(ldq_l);
|
|
|
148 |
load_instr(ldq_u);
|
|
|
149 |
iarith_instr(ldgp);
|
|
|
150 |
store_instr(stl);
|
|
|
151 |
store_instr(stl_c);
|
|
|
152 |
store_instr(stq);
|
|
|
153 |
store_instr(stq_c);
|
|
|
154 |
store_instr(stq_u);
|
|
|
155 |
|
|
|
156 |
/* integer control */
|
|
|
157 |
ibranch_instr(beq);
|
|
|
158 |
ibranch_instr(bge);
|
|
|
159 |
ibranch_instr(bgt);
|
|
|
160 |
ibranch_instr(blbc);
|
|
|
161 |
ibranch_instr(blbs);
|
|
|
162 |
ibranch_instr(ble);
|
|
|
163 |
ibranch_instr(blt);
|
|
|
164 |
ibranch_instr(bne);
|
|
|
165 |
ibranch_instr(br);
|
|
|
166 |
subroutine_instr(bsr);
|
|
|
167 |
subroutine_instr(jmp);
|
|
|
168 |
subroutine_instr(jsr);
|
|
|
169 |
subroutine_instr(ret);
|
|
|
170 |
subroutine_instr(jsr_coroutine);
|
|
|
171 |
|
|
|
172 |
/* integer arithmetic */
|
|
|
173 |
iarith_instr(addl);
|
|
|
174 |
iarith_instr(addq);
|
|
|
175 |
iarith_instr(addlv);
|
|
|
176 |
iarith_instr(addqv);
|
|
|
177 |
iarith_instr(s4addl);
|
|
|
178 |
iarith_instr(s8addl);
|
|
|
179 |
iarith_instr(s4addq);
|
|
|
180 |
iarith_instr(s8addq);
|
|
|
181 |
icompare_instr(cmpeq);
|
|
|
182 |
icompare_instr(cmplt);
|
|
|
183 |
icompare_instr(cmple);
|
|
|
184 |
icompare_instr(cmpult);
|
|
|
185 |
icompare_instr(cmpule);
|
|
|
186 |
imultl_instr(mull);
|
|
|
187 |
imultq_instr(mulq);
|
|
|
188 |
imultl_instr(mullv);
|
|
|
189 |
imultq_instr(mulqv);
|
|
|
190 |
imultq_instr(umulh);
|
|
|
191 |
iarith_instr(subl);
|
|
|
192 |
iarith_instr(sublv);
|
|
|
193 |
iarith_instr(subq);
|
|
|
194 |
iarith_instr(subqv);
|
|
|
195 |
iarith_instr(s4subl);
|
|
|
196 |
iarith_instr(s8subl);
|
|
|
197 |
iarith_instr(s4subq);
|
|
|
198 |
iarith_instr(s8subq);
|
|
|
199 |
|
|
|
200 |
/* assembler macros */
|
|
|
201 |
subroutine_instr(divl);
|
|
|
202 |
subroutine_instr(divlu);
|
|
|
203 |
subroutine_instr(divq);
|
|
|
204 |
subroutine_instr(divqu);
|
|
|
205 |
subroutine_instr(reml);
|
|
|
206 |
subroutine_instr(remlu);
|
|
|
207 |
subroutine_instr(remq);
|
|
|
208 |
subroutine_instr(remqu);
|
|
|
209 |
|
|
|
210 |
|
|
|
211 |
/* logic and shift */
|
|
|
212 |
ilogical_instr(and);
|
|
|
213 |
ilogical_instr(bic);
|
|
|
214 |
ilogical_instr(bis);
|
|
|
215 |
ilogical_instr(eqv);
|
|
|
216 |
ilogical_instr(ornot);
|
|
|
217 |
ilogical_instr(xor);
|
|
|
218 |
icondmove_instr(cmoveq);
|
|
|
219 |
icondmove_instr(cmovge);
|
|
|
220 |
icondmove_instr(cmovgt);
|
|
|
221 |
icondmove_instr(cmovlbc);
|
|
|
222 |
icondmove_instr(cmovlbs);
|
|
|
223 |
icondmove_instr(cmovle);
|
|
|
224 |
icondmove_instr(cmovlt);
|
|
|
225 |
icondmove_instr(cmovne);
|
|
|
226 |
ishift_instr(sll);
|
|
|
227 |
ishift_instr(sra);
|
|
|
228 |
ishift_instr(srl);
|
|
|
229 |
|
|
|
230 |
/* byte manipulation */
|
|
|
231 |
icompare_instr(cmpbge);
|
|
|
232 |
ishift_instr(extbl);
|
|
|
233 |
ishift_instr(extwl);
|
|
|
234 |
ishift_instr(extll);
|
|
|
235 |
ishift_instr(extql);
|
|
|
236 |
ishift_instr(extwh);
|
|
|
237 |
ishift_instr(extlh);
|
|
|
238 |
ishift_instr(extqh);
|
|
|
239 |
ishift_instr(insbl);
|
|
|
240 |
ishift_instr(inswl);
|
|
|
241 |
ishift_instr(insll);
|
|
|
242 |
ishift_instr(insql);
|
|
|
243 |
ishift_instr(inswh);
|
|
|
244 |
ishift_instr(inslh);
|
|
|
245 |
ishift_instr(insqh);
|
|
|
246 |
ishift_instr(mskbl);
|
|
|
247 |
ishift_instr(mskwl);
|
|
|
248 |
ishift_instr(mskll);
|
|
|
249 |
ishift_instr(mskql);
|
|
|
250 |
ishift_instr(mskwh);
|
|
|
251 |
ishift_instr(msklh);
|
|
|
252 |
ishift_instr(mskqh);
|
|
|
253 |
ishift_instr(zap);
|
|
|
254 |
ishift_instr(zapnot);
|
|
|
255 |
|
|
|
256 |
/* memory format floating point */
|
|
|
257 |
fload_instr(ldf);
|
|
|
258 |
fload_instr(ldg);
|
|
|
259 |
fload_instr(lds);
|
|
|
260 |
fload_instr(ldis);
|
|
|
261 |
fload_instr(ldit);
|
|
|
262 |
fload_instr(ldt);
|
|
|
263 |
fstore_instr(stf);
|
|
|
264 |
fstore_instr(stg);
|
|
|
265 |
fstore_instr(sts);
|
|
|
266 |
fstore_instr(stt);
|
|
|
267 |
|
|
|
268 |
/* branch format floating point */
|
|
|
269 |
fbranch_instr(fbeq);
|
|
|
270 |
fbranch_instr(fbge);
|
|
|
271 |
fbranch_instr(fbgt);
|
|
|
272 |
fbranch_instr(fble);
|
|
|
273 |
fbranch_instr(fblt);
|
|
|
274 |
fbranch_instr(fbne);
|
|
|
275 |
|
|
|
276 |
/* floating point operate */
|
|
|
277 |
fpop_instr(cpys);
|
|
|
278 |
fpop_instr(cpyse);
|
|
|
279 |
fpop_instr(cpysn);
|
|
|
280 |
fpop_instr(cvtlq);
|
|
|
281 |
fpop_instr(cvtql);
|
|
|
282 |
fpop_instr(fcmoveq);
|
|
|
283 |
fpop_instr(fcmovge);
|
|
|
284 |
fpop_instr(fcmovgt);
|
|
|
285 |
fpop_instr(fcmovle);
|
|
|
286 |
fpop_instr(fcmovlt);
|
|
|
287 |
fpop_instr(fcmovne);
|
|
|
288 |
fpop_instr(mf_fpcr);
|
|
|
289 |
fpop_instr(mt_fpcr);
|
|
|
290 |
fpop_instr(addf);
|
|
|
291 |
fpop_instr(addg);
|
|
|
292 |
fpop_instr(adds);
|
|
|
293 |
fpop_instr(addssu);
|
|
|
294 |
fpop_instr(addt);
|
|
|
295 |
fpop_instr(addtsu);
|
|
|
296 |
fpop_instr(cmpgeq);
|
|
|
297 |
fpop_instr(cmpgle);
|
|
|
298 |
fpop_instr(cmpglt);
|
|
|
299 |
fpop_instr(cmpteq);
|
|
|
300 |
fpop_instr(cmptle);
|
|
|
301 |
fpop_instr(cmptlt);
|
|
|
302 |
fpop_instr(cmptun);
|
|
|
303 |
fpop_instr(cvtdg);
|
|
|
304 |
fpop_instr(cvtgd);
|
|
|
305 |
fpop_instr(cvtgf);
|
|
|
306 |
fpop_instr(cvtgq);
|
|
|
307 |
fpop_instr(cvtqf);
|
|
|
308 |
fpop_instr(cvtqg);
|
|
|
309 |
fpop_instr(cvtqs);
|
|
|
310 |
fpop_instr(cvtqt);
|
|
|
311 |
fpop_instr(cvttq);
|
|
|
312 |
fpop_instr(cvttqc);
|
|
|
313 |
fpop_instr(cvttqd);
|
|
|
314 |
fpop_instr(cvttqm);
|
|
|
315 |
fpop_instr(cvtts);
|
|
|
316 |
instr(divf);
|
|
|
317 |
instr(divg);
|
|
|
318 |
fdivs_instr(divs);
|
|
|
319 |
fdivd_instr(divt);
|
|
|
320 |
fdivs_instr(divssu);
|
|
|
321 |
fdivd_instr(divtsu);
|
|
|
322 |
fpop_instr(mulf);
|
|
|
323 |
fpop_instr(mulg);
|
|
|
324 |
fpop_instr(muls);
|
|
|
325 |
fpop_instr(mulssu);
|
|
|
326 |
fpop_instr(mult);
|
|
|
327 |
fpop_instr(multsu);
|
|
|
328 |
fpop_instr(subf);
|
|
|
329 |
fpop_instr(subg);
|
|
|
330 |
fpop_instr(subs);
|
|
|
331 |
fpop_instr(subssu);
|
|
|
332 |
fpop_instr(subt);
|
|
|
333 |
fpop_instr(subtsu);
|
|
|
334 |
/* miscellaneous */
|
|
|
335 |
instr(fetch);
|
|
|
336 |
instr(fetch_m);
|
|
|
337 |
instr(mb);
|
|
|
338 |
instr(rpcc);
|
|
|
339 |
instr(trapb);
|
|
|
340 |
|
|
|
341 |
/* VAX compatibility (!!) */
|
|
|
342 |
instr(rc);
|
|
|
343 |
instr(rs);
|
|
|
344 |
|
|
|
345 |
/*
|
|
|
346 |
The following generate multiple machine instructions
|
|
|
347 |
(assembler macros)
|
|
|
348 |
*/
|
|
|
349 |
instr(ldb);
|
|
|
350 |
instr(ldbu);
|
|
|
351 |
instr(ldw);
|
|
|
352 |
instr(ldwu);
|
|
|
353 |
instr(uldw);
|
|
|
354 |
instr(uldwu);
|
|
|
355 |
instr(uldl);
|
|
|
356 |
instr(uldq);
|
|
|
357 |
instr(stb);
|
|
|
358 |
instr(stw);
|
|
|
359 |
instr(ustw);
|
|
|
360 |
instr(ustl);
|
|
|
361 |
instr(ustq);
|
|
|
362 |
|
|
|
363 |
|
|
|
364 |
/* PalCode */
|
|
|
365 |
#if 0
|
|
|
366 |
#include "palcode.h"
|
|
|
367 |
#endif
|
|
|
368 |
|
|
|
369 |
#endif
|