ia64.h revision 1.5.2.1 1 1.1 christos /* ia64.h -- Header file for ia64 opcode table
2 1.5.2.1 martin Copyright (C) 1998-2018 Free Software Foundation, Inc.
3 1.1 christos Contributed by David Mosberger-Tang <davidm (at) hpl.hp.com>
4 1.1 christos
5 1.1 christos This file is part of BFD, the Binary File Descriptor library.
6 1.1 christos
7 1.1 christos This program is free software; you can redistribute it and/or modify
8 1.1 christos it under the terms of the GNU General Public License as published by
9 1.1 christos the Free Software Foundation; either version 3 of the License, or
10 1.1 christos (at your option) any later version.
11 1.1 christos
12 1.1 christos This program is distributed in the hope that it will be useful,
13 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of
14 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 1.1 christos GNU General Public License for more details.
16 1.1 christos
17 1.1 christos You should have received a copy of the GNU General Public License
18 1.1 christos along with this program; if not, write to the Free Software Foundation,
19 1.1 christos Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20 1.1 christos
21 1.1 christos #ifndef opcode_ia64_h
22 1.1 christos #define opcode_ia64_h
23 1.1 christos
24 1.1 christos #include <sys/types.h>
25 1.1 christos
26 1.1 christos #include "bfd.h"
27 1.1 christos
28 1.5 christos #ifdef __cplusplus
29 1.5 christos extern "C" {
30 1.5 christos #endif
31 1.1 christos
32 1.1 christos typedef BFD_HOST_U_64_BIT ia64_insn;
33 1.1 christos
34 1.1 christos enum ia64_insn_type
35 1.1 christos {
36 1.1 christos IA64_TYPE_NIL = 0, /* illegal type */
37 1.1 christos IA64_TYPE_A, /* integer alu (I- or M-unit) */
38 1.1 christos IA64_TYPE_I, /* non-alu integer (I-unit) */
39 1.1 christos IA64_TYPE_M, /* memory (M-unit) */
40 1.1 christos IA64_TYPE_B, /* branch (B-unit) */
41 1.1 christos IA64_TYPE_F, /* floating-point (F-unit) */
42 1.1 christos IA64_TYPE_X, /* long encoding (X-unit) */
43 1.1 christos IA64_TYPE_DYN, /* Dynamic opcode */
44 1.1 christos IA64_NUM_TYPES
45 1.1 christos };
46 1.1 christos
47 1.1 christos enum ia64_unit
48 1.1 christos {
49 1.1 christos IA64_UNIT_NIL = 0, /* illegal unit */
50 1.1 christos IA64_UNIT_I, /* integer unit */
51 1.1 christos IA64_UNIT_M, /* memory unit */
52 1.1 christos IA64_UNIT_B, /* branching unit */
53 1.1 christos IA64_UNIT_F, /* floating-point unit */
54 1.1 christos IA64_UNIT_L, /* long "unit" */
55 1.1 christos IA64_UNIT_X, /* may be integer or branch unit */
56 1.1 christos IA64_NUM_UNITS
57 1.1 christos };
58 1.1 christos
59 1.1 christos /* Changes to this enumeration must be propagated to the operand table in
60 1.1 christos bfd/cpu-ia64-opc.c
61 1.1 christos */
62 1.1 christos enum ia64_opnd
63 1.1 christos {
64 1.1 christos IA64_OPND_NIL, /* no operand---MUST BE FIRST!*/
65 1.1 christos
66 1.1 christos /* constants */
67 1.1 christos IA64_OPND_AR_CSD, /* application register csd (ar.csd) */
68 1.1 christos IA64_OPND_AR_CCV, /* application register ccv (ar.ccv) */
69 1.1 christos IA64_OPND_AR_PFS, /* application register pfs (ar.pfs) */
70 1.1 christos IA64_OPND_C1, /* the constant 1 */
71 1.1 christos IA64_OPND_C8, /* the constant 8 */
72 1.1 christos IA64_OPND_C16, /* the constant 16 */
73 1.1 christos IA64_OPND_GR0, /* gr0 */
74 1.1 christos IA64_OPND_IP, /* instruction pointer (ip) */
75 1.1 christos IA64_OPND_PR, /* predicate register (pr) */
76 1.1 christos IA64_OPND_PR_ROT, /* rotating predicate register (pr.rot) */
77 1.1 christos IA64_OPND_PSR, /* processor status register (psr) */
78 1.1 christos IA64_OPND_PSR_L, /* processor status register L (psr.l) */
79 1.1 christos IA64_OPND_PSR_UM, /* processor status register UM (psr.um) */
80 1.1 christos
81 1.1 christos /* register operands: */
82 1.1 christos IA64_OPND_AR3, /* third application register # (bits 20-26) */
83 1.1 christos IA64_OPND_B1, /* branch register # (bits 6-8) */
84 1.1 christos IA64_OPND_B2, /* branch register # (bits 13-15) */
85 1.1 christos IA64_OPND_CR3, /* third control register # (bits 20-26) */
86 1.1 christos IA64_OPND_F1, /* first floating-point register # */
87 1.1 christos IA64_OPND_F2, /* second floating-point register # */
88 1.1 christos IA64_OPND_F3, /* third floating-point register # */
89 1.1 christos IA64_OPND_F4, /* fourth floating-point register # */
90 1.1 christos IA64_OPND_P1, /* first predicate # */
91 1.1 christos IA64_OPND_P2, /* second predicate # */
92 1.1 christos IA64_OPND_R1, /* first register # */
93 1.1 christos IA64_OPND_R2, /* second register # */
94 1.1 christos IA64_OPND_R3, /* third register # */
95 1.1 christos IA64_OPND_R3_2, /* third register # (limited to gr0-gr3) */
96 1.1 christos IA64_OPND_DAHR3, /* dahr reg # ( bits 23-25) */
97 1.1 christos
98 1.1 christos /* memory operands: */
99 1.1 christos IA64_OPND_MR3, /* memory at addr of third register # */
100 1.1 christos
101 1.1 christos /* indirect operands: */
102 1.1 christos IA64_OPND_CPUID_R3, /* cpuid[reg] */
103 1.1 christos IA64_OPND_DBR_R3, /* dbr[reg] */
104 1.1 christos IA64_OPND_DTR_R3, /* dtr[reg] */
105 1.1 christos IA64_OPND_ITR_R3, /* itr[reg] */
106 1.1 christos IA64_OPND_IBR_R3, /* ibr[reg] */
107 1.1 christos IA64_OPND_MSR_R3, /* msr[reg] */
108 1.1 christos IA64_OPND_PKR_R3, /* pkr[reg] */
109 1.1 christos IA64_OPND_PMC_R3, /* pmc[reg] */
110 1.1 christos IA64_OPND_PMD_R3, /* pmd[reg] */
111 1.1 christos IA64_OPND_DAHR_R3, /* dahr[reg] */
112 1.1 christos IA64_OPND_RR_R3, /* rr[reg] */
113 1.1 christos
114 1.1 christos /* immediate operands: */
115 1.1 christos IA64_OPND_CCNT5, /* 5-bit count (31 - bits 20-24) */
116 1.1 christos IA64_OPND_CNT2a, /* 2-bit count (1 + bits 27-28) */
117 1.1 christos IA64_OPND_CNT2b, /* 2-bit count (bits 27-28): 1, 2, 3 */
118 1.1 christos IA64_OPND_CNT2c, /* 2-bit count (bits 30-31): 0, 7, 15, or 16 */
119 1.1 christos IA64_OPND_CNT5, /* 5-bit count (bits 14-18) */
120 1.1 christos IA64_OPND_CNT6, /* 6-bit count (bits 27-32) */
121 1.1 christos IA64_OPND_CPOS6a, /* 6-bit count (63 - bits 20-25) */
122 1.1 christos IA64_OPND_CPOS6b, /* 6-bit count (63 - bits 14-19) */
123 1.1 christos IA64_OPND_CPOS6c, /* 6-bit count (63 - bits 31-36) */
124 1.1 christos IA64_OPND_IMM1, /* signed 1-bit immediate (bit 36) */
125 1.1 christos IA64_OPND_IMMU2, /* unsigned 2-bit immediate (bits 13-14) */
126 1.1 christos IA64_OPND_IMMU5b, /* unsigned 5-bit immediate (32 + bits 14-18) */
127 1.1 christos IA64_OPND_IMMU7a, /* unsigned 7-bit immediate (bits 13-19) */
128 1.1 christos IA64_OPND_IMMU7b, /* unsigned 7-bit immediate (bits 20-26) */
129 1.1 christos IA64_OPND_SOF, /* 8-bit stack frame size */
130 1.1 christos IA64_OPND_SOL, /* 8-bit size of locals */
131 1.1 christos IA64_OPND_SOR, /* 6-bit number of rotating registers (scaled by 8) */
132 1.1 christos IA64_OPND_IMM8, /* signed 8-bit immediate (bits 13-19 & 36) */
133 1.1 christos IA64_OPND_IMM8U4, /* cmp4*u signed 8-bit immediate (bits 13-19 & 36) */
134 1.1 christos IA64_OPND_IMM8M1, /* signed 8-bit immediate -1 (bits 13-19 & 36) */
135 1.1 christos IA64_OPND_IMM8M1U4, /* cmp4*u signed 8-bit immediate -1 (bits 13-19 & 36)*/
136 1.1 christos IA64_OPND_IMM8M1U8, /* cmp*u signed 8-bit immediate -1 (bits 13-19 & 36) */
137 1.1 christos IA64_OPND_IMMU9, /* unsigned 9-bit immediate (bits 33-34, 20-26) */
138 1.1 christos IA64_OPND_IMM9a, /* signed 9-bit immediate (bits 6-12, 27, 36) */
139 1.1 christos IA64_OPND_IMM9b, /* signed 9-bit immediate (bits 13-19, 27, 36) */
140 1.1 christos IA64_OPND_IMM14, /* signed 14-bit immediate (bits 13-19, 27-32, 36) */
141 1.1 christos IA64_OPND_IMMU16, /* unsigned 16-bit immediate (bits 6-9, 12-22, 36) */
142 1.1 christos IA64_OPND_IMM17, /* signed 17-bit immediate (2*bits 6-12, 24-31, 36) */
143 1.1 christos IA64_OPND_IMMU19, /* unsigned 19-bit immediate (bits 6-9, 12-25, 36) */
144 1.1 christos IA64_OPND_IMMU21, /* unsigned 21-bit immediate (bits 6-25, 36) */
145 1.1 christos IA64_OPND_IMM22, /* signed 22-bit immediate (bits 13-19, 22-36) */
146 1.1 christos IA64_OPND_IMMU24, /* unsigned 24-bit immediate (bits 6-26, 31-32, 36) */
147 1.1 christos IA64_OPND_IMM44, /* signed 44-bit immediate (2^16*bits 6-32, 36) */
148 1.1 christos IA64_OPND_IMMU62, /* unsigned 62-bit immediate */
149 1.1 christos IA64_OPND_IMMU64, /* unsigned 64-bit immediate (lotsa bits...) */
150 1.1 christos IA64_OPND_INC3, /* signed 3-bit (bits 13-15): +/-1, 4, 8, 16 */
151 1.1 christos IA64_OPND_LEN4, /* 4-bit count (bits 27-30 + 1) */
152 1.1 christos IA64_OPND_LEN6, /* 6-bit count (bits 27-32 + 1) */
153 1.1 christos IA64_OPND_MBTYPE4, /* 4-bit mux type (bits 20-23) */
154 1.1 christos IA64_OPND_MHTYPE8, /* 8-bit mux type (bits 20-27) */
155 1.1 christos IA64_OPND_POS6, /* 6-bit count (bits 14-19) */
156 1.1 christos IA64_OPND_TAG13, /* signed 13-bit tag (ip + 16*bits 6-12, 33-34) */
157 1.1 christos IA64_OPND_TAG13b, /* signed 13-bit tag (ip + 16*bits 24-32) */
158 1.1 christos IA64_OPND_TGT25, /* signed 25-bit (ip + 16*bits 6-25, 36) */
159 1.1 christos IA64_OPND_TGT25b, /* signed 25-bit (ip + 16*bits 6-12, 20-32, 36) */
160 1.1 christos IA64_OPND_TGT25c, /* signed 25-bit (ip + 16*bits 13-32, 36) */
161 1.1 christos IA64_OPND_TGT64, /* 64-bit (ip + 16*bits 13-32, 36, 2-40(L)) */
162 1.1 christos IA64_OPND_LDXMOV, /* any symbol, generates R_IA64_LDXMOV. */
163 1.1 christos
164 1.1 christos IA64_OPND_CNT6a, /* 6-bit count (bits 6-11) */
165 1.1 christos IA64_OPND_STRD5b, /* 5-bit stride (bits 13-17) */
166 1.1 christos
167 1.1 christos IA64_OPND_COUNT /* # of operand types (MUST BE LAST!) */
168 1.1 christos };
169 1.1 christos
170 1.1 christos enum ia64_dependency_mode
171 1.1 christos {
172 1.1 christos IA64_DV_RAW,
173 1.1 christos IA64_DV_WAW,
174 1.1 christos IA64_DV_WAR,
175 1.1 christos };
176 1.1 christos
177 1.1 christos enum ia64_dependency_semantics
178 1.1 christos {
179 1.1 christos IA64_DVS_NONE,
180 1.1 christos IA64_DVS_IMPLIED,
181 1.1 christos IA64_DVS_IMPLIEDF,
182 1.1 christos IA64_DVS_DATA,
183 1.1 christos IA64_DVS_INSTR,
184 1.1 christos IA64_DVS_SPECIFIC,
185 1.1 christos IA64_DVS_STOP,
186 1.1 christos IA64_DVS_OTHER,
187 1.1 christos };
188 1.1 christos
189 1.1 christos enum ia64_resource_specifier
190 1.1 christos {
191 1.1 christos IA64_RS_ANY,
192 1.1 christos IA64_RS_AR_K,
193 1.1 christos IA64_RS_AR_UNAT,
194 1.1 christos IA64_RS_AR, /* 8-15, 20, 22-23, 31, 33-35, 37-39, 41-43, 45-47, 67-111 */
195 1.1 christos IA64_RS_ARb, /* 48-63, 112-127 */
196 1.1 christos IA64_RS_BR,
197 1.1 christos IA64_RS_CFM,
198 1.1 christos IA64_RS_CPUID,
199 1.1 christos IA64_RS_CR_IIB,
200 1.1 christos IA64_RS_CR_IRR,
201 1.1 christos IA64_RS_CR_LRR,
202 1.1 christos IA64_RS_CR, /* 3-7,10-15,18,28-63,75-79,82-127 */
203 1.1 christos IA64_RS_DAHR,
204 1.1 christos IA64_RS_DBR,
205 1.1 christos IA64_RS_FR,
206 1.1 christos IA64_RS_FRb,
207 1.1 christos IA64_RS_GR0,
208 1.1 christos IA64_RS_GR,
209 1.1 christos IA64_RS_IBR,
210 1.1 christos IA64_RS_INSERVICE, /* CR[EOI] or CR[IVR] */
211 1.1 christos IA64_RS_MSR,
212 1.1 christos IA64_RS_PKR,
213 1.1 christos IA64_RS_PMC,
214 1.1 christos IA64_RS_PMD,
215 1.1 christos IA64_RS_PR, /* non-rotating, 1-15 */
216 1.1 christos IA64_RS_PRr, /* rotating, 16-62 */
217 1.1 christos IA64_RS_PR63,
218 1.1 christos IA64_RS_RR,
219 1.1 christos
220 1.1 christos IA64_RS_ARX, /* ARs not in RS_AR or RS_ARb */
221 1.1 christos IA64_RS_CRX, /* CRs not in RS_CR */
222 1.1 christos IA64_RS_PSR, /* PSR bits */
223 1.1 christos IA64_RS_RSE, /* implementation-specific RSE resources */
224 1.1 christos IA64_RS_AR_FPSR,
225 1.1 christos
226 1.1 christos };
227 1.1 christos
228 1.1 christos enum ia64_rse_resource
229 1.1 christos {
230 1.1 christos IA64_RSE_N_STACKED_PHYS,
231 1.1 christos IA64_RSE_BOF,
232 1.1 christos IA64_RSE_STORE_REG,
233 1.1 christos IA64_RSE_LOAD_REG,
234 1.1 christos IA64_RSE_BSPLOAD,
235 1.1 christos IA64_RSE_RNATBITINDEX,
236 1.1 christos IA64_RSE_CFLE,
237 1.1 christos IA64_RSE_NDIRTY,
238 1.1 christos };
239 1.1 christos
240 1.1 christos /* Information about a given resource dependency */
241 1.1 christos struct ia64_dependency
242 1.1 christos {
243 1.1 christos /* Name of the resource */
244 1.1 christos const char *name;
245 1.1 christos /* Does this dependency need further specification? */
246 1.1 christos enum ia64_resource_specifier specifier;
247 1.1 christos /* Mode of dependency */
248 1.1 christos enum ia64_dependency_mode mode;
249 1.1 christos /* Dependency semantics */
250 1.1 christos enum ia64_dependency_semantics semantics;
251 1.1 christos /* Register index, if applicable (distinguishes AR, CR, and PSR deps) */
252 1.1 christos #define REG_NONE (-1)
253 1.1 christos int regindex;
254 1.1 christos /* Special info on semantics */
255 1.1 christos const char *info;
256 1.1 christos };
257 1.1 christos
258 1.1 christos /* Two arrays of indexes into the ia64_dependency table.
259 1.1 christos chks are dependencies to check for conflicts when an opcode is
260 1.1 christos encountered; regs are dependencies to register (mark as used) when an
261 1.1 christos opcode is used. chks correspond to readers (RAW) or writers (WAW or
262 1.1 christos WAR) of a resource, while regs correspond to writers (RAW or WAW) and
263 1.1 christos readers (WAR) of a resource. */
264 1.1 christos struct ia64_opcode_dependency
265 1.1 christos {
266 1.1 christos int nchks;
267 1.1 christos const unsigned short *chks;
268 1.1 christos int nregs;
269 1.1 christos const unsigned short *regs;
270 1.1 christos };
271 1.1 christos
272 1.1 christos /* encode/extract the note/index for a dependency */
273 1.1 christos #define RDEP(N,X) (((N)<<11)|(X))
274 1.1 christos #define NOTE(X) (((X)>>11)&0x1F)
275 1.1 christos #define DEP(X) ((X)&0x7FF)
276 1.1 christos
277 1.1 christos /* A template descriptor describes the execution units that are active
278 1.1 christos for each of the three slots. It also specifies the location of
279 1.1 christos instruction group boundaries that may be present between two slots. */
280 1.1 christos struct ia64_templ_desc
281 1.1 christos {
282 1.1 christos int group_boundary; /* 0=no boundary, 1=between slot 0 & 1, etc. */
283 1.1 christos enum ia64_unit exec_unit[3];
284 1.1 christos const char *name;
285 1.1 christos };
286 1.1 christos
287 1.1 christos /* The opcode table is an array of struct ia64_opcode. */
288 1.1 christos
289 1.1 christos struct ia64_opcode
290 1.1 christos {
291 1.1 christos /* The opcode name. */
292 1.1 christos const char *name;
293 1.1 christos
294 1.1 christos /* The type of the instruction: */
295 1.1 christos enum ia64_insn_type type;
296 1.1 christos
297 1.1 christos /* Number of output operands: */
298 1.1 christos int num_outputs;
299 1.1 christos
300 1.1 christos /* The opcode itself. Those bits which will be filled in with
301 1.1 christos operands are zeroes. */
302 1.1 christos ia64_insn opcode;
303 1.1 christos
304 1.1 christos /* The opcode mask. This is used by the disassembler. This is a
305 1.1 christos mask containing ones indicating those bits which must match the
306 1.1 christos opcode field, and zeroes indicating those bits which need not
307 1.1 christos match (and are presumably filled in by operands). */
308 1.1 christos ia64_insn mask;
309 1.1 christos
310 1.1 christos /* An array of operand codes. Each code is an index into the
311 1.1 christos operand table. They appear in the order which the operands must
312 1.1 christos appear in assembly code, and are terminated by a zero. */
313 1.1 christos enum ia64_opnd operands[5];
314 1.1 christos
315 1.1 christos /* One bit flags for the opcode. These are primarily used to
316 1.1 christos indicate specific processors and environments support the
317 1.1 christos instructions. The defined values are listed below. */
318 1.1 christos unsigned int flags;
319 1.1 christos
320 1.1 christos /* Used by ia64_find_next_opcode (). */
321 1.1 christos short ent_index;
322 1.1 christos
323 1.1 christos /* Opcode dependencies. */
324 1.1 christos const struct ia64_opcode_dependency *dependencies;
325 1.1 christos };
326 1.1 christos
327 1.1 christos /* Values defined for the flags field of a struct ia64_opcode. */
328 1.1 christos
329 1.1 christos #define IA64_OPCODE_FIRST (1<<0) /* must be first in an insn group */
330 1.1 christos #define IA64_OPCODE_X_IN_MLX (1<<1) /* insn is allowed in X slot of MLX */
331 1.1 christos #define IA64_OPCODE_LAST (1<<2) /* must be last in an insn group */
332 1.1 christos #define IA64_OPCODE_PRIV (1<<3) /* privileged instruct */
333 1.1 christos #define IA64_OPCODE_SLOT2 (1<<4) /* insn allowed in slot 2 only */
334 1.1 christos #define IA64_OPCODE_NO_PRED (1<<5) /* insn cannot be predicated */
335 1.1 christos #define IA64_OPCODE_PSEUDO (1<<6) /* insn is a pseudo-op */
336 1.1 christos #define IA64_OPCODE_F2_EQ_F3 (1<<7) /* constraint: F2 == F3 */
337 1.1 christos #define IA64_OPCODE_LEN_EQ_64MCNT (1<<8) /* constraint: LEN == 64-CNT */
338 1.1 christos #define IA64_OPCODE_MOD_RRBS (1<<9) /* modifies all rrbs in CFM */
339 1.1 christos #define IA64_OPCODE_POSTINC (1<<10) /* postincrement MR3 operand */
340 1.1 christos
341 1.1 christos /* A macro to extract the major opcode from an instruction. */
342 1.1 christos #define IA64_OP(i) (((i) >> 37) & 0xf)
343 1.1 christos
344 1.1 christos enum ia64_operand_class
345 1.1 christos {
346 1.1 christos IA64_OPND_CLASS_CST, /* constant */
347 1.1 christos IA64_OPND_CLASS_REG, /* register */
348 1.1 christos IA64_OPND_CLASS_IND, /* indirect register */
349 1.1 christos IA64_OPND_CLASS_ABS, /* absolute value */
350 1.1 christos IA64_OPND_CLASS_REL, /* IP-relative value */
351 1.1 christos };
352 1.1 christos
353 1.1 christos /* The operands table is an array of struct ia64_operand. */
354 1.1 christos
355 1.1 christos struct ia64_operand
356 1.1 christos {
357 1.1 christos enum ia64_operand_class op_class;
358 1.1 christos
359 1.1 christos /* Set VALUE as the operand bits for the operand of type SELF in the
360 1.1 christos instruction pointed to by CODE. If an error occurs, *CODE is not
361 1.1 christos modified and the returned string describes the cause of the
362 1.1 christos error. If no error occurs, NULL is returned. */
363 1.1 christos const char *(*insert) (const struct ia64_operand *self, ia64_insn value,
364 1.1 christos ia64_insn *code);
365 1.1 christos
366 1.1 christos /* Extract the operand bits for an operand of type SELF from
367 1.1 christos instruction CODE store them in *VALUE. If an error occurs, the
368 1.1 christos cause of the error is described by the string returned. If no
369 1.1 christos error occurs, NULL is returned. */
370 1.1 christos const char *(*extract) (const struct ia64_operand *self, ia64_insn code,
371 1.1 christos ia64_insn *value);
372 1.1 christos
373 1.1 christos /* A string whose meaning depends on the operand class. */
374 1.1 christos
375 1.1 christos const char *str;
376 1.1 christos
377 1.1 christos struct bit_field
378 1.1 christos {
379 1.1 christos /* The number of bits in the operand. */
380 1.1 christos int bits;
381 1.1 christos
382 1.1 christos /* How far the operand is left shifted in the instruction. */
383 1.1 christos int shift;
384 1.1 christos }
385 1.1 christos field[4]; /* no operand has more than this many bit-fields */
386 1.1 christos
387 1.1 christos unsigned int flags;
388 1.1 christos
389 1.1 christos const char *desc; /* brief description */
390 1.1 christos };
391 1.1 christos
392 1.1 christos /* Values defined for the flags field of a struct ia64_operand. */
393 1.1 christos
394 1.1 christos /* Disassemble as signed decimal (instead of hex): */
395 1.1 christos #define IA64_OPND_FLAG_DECIMAL_SIGNED (1<<0)
396 1.1 christos /* Disassemble as unsigned decimal (instead of hex): */
397 1.1 christos #define IA64_OPND_FLAG_DECIMAL_UNSIGNED (1<<1)
398 1.1 christos
399 1.1 christos extern const struct ia64_templ_desc ia64_templ_desc[16];
400 1.1 christos
401 1.1 christos /* The tables are sorted by major opcode number and are otherwise in
402 1.1 christos the order in which the disassembler should consider instructions. */
403 1.1 christos extern struct ia64_opcode ia64_opcodes_a[];
404 1.1 christos extern struct ia64_opcode ia64_opcodes_i[];
405 1.1 christos extern struct ia64_opcode ia64_opcodes_m[];
406 1.1 christos extern struct ia64_opcode ia64_opcodes_b[];
407 1.1 christos extern struct ia64_opcode ia64_opcodes_f[];
408 1.1 christos extern struct ia64_opcode ia64_opcodes_d[];
409 1.1 christos
410 1.1 christos
411 1.1 christos extern struct ia64_opcode *ia64_find_opcode (const char *);
412 1.1 christos extern struct ia64_opcode *ia64_find_next_opcode (struct ia64_opcode *);
413 1.1 christos
414 1.1 christos extern struct ia64_opcode *ia64_dis_opcode (ia64_insn,
415 1.1 christos enum ia64_insn_type);
416 1.1 christos
417 1.1 christos extern void ia64_free_opcode (struct ia64_opcode *);
418 1.1 christos extern const struct ia64_dependency *ia64_find_dependency (int);
419 1.1 christos
420 1.1 christos /* To avoid circular library dependencies, this array is implemented
421 1.1 christos in bfd/cpu-ia64-opc.c: */
422 1.1 christos extern const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT];
423 1.1 christos
424 1.5 christos #ifdef __cplusplus
425 1.5 christos }
426 1.5 christos #endif
427 1.5 christos
428 1.1 christos #endif /* opcode_ia64_h */
429