Rizin
unix-like reverse engineering framework and cli tools
aarch64.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2009-2018 Free Software Foundation, Inc.
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 /* AArch64 assembler/disassembler support.
5 
6  Copyright (C) 2009-2018 Free Software Foundation, Inc.
7  Contributed by ARM Ltd.
8 
9  This file is part of GNU Binutils.
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 3 of the license, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; see the file COPYING3. If not,
23  see <http://www.gnu.org/licenses/>. */
24 
25 #ifndef OPCODE_AARCH64_H
26 #define OPCODE_AARCH64_H
27 
28 #include "mybfd.h"
29 // #include "bfd_stdint.h"
30 #include <stdint.h>
31 #include <stdlib.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /* The offset for pc-relative addressing is currently defined to be 0. */
38 #define AARCH64_PCREL_OFFSET 0
39 
41 
42 /* The following bitmasks control CPU features. */
43 #define AARCH64_FEATURE_SHA2 0x200000000ULL /* SHA2 instructions. */
44 #define AARCH64_FEATURE_AES 0x800000000ULL /* AES instructions. */
45 #define AARCH64_FEATURE_V8_4 0x000000800ULL /* ARMv8.4 processors. */
46 #define AARCH64_FEATURE_SM4 0x100000000ULL /* SM3 & SM4 instructions. */
47 #define AARCH64_FEATURE_SHA3 0x400000000ULL /* SHA3 instructions. */
48 #define AARCH64_FEATURE_V8 0x00000001 /* All processors. */
49 #define AARCH64_FEATURE_V8_2 0x00000020 /* ARMv8.2 processors. */
50 #define AARCH64_FEATURE_V8_3 0x00000040 /* ARMv8.3 processors. */
51 #define AARCH64_FEATURE_CRYPTO 0x00010000 /* Crypto instructions. */
52 #define AARCH64_FEATURE_FP 0x00020000 /* FP instructions. */
53 #define AARCH64_FEATURE_SIMD 0x00040000 /* SIMD instructions. */
54 #define AARCH64_FEATURE_CRC 0x00080000 /* CRC instructions. */
55 #define AARCH64_FEATURE_LSE 0x00100000 /* LSE instructions. */
56 #define AARCH64_FEATURE_PAN 0x00200000 /* PAN instructions. */
57 #define AARCH64_FEATURE_LOR 0x00400000 /* LOR instructions. */
58 #define AARCH64_FEATURE_RDMA 0x00800000 /* v8.1 SIMD instructions. */
59 #define AARCH64_FEATURE_V8_1 0x01000000 /* v8.1 features. */
60 #define AARCH64_FEATURE_F16 0x02000000 /* v8.2 FP16 instructions. */
61 #define AARCH64_FEATURE_RAS 0x04000000 /* RAS Extensions. */
62 #define AARCH64_FEATURE_PROFILE 0x08000000 /* Statistical Profiling. */
63 #define AARCH64_FEATURE_SVE 0x10000000 /* SVE instructions. */
64 #define AARCH64_FEATURE_RCPC 0x20000000 /* RCPC instructions. */
65 #define AARCH64_FEATURE_COMPNUM 0x40000000 /* Complex # instructions. */
66 #define AARCH64_FEATURE_DOTPROD 0x080000000 /* Dot Product instructions. */
67 #define AARCH64_FEATURE_F16_FML 0x1000000000ULL /* v8.2 FP16FML ins. */
68 
69 /* Architectures are the sum of the base and extensions. */
70 #define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \
71  AARCH64_FEATURE_FP \
72  | AARCH64_FEATURE_SIMD)
73 #define AARCH64_ARCH_V8_1 AARCH64_FEATURE (AARCH64_ARCH_V8, \
74  AARCH64_FEATURE_CRC \
75  | AARCH64_FEATURE_V8_1 \
76  | AARCH64_FEATURE_LSE \
77  | AARCH64_FEATURE_PAN \
78  | AARCH64_FEATURE_LOR \
79  | AARCH64_FEATURE_RDMA)
80 #define AARCH64_ARCH_V8_2 AARCH64_FEATURE (AARCH64_ARCH_V8_1, \
81  AARCH64_FEATURE_V8_2 \
82  | AARCH64_FEATURE_RAS)
83 #define AARCH64_ARCH_V8_3 AARCH64_FEATURE (AARCH64_ARCH_V8_2, \
84  AARCH64_FEATURE_V8_3 \
85  | AARCH64_FEATURE_RCPC \
86  | AARCH64_FEATURE_COMPNUM)
87 #define AARCH64_ARCH_V8_4 AARCH64_FEATURE (AARCH64_ARCH_V8_3, \
88  AARCH64_FEATURE_V8_4 \
89  | AARCH64_FEATURE_DOTPROD \
90  | AARCH64_FEATURE_F16_FML)
91 
92 #define AARCH64_ARCH_NONE AARCH64_FEATURE (0, 0)
93 #define AARCH64_ANY AARCH64_FEATURE (-1, 0) /* Any basic core. */
94 
95 /* CPU-specific features. */
96 typedef unsigned long long aarch64_feature_set;
97 
98 #define AARCH64_CPU_HAS_ALL_FEATURES(CPU,FEAT) \
99  ((~(CPU) & (FEAT)) == 0)
100 
101 #define AARCH64_CPU_HAS_ANY_FEATURES(CPU,FEAT) \
102  (((CPU) & (FEAT)) != 0)
103 
104 #define AARCH64_CPU_HAS_FEATURE(CPU,FEAT) \
105  AARCH64_CPU_HAS_ALL_FEATURES (CPU,FEAT)
106 
107 #define AARCH64_MERGE_FEATURE_SETS(TARG,F1,F2) \
108  do \
109  { \
110  (TARG) = (F1) | (F2); \
111  } \
112  while (0)
113 
114 #define AARCH64_CLEAR_FEATURE(TARG,F1,F2) \
115  do \
116  { \
117  (TARG) = (F1) &~ (F2); \
118  } \
119  while (0)
120 
121 #define AARCH64_FEATURE(core,coproc) ((core) | (coproc))
122 
124 {
139 };
140 
141 /* Operand code that helps both parsing and coding.
142  Keep AARCH64_OPERANDS synced. */
143 
145 {
146  AARCH64_OPND_NIL, /* no operand---MUST BE FIRST!*/
147 
148  AARCH64_OPND_Rd, /* Integer register as destination. */
149  AARCH64_OPND_Rn, /* Integer register as source. */
150  AARCH64_OPND_Rm, /* Integer register as source. */
151  AARCH64_OPND_Rt, /* Integer register used in ld/st instructions. */
152  AARCH64_OPND_Rt2, /* Integer register used in ld/st pair instructions. */
153  AARCH64_OPND_Rs, /* Integer register used in ld/st exclusive. */
154  AARCH64_OPND_Ra, /* Integer register used in ddp_3src instructions. */
155  AARCH64_OPND_Rt_SYS, /* Integer register used in system instructions. */
156 
157  AARCH64_OPND_Rd_SP, /* Integer Rd or SP. */
158  AARCH64_OPND_Rn_SP, /* Integer Rn or SP. */
159  AARCH64_OPND_Rm_SP, /* Integer Rm or SP. */
160  AARCH64_OPND_PAIRREG, /* Paired register operand. */
161  AARCH64_OPND_Rm_EXT, /* Integer Rm extended. */
162  AARCH64_OPND_Rm_SFT, /* Integer Rm shifted. */
163 
164  AARCH64_OPND_Fd, /* Floating-point Fd. */
165  AARCH64_OPND_Fn, /* Floating-point Fn. */
166  AARCH64_OPND_Fm, /* Floating-point Fm. */
167  AARCH64_OPND_Fa, /* Floating-point Fa. */
168  AARCH64_OPND_Ft, /* Floating-point Ft. */
169  AARCH64_OPND_Ft2, /* Floating-point Ft2. */
170 
171  AARCH64_OPND_Sd, /* AdvSIMD Scalar Sd. */
172  AARCH64_OPND_Sn, /* AdvSIMD Scalar Sn. */
173  AARCH64_OPND_Sm, /* AdvSIMD Scalar Sm. */
174 
175  AARCH64_OPND_Va, /* AdvSIMD Vector Va. */
176  AARCH64_OPND_Vd, /* AdvSIMD Vector Vd. */
177  AARCH64_OPND_Vn, /* AdvSIMD Vector Vn. */
178  AARCH64_OPND_Vm, /* AdvSIMD Vector Vm. */
179  AARCH64_OPND_VdD1, /* AdvSIMD <Vd>.D[1]; for FMOV only. */
180  AARCH64_OPND_VnD1, /* AdvSIMD <Vn>.D[1]; for FMOV only. */
181  AARCH64_OPND_Ed, /* AdvSIMD Vector Element Vd. */
182  AARCH64_OPND_En, /* AdvSIMD Vector Element Vn. */
183  AARCH64_OPND_Em, /* AdvSIMD Vector Element Vm. */
184  AARCH64_OPND_Em16, /* AdvSIMD Vector Element Vm restricted to V0 - V15 when
185  qualifier is S_H. */
186  AARCH64_OPND_LVn, /* AdvSIMD Vector register list used in e.g. TBL. */
187  AARCH64_OPND_LVt, /* AdvSIMD Vector register list used in ld/st. */
188  AARCH64_OPND_LVt_AL, /* AdvSIMD Vector register list for loading single
189  structure to all lanes. */
190  AARCH64_OPND_LEt, /* AdvSIMD Vector Element list. */
191 
192  AARCH64_OPND_CRn, /* Co-processor register in CRn field. */
193  AARCH64_OPND_CRm, /* Co-processor register in CRm field. */
194 
195  AARCH64_OPND_IDX, /* AdvSIMD EXT index operand. */
196  AARCH64_OPND_MASK, /* AdvSIMD EXT index operand. */
197  AARCH64_OPND_IMM_VLSL,/* Immediate for shifting vector registers left. */
198  AARCH64_OPND_IMM_VLSR,/* Immediate for shifting vector registers right. */
199  AARCH64_OPND_SIMD_IMM,/* AdvSIMD modified immediate without shift. */
200  AARCH64_OPND_SIMD_IMM_SFT, /* AdvSIMD modified immediate with shift. */
201  AARCH64_OPND_SIMD_FPIMM,/* AdvSIMD 8-bit fp immediate. */
202  AARCH64_OPND_SHLL_IMM,/* Immediate shift for AdvSIMD SHLL instruction
203  (no encoding). */
204  AARCH64_OPND_IMM0, /* Immediate for #0. */
205  AARCH64_OPND_FPIMM0, /* Immediate for #0.0. */
206  AARCH64_OPND_FPIMM, /* Floating-point Immediate. */
207  AARCH64_OPND_IMMR, /* Immediate #<immr> in e.g. BFM. */
208  AARCH64_OPND_IMMS, /* Immediate #<imms> in e.g. BFM. */
209  AARCH64_OPND_WIDTH, /* Immediate #<width> in e.g. BFI. */
210  AARCH64_OPND_IMM, /* Immediate. */
211  AARCH64_OPND_IMM_2, /* Immediate. */
212  AARCH64_OPND_UIMM3_OP1,/* Unsigned 3-bit immediate in the op1 field. */
213  AARCH64_OPND_UIMM3_OP2,/* Unsigned 3-bit immediate in the op2 field. */
214  AARCH64_OPND_UIMM4, /* Unsigned 4-bit immediate in the CRm field. */
215  AARCH64_OPND_UIMM7, /* Unsigned 7-bit immediate in the CRm:op2 fields. */
216  AARCH64_OPND_BIT_NUM, /* Immediate. */
217  AARCH64_OPND_EXCEPTION,/* imm16 operand in exception instructions. */
218  AARCH64_OPND_CCMP_IMM,/* Immediate in conditional compare instructions. */
219  AARCH64_OPND_SIMM5, /* 5-bit signed immediate in the imm5 field. */
220  AARCH64_OPND_NZCV, /* Flag bit specifier giving an alternative value for
221  each condition flag. */
222 
223  AARCH64_OPND_LIMM, /* Logical Immediate. */
224  AARCH64_OPND_AIMM, /* Arithmetic immediate. */
225  AARCH64_OPND_HALF, /* #<imm16>{, LSL #<shift>} operand in move wide. */
226  AARCH64_OPND_FBITS, /* FP #<fbits> operand in e.g. SCVTF */
227  AARCH64_OPND_IMM_MOV, /* Immediate operand for the MOV alias. */
228  AARCH64_OPND_IMM_ROT1, /* Immediate rotate operand for FCMLA. */
229  AARCH64_OPND_IMM_ROT2, /* Immediate rotate operand for indexed FCMLA. */
230  AARCH64_OPND_IMM_ROT3, /* Immediate rotate operand for FCADD. */
231 
232  AARCH64_OPND_COND, /* Standard condition as the last operand. */
233  AARCH64_OPND_COND1, /* Same as the above, but excluding AL and NV. */
234 
235  AARCH64_OPND_ADDR_ADRP, /* Memory address for ADRP */
236  AARCH64_OPND_ADDR_PCREL14, /* 14-bit PC-relative address for e.g. TBZ. */
237  AARCH64_OPND_ADDR_PCREL19, /* 19-bit PC-relative address for e.g. LDR. */
238  AARCH64_OPND_ADDR_PCREL21, /* 21-bit PC-relative address for e.g. ADR. */
239  AARCH64_OPND_ADDR_PCREL26, /* 26-bit PC-relative address for e.g. BL. */
240 
241  AARCH64_OPND_ADDR_SIMPLE, /* Address of ld/st exclusive. */
242  AARCH64_OPND_ADDR_REGOFF, /* Address of register offset. */
243  AARCH64_OPND_ADDR_SIMM7, /* Address of signed 7-bit immediate. */
244  AARCH64_OPND_ADDR_SIMM9, /* Address of signed 9-bit immediate. */
245  AARCH64_OPND_ADDR_SIMM9_2, /* Same as the above, but the immediate is
246  negative or unaligned and there is
247  no writeback allowed. This operand code
248  is only used to support the programmer-
249  friendly feature of using LDR/STR as the
250  the mnemonic name for LDUR/STUR instructions
251  wherever there is no ambiguity. */
252  AARCH64_OPND_ADDR_SIMM10, /* Address of signed 10-bit immediate. */
253  AARCH64_OPND_ADDR_UIMM12, /* Address of unsigned 12-bit immediate. */
254  AARCH64_OPND_SIMD_ADDR_SIMPLE,/* Address of ld/st multiple structures. */
255  AARCH64_OPND_ADDR_OFFSET, /* Address with an optional 9-bit immediate. */
256  AARCH64_OPND_SIMD_ADDR_POST, /* Address of ld/st multiple post-indexed. */
257 
258  AARCH64_OPND_SYSREG, /* System register operand. */
259  AARCH64_OPND_PSTATEFIELD, /* PSTATE field name operand. */
260  AARCH64_OPND_SYSREG_AT, /* System register <at_op> operand. */
261  AARCH64_OPND_SYSREG_DC, /* System register <dc_op> operand. */
262  AARCH64_OPND_SYSREG_IC, /* System register <ic_op> operand. */
263  AARCH64_OPND_SYSREG_TLBI, /* System register <tlbi_op> operand. */
264  AARCH64_OPND_BARRIER, /* Barrier operand. */
265  AARCH64_OPND_BARRIER_ISB, /* Barrier operand for ISB. */
266  AARCH64_OPND_PRFOP, /* Prefetch operation. */
267  AARCH64_OPND_BARRIER_PSB, /* Barrier operand for PSB. */
268 
269  AARCH64_OPND_SVE_ADDR_RI_S4x16, /* SVE [<Xn|SP>, #<simm4>*16]. */
270  AARCH64_OPND_SVE_ADDR_RI_S4xVL, /* SVE [<Xn|SP>, #<simm4>, MUL VL]. */
271  AARCH64_OPND_SVE_ADDR_RI_S4x2xVL, /* SVE [<Xn|SP>, #<simm4>*2, MUL VL]. */
272  AARCH64_OPND_SVE_ADDR_RI_S4x3xVL, /* SVE [<Xn|SP>, #<simm4>*3, MUL VL]. */
273  AARCH64_OPND_SVE_ADDR_RI_S4x4xVL, /* SVE [<Xn|SP>, #<simm4>*4, MUL VL]. */
274  AARCH64_OPND_SVE_ADDR_RI_S6xVL, /* SVE [<Xn|SP>, #<simm6>, MUL VL]. */
275  AARCH64_OPND_SVE_ADDR_RI_S9xVL, /* SVE [<Xn|SP>, #<simm9>, MUL VL]. */
276  AARCH64_OPND_SVE_ADDR_RI_U6, /* SVE [<Xn|SP>, #<uimm6>]. */
277  AARCH64_OPND_SVE_ADDR_RI_U6x2, /* SVE [<Xn|SP>, #<uimm6>*2]. */
278  AARCH64_OPND_SVE_ADDR_RI_U6x4, /* SVE [<Xn|SP>, #<uimm6>*4]. */
279  AARCH64_OPND_SVE_ADDR_RI_U6x8, /* SVE [<Xn|SP>, #<uimm6>*8]. */
280  AARCH64_OPND_SVE_ADDR_R, /* SVE [<Xn|SP>]. */
281  AARCH64_OPND_SVE_ADDR_RR, /* SVE [<Xn|SP>, <Xm|XZR>]. */
282  AARCH64_OPND_SVE_ADDR_RR_LSL1, /* SVE [<Xn|SP>, <Xm|XZR>, LSL #1]. */
283  AARCH64_OPND_SVE_ADDR_RR_LSL2, /* SVE [<Xn|SP>, <Xm|XZR>, LSL #2]. */
284  AARCH64_OPND_SVE_ADDR_RR_LSL3, /* SVE [<Xn|SP>, <Xm|XZR>, LSL #3]. */
285  AARCH64_OPND_SVE_ADDR_RX, /* SVE [<Xn|SP>, <Xm>]. */
286  AARCH64_OPND_SVE_ADDR_RX_LSL1, /* SVE [<Xn|SP>, <Xm>, LSL #1]. */
287  AARCH64_OPND_SVE_ADDR_RX_LSL2, /* SVE [<Xn|SP>, <Xm>, LSL #2]. */
288  AARCH64_OPND_SVE_ADDR_RX_LSL3, /* SVE [<Xn|SP>, <Xm>, LSL #3]. */
289  AARCH64_OPND_SVE_ADDR_RZ, /* SVE [<Xn|SP>, Zm.D]. */
290  AARCH64_OPND_SVE_ADDR_RZ_LSL1, /* SVE [<Xn|SP>, Zm.D, LSL #1]. */
291  AARCH64_OPND_SVE_ADDR_RZ_LSL2, /* SVE [<Xn|SP>, Zm.D, LSL #2]. */
292  AARCH64_OPND_SVE_ADDR_RZ_LSL3, /* SVE [<Xn|SP>, Zm.D, LSL #3]. */
293  AARCH64_OPND_SVE_ADDR_RZ_XTW_14, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW].
294  Bit 14 controls S/U choice. */
295  AARCH64_OPND_SVE_ADDR_RZ_XTW_22, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW].
296  Bit 22 controls S/U choice. */
297  AARCH64_OPND_SVE_ADDR_RZ_XTW1_14, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW #1].
298  Bit 14 controls S/U choice. */
299  AARCH64_OPND_SVE_ADDR_RZ_XTW1_22, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW #1].
300  Bit 22 controls S/U choice. */
301  AARCH64_OPND_SVE_ADDR_RZ_XTW2_14, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW #2].
302  Bit 14 controls S/U choice. */
303  AARCH64_OPND_SVE_ADDR_RZ_XTW2_22, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW #2].
304  Bit 22 controls S/U choice. */
305  AARCH64_OPND_SVE_ADDR_RZ_XTW3_14, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW #3].
306  Bit 14 controls S/U choice. */
307  AARCH64_OPND_SVE_ADDR_RZ_XTW3_22, /* SVE [<Xn|SP>, Zm.<T>, (S|U)XTW #3].
308  Bit 22 controls S/U choice. */
309  AARCH64_OPND_SVE_ADDR_ZI_U5, /* SVE [Zn.<T>, #<uimm5>]. */
310  AARCH64_OPND_SVE_ADDR_ZI_U5x2, /* SVE [Zn.<T>, #<uimm5>*2]. */
311  AARCH64_OPND_SVE_ADDR_ZI_U5x4, /* SVE [Zn.<T>, #<uimm5>*4]. */
312  AARCH64_OPND_SVE_ADDR_ZI_U5x8, /* SVE [Zn.<T>, #<uimm5>*8]. */
313  AARCH64_OPND_SVE_ADDR_ZZ_LSL, /* SVE [Zn.<T>, Zm,<T>, LSL #<msz>]. */
314  AARCH64_OPND_SVE_ADDR_ZZ_SXTW, /* SVE [Zn.<T>, Zm,<T>, SXTW #<msz>]. */
315  AARCH64_OPND_SVE_ADDR_ZZ_UXTW, /* SVE [Zn.<T>, Zm,<T>, UXTW #<msz>]. */
316  AARCH64_OPND_SVE_AIMM, /* SVE unsigned arithmetic immediate. */
317  AARCH64_OPND_SVE_ASIMM, /* SVE signed arithmetic immediate. */
318  AARCH64_OPND_SVE_FPIMM8, /* SVE 8-bit floating-point immediate. */
319  AARCH64_OPND_SVE_I1_HALF_ONE, /* SVE choice between 0.5 and 1.0. */
320  AARCH64_OPND_SVE_I1_HALF_TWO, /* SVE choice between 0.5 and 2.0. */
321  AARCH64_OPND_SVE_I1_ZERO_ONE, /* SVE choice between 0.0 and 1.0. */
322  AARCH64_OPND_SVE_IMM_ROT1, /* SVE 1-bit rotate operand (90 or 270). */
323  AARCH64_OPND_SVE_IMM_ROT2, /* SVE 2-bit rotate operand (N*90). */
324  AARCH64_OPND_SVE_INV_LIMM, /* SVE inverted logical immediate. */
325  AARCH64_OPND_SVE_LIMM, /* SVE logical immediate. */
326  AARCH64_OPND_SVE_LIMM_MOV, /* SVE logical immediate for MOV. */
327  AARCH64_OPND_SVE_PATTERN, /* SVE vector pattern enumeration. */
328  AARCH64_OPND_SVE_PATTERN_SCALED, /* Likewise, with additional MUL factor. */
329  AARCH64_OPND_SVE_PRFOP, /* SVE prefetch operation. */
330  AARCH64_OPND_SVE_Pd, /* SVE p0-p15 in Pd. */
331  AARCH64_OPND_SVE_Pg3, /* SVE p0-p7 in Pg. */
332  AARCH64_OPND_SVE_Pg4_5, /* SVE p0-p15 in Pg, bits [8,5]. */
333  AARCH64_OPND_SVE_Pg4_10, /* SVE p0-p15 in Pg, bits [13,10]. */
334  AARCH64_OPND_SVE_Pg4_16, /* SVE p0-p15 in Pg, bits [19,16]. */
335  AARCH64_OPND_SVE_Pm, /* SVE p0-p15 in Pm. */
336  AARCH64_OPND_SVE_Pn, /* SVE p0-p15 in Pn. */
337  AARCH64_OPND_SVE_Pt, /* SVE p0-p15 in Pt. */
338  AARCH64_OPND_SVE_Rm, /* Integer Rm or ZR, alt. SVE position. */
339  AARCH64_OPND_SVE_Rn_SP, /* Integer Rn or SP, alt. SVE position. */
340  AARCH64_OPND_SVE_SHLIMM_PRED, /* SVE shift left amount (predicated). */
341  AARCH64_OPND_SVE_SHLIMM_UNPRED, /* SVE shift left amount (unpredicated). */
342  AARCH64_OPND_SVE_SHRIMM_PRED, /* SVE shift right amount (predicated). */
343  AARCH64_OPND_SVE_SHRIMM_UNPRED, /* SVE shift right amount (unpredicated). */
344  AARCH64_OPND_SVE_SIMM5, /* SVE signed 5-bit immediate. */
345  AARCH64_OPND_SVE_SIMM5B, /* SVE secondary signed 5-bit immediate. */
346  AARCH64_OPND_SVE_SIMM6, /* SVE signed 6-bit immediate. */
347  AARCH64_OPND_SVE_SIMM8, /* SVE signed 8-bit immediate. */
348  AARCH64_OPND_SVE_UIMM3, /* SVE unsigned 3-bit immediate. */
349  AARCH64_OPND_SVE_UIMM7, /* SVE unsigned 7-bit immediate. */
350  AARCH64_OPND_SVE_UIMM8, /* SVE unsigned 8-bit immediate. */
351  AARCH64_OPND_SVE_UIMM8_53, /* SVE split unsigned 8-bit immediate. */
352  AARCH64_OPND_SVE_VZn, /* Scalar SIMD&FP register in Zn field. */
353  AARCH64_OPND_SVE_Vd, /* Scalar SIMD&FP register in Vd. */
354  AARCH64_OPND_SVE_Vm, /* Scalar SIMD&FP register in Vm. */
355  AARCH64_OPND_SVE_Vn, /* Scalar SIMD&FP register in Vn. */
356  AARCH64_OPND_SVE_Za_5, /* SVE vector register in Za, bits [9,5]. */
357  AARCH64_OPND_SVE_Za_16, /* SVE vector register in Za, bits [20,16]. */
358  AARCH64_OPND_SVE_Zd, /* SVE vector register in Zd. */
359  AARCH64_OPND_SVE_Zm_5, /* SVE vector register in Zm, bits [9,5]. */
360  AARCH64_OPND_SVE_Zm_16, /* SVE vector register in Zm, bits [20,16]. */
361  AARCH64_OPND_SVE_Zm3_INDEX, /* z0-z7[0-3] in Zm, bits [20,16]. */
362  AARCH64_OPND_SVE_Zm3_22_INDEX, /* z0-z7[0-7] in Zm3_INDEX plus bit 22. */
363  AARCH64_OPND_SVE_Zm4_INDEX, /* z0-z15[0-1] in Zm, bits [20,16]. */
364  AARCH64_OPND_SVE_Zn, /* SVE vector register in Zn. */
365  AARCH64_OPND_SVE_Zn_INDEX, /* Indexed SVE vector register, for DUP. */
366  AARCH64_OPND_SVE_ZnxN, /* SVE vector register list in Zn. */
367  AARCH64_OPND_SVE_Zt, /* SVE vector register in Zt. */
368  AARCH64_OPND_SVE_ZtxN, /* SVE vector register list in Zt. */
369  AARCH64_OPND_SM3_IMM2, /* SM3 encodes lane in bits [13, 14]. */
370 };
371 
372 /* Qualifier constrains an operand. It either specifies a variant of an
373  operand type or limits values available to an operand type.
374 
375  N.B. Order is important; keep aarch64_opnd_qualifiers synced. */
376 
378 {
379  /* Indicating no further qualification on an operand. */
381 
382  /* Qualifying an operand which is a general purpose (integer) register;
383  indicating the operand data size or a specific register. */
384  AARCH64_OPND_QLF_W, /* Wn, WZR or WSP. */
385  AARCH64_OPND_QLF_X, /* Xn, XZR or XSP. */
388 
389  /* Qualifying an operand which is a floating-point register, a SIMD
390  vector element or a SIMD vector element list; indicating operand data
391  size or the size of each SIMD vector element in the case of a SIMD
392  vector element list.
393  These qualifiers are also used to qualify an address operand to
394  indicate the size of data element a load/store instruction is
395  accessing.
396  They are also used for the immediate shift operand in e.g. SSHR. Such
397  a use is only for the ease of operand encoding/decoding and qualifier
398  sequence matching; such a use should not be applied widely; use the value
399  constraint qualifiers for immediate operands wherever possible. */
405  /* This type qualifier has a special meaning in that it means that 4 x 1 byte
406  are selected by the instruction. Other than that it has no difference
407  with AARCH64_OPND_QLF_S_B in encoding. It is here purely for syntactical
408  reasons and is an exception from normal AArch64 disassembly scheme. */
410 
411  /* Qualifying an operand which is a SIMD vector register or a SIMD vector
412  register list; indicating register shape.
413  They are also used for the immediate shift operand in e.g. SSHR. Such
414  a use is only for the ease of operand encoding/decoding and qualifier
415  sequence matching; such a use should not be applied widely; use the value
416  constraint qualifiers for immediate operands wherever possible. */
428 
431 
432  /* Constraint on value. */
433  AARCH64_OPND_QLF_CR, /* CRn, CRm. */
440 
441  /* Indicate whether an AdvSIMD modified immediate operand is shift-zeros
442  or shift-ones. */
445 
446  /* Special qualifier helping retrieve qualifier information during the
447  decoding time (currently not in use). */
449 };
450 ␌
451 /* Instruction class. */
452 
454 {
508  ldst_imm9, /* immpost or immpre */
509  ldst_imm10, /* LDRAA/LDRAB */
541 };
542 
543 /* Opcode enumerators. */
544 
546 {
560 
573 
578 
582 
586 
587  OP_MOV_IMM_LOG, /* MOV alias for moving bitmask immediate. */
588  OP_MOV_IMM_WIDE, /* MOV alias for moving wide immediate. */
589  OP_MOV_IMM_WIDEN, /* MOV alias for moving wide immediate (negated). */
590 
591  OP_MOV_V, /* MOV alias for moving vector register. */
592 
596 
598 
604  OP_BFC, /* ARMv8.2. */
609 
615 
621  OP_FCVTXN_S, /* Scalar version. */
622 
624 
629 
641 
642  OP_FCMLA_ELEM, /* ARMv8.3, indexed element version. */
643 
644  OP_TOTAL_NUM, /* Pseudo. */
645 };
646 
647 /* Maximum number of operands an instruction can have. */
648 #define AARCH64_MAX_OPND_NUM 6
649 /* Maximum number of qualifier sequences an instruction can have. */
650 #define AARCH64_MAX_QLF_SEQ_NUM 10
651 /* Operand qualifier typedef; optimized for the size. */
652 typedef unsigned char aarch64_opnd_qualifier_t;
653 /* Operand qualifier sequence typedef. */
654 typedef aarch64_opnd_qualifier_t \
655  aarch64_opnd_qualifier_seq_t [AARCH64_MAX_OPND_NUM];
656 
657 /* FIXME: improve the efficiency. */
658 static inline bfd_boolean
660 {
661  int i;
662  for (i = 0; i < AARCH64_MAX_OPND_NUM; ++i)
663  if (qualifiers[i] != AARCH64_OPND_QLF_NIL)
664  return FALSE;
665  return TRUE;
666 }
667 
668 /* This structure holds information for a particular opcode. */
669 
671 {
672  /* The name of the mnemonic. */
673  const char *name;
674 
675  /* The opcode itself. Those bits which will be filled in with
676  operands are zeroes. */
678 
679  /* The opcode mask. This is used by the disassembler. This is a
680  mask containing ones indicating those bits which must match the
681  opcode field, and zeroes indicating those bits which need not
682  match (and are presumably filled in by operands). */
684 
685  /* Instruction class. */
687 
688  /* Enumerator identifier. */
689  enum aarch64_op op;
690 
691  /* Which architecture variant provides this instruction. */
693 
694  /* An array of operand codes. Each code is an index into the
695  operand table. They appear in the order which the operands must
696  appear in assembly code, and are terminated by a zero. */
698 
699  /* A list of operand qualifier code sequence. Each operand qualifier
700  code qualifies the corresponding operand code. Each operand
701  qualifier sequence specifies a valid opcode variant and related
702  constraint on operands. */
704 
705  /* Flags providing information about this instruction */
707 
708  /* If nonzero, this operand and operand 0 are both registers and
709  are required to have the same register number. */
710  unsigned char tied_operand;
711 
712  /* If non-NULL, a function to verify that a given instruction is valid. */
713  bfd_boolean (* verifier) (const struct aarch64_opcode *, const aarch64_insn);
714 };
715 
716 typedef struct aarch64_opcode aarch64_opcode;
717 
718 /* Table describing all the AArch64 opcodes. */
720 
721 /* Opcode flags. */
722 #define F_ALIAS (1 << 0)
723 #define F_HAS_ALIAS (1 << 1)
724 /* Disassembly preference priority 1-3 (the larger the higher). If nothing
725  is specified, it is the priority 0 by default, i.e. the lowest priority. */
726 #define F_P1 (1 << 2)
727 #define F_P2 (2 << 2)
728 #define F_P3 (3 << 2)
729 /* Flag an instruction that is truly conditional executed, e.g. b.cond. */
730 #define F_COND (1 << 4)
731 /* Instruction has the field of 'sf'. */
732 #define F_SF (1 << 5)
733 /* Instruction has the field of 'size:Q'. */
734 #define F_SIZEQ (1 << 6)
735 /* Floating-point instruction has the field of 'type'. */
736 #define F_FPTYPE (1 << 7)
737 /* AdvSIMD scalar instruction has the field of 'size'. */
738 #define F_SSIZE (1 << 8)
739 /* AdvSIMD vector register arrangement specifier encoded in "imm5<3:0>:Q". */
740 #define F_T (1 << 9)
741 /* Size of GPR operand in AdvSIMD instructions encoded in Q. */
742 #define F_GPRSIZE_IN_Q (1 << 10)
743 /* Size of Rt load signed instruction encoded in opc[0], i.e. bit 22. */
744 #define F_LDS_SIZE (1 << 11)
745 /* Optional operand; assume maximum of 1 operand can be optional. */
746 #define F_OPD0_OPT (1 << 12)
747 #define F_OPD1_OPT (2 << 12)
748 #define F_OPD2_OPT (3 << 12)
749 #define F_OPD3_OPT (4 << 12)
750 #define F_OPD4_OPT (5 << 12)
751 /* Default value for the optional operand when omitted from the assembly. */
752 #define F_DEFAULT(X) (((X) & 0x1f) << 15)
753 /* Instruction that is an alias of another instruction needs to be
754  encoded/decoded by converting it to/from the real form, followed by
755  the encoding/decoding according to the rules of the real opcode.
756  This compares to the direct coding using the alias's information.
757  N.B. this flag requires F_ALIAS to be used together. */
758 #define F_CONV (1 << 20)
759 /* Use together with F_ALIAS to indicate an alias opcode is a programmer
760  friendly pseudo instruction available only in the assembly code (thus will
761  not show up in the disassembly). */
762 #define F_PSEUDO (1 << 21)
763 /* Instruction has miscellaneous encoding/decoding rules. */
764 #define F_MISC (1 << 22)
765 /* Instruction has the field of 'N'; used in conjunction with F_SF. */
766 #define F_N (1 << 23)
767 /* Opcode dependent field. */
768 #define F_OD(X) (((X) & 0x7) << 24)
769 /* Instruction has the field of 'sz'. */
770 #define F_LSE_SZ (1 << 27)
771 /* Require an exact qualifier match, even for NIL qualifiers. */
772 #define F_STRICT (1ULL << 28)
773 /* This system instruction is used to read system registers. */
774 #define F_SYS_READ (1ULL << 29)
775 /* This system instruction is used to write system registers. */
776 #define F_SYS_WRITE (1ULL << 30)
777 /* Next bit is 31. */
778 
779 static inline bfd_boolean
781 {
782  return (opcode->flags & F_ALIAS) ? TRUE : FALSE;
783 }
784 
785 static inline bfd_boolean
787 {
788  return (opcode->flags & F_HAS_ALIAS) ? TRUE : FALSE;
789 }
790 
791 /* Priority for disassembling preference. */
792 static inline int
794 {
795  return (opcode->flags >> 2) & 0x3;
796 }
797 
798 static inline bfd_boolean
800 {
801  return (opcode->flags & F_PSEUDO) != 0lu ? TRUE : FALSE;
802 }
803 
804 static inline bfd_boolean
806 {
807  return (((opcode->flags >> 12) & 0x7) == idx + 1)
808  ? TRUE : FALSE;
809 }
810 
811 static inline aarch64_insn
813 {
814  return (opcode->flags >> 15) & 0x1f;
815 }
816 
817 static inline unsigned int
819 {
820  return (opcode->flags >> 24) & 0x7;
821 }
822 
823 static inline bfd_boolean
825 {
826  return (opcode->flags & (F_SF | F_LSE_SZ | F_SIZEQ | F_FPTYPE | F_SSIZE | F_T
828  : FALSE;
829 }
830 ␌
832 {
833  const char * name;
835 };
836 
838 extern const struct aarch64_name_value_pair aarch64_barrier_options [16];
839 extern const struct aarch64_name_value_pair aarch64_prfops [32];
840 extern const struct aarch64_name_value_pair aarch64_hint_options [];
841 
842 typedef struct
843 {
844  const char * name;
848 
849 extern const aarch64_sys_reg aarch64_sys_regs [];
850 extern const aarch64_sys_reg aarch64_pstatefields [];
853  const aarch64_sys_reg *);
855  const aarch64_sys_reg *);
856 
857 typedef struct
858 {
859  const char *name;
863 
865 extern bfd_boolean
867  const aarch64_sys_ins_reg *);
868 
873 
874 /* Shift/extending operator kinds.
875  N.B. order is important; keep aarch64_operand_modifiers synced. */
877 {
894 };
895 
898 
901 /* Condition. */
902 
903 typedef struct
904 {
905  /* A list of names with the first one as the disassembly preference;
906  terminated by NULL if fewer than 3. */
907  const char *names[4];
909 } aarch64_cond;
910 
911 extern const aarch64_cond aarch64_conds[16];
912 
915 ␌
916 /* Structure representing an operand. */
917 
919 {
920  enum aarch64_opnd type;
922  int idx;
923 
924  union
925  {
926  struct
927  {
928  unsigned regno;
929  } reg;
930  struct
931  {
932  unsigned int regno;
935  /* e.g. LVn. */
936  struct
937  {
938  unsigned first_regno : 5;
939  unsigned num_regs : 3;
940  /* 1 if it is a list of reg element. */
941  unsigned has_index : 1;
942  /* Lane index; valid only when has_index is 1. */
943  int64_t index;
945  /* e.g. immediate or pc relative address offset. */
946  struct
947  {
949  unsigned is_fp : 1;
950  } imm;
951  /* e.g. address in STR (register offset). */
952  struct
953  {
954  unsigned base_regno;
955  struct
956  {
957  union
958  {
959  int imm;
960  unsigned regno;
961  };
962  unsigned is_reg;
964  unsigned pcrel : 1; /* PC-relative. */
965  unsigned writeback : 1;
966  unsigned preind : 1; /* Pre-indexed. */
967  unsigned postind : 1; /* Post-indexed. */
968  } addr;
969 
970  struct
971  {
972  /* The encoding of the system register. */
974 
975  /* The system register flags. */
978 
980  /* The encoding of the PSTATE field. */
986  };
987 
988  /* Operand shifter; in use when the operand is a register offset address,
989  add/sub extended reg, etc. e.g. <R><m>{, <extend> {#<amount>}}. */
990  struct
991  {
993  unsigned operator_present: 1; /* Only valid during encoding. */
994  /* Value of the 'S' field in ld/st reg offset; used only in decoding. */
995  unsigned amount_present: 1;
998 
999  unsigned skip:1; /* Operand is not completed if there is a fixup needed
1000  to be done on it. In some (but not all) of these
1001  cases, we need to tell libopcodes to skip the
1002  constraint checking and the encoding for this
1003  operand, so that the libopcodes can pick up the
1004  right opcode before the operand is fixed-up. This
1005  flag should only be used during the
1006  assembling/encoding. */
1007  unsigned present:1; /* Whether this operand is present in the assembly
1008  line; not used during the disassembly. */
1009 };
1010 
1011 typedef struct aarch64_opnd_info aarch64_opnd_info;
1012 
1013 /* Structure representing an instruction.
1014 
1015  It is used during both the assembling and disassembling. The assembler
1016  fills an aarch64_inst after a successful parsing and then passes it to the
1017  encoding routine to do the encoding. During the disassembling, the
1018  disassembler calls the decoding routine to decode a binary instruction; on a
1019  successful return, such a structure will be filled with information of the
1020  instruction; then the disassembler uses the information to print out the
1021  instruction. */
1022 
1024 {
1025  /* The value of the binary instruction. */
1027 
1028  /* Corresponding opcode entry. */
1030 
1031  /* Condition for a truly conditional-executed instrutions, e.g. b.cond. */
1033 
1034  /* Operands information. */
1036 };
1037 
1038 typedef struct aarch64_inst aarch64_inst;
1039 ␌
1040 /* Diagnosis related declaration and interface. */
1041 
1042 /* Operand error kind enumerators.
1043 
1044  AARCH64_OPDE_RECOVERABLE
1045  Less severe error found during the parsing, very possibly because that
1046  GAS has picked up a wrong instruction template for the parsing.
1047 
1048  AARCH64_OPDE_SYNTAX_ERROR
1049  General syntax error; it can be either a user error, or simply because
1050  that GAS is trying a wrong instruction template.
1051 
1052  AARCH64_OPDE_FATAL_SYNTAX_ERROR
1053  Definitely a user syntax error.
1054 
1055  AARCH64_OPDE_INVALID_VARIANT
1056  No syntax error, but the operands are not a valid combination, e.g.
1057  FMOV D0,S0
1058 
1059  AARCH64_OPDE_UNTIED_OPERAND
1060  The asm failed to use the same register for a destination operand
1061  and a tied source operand.
1062 
1063  AARCH64_OPDE_OUT_OF_RANGE
1064  Error about some immediate value out of a valid range.
1065 
1066  AARCH64_OPDE_UNALIGNED
1067  Error about some immediate value not properly aligned (i.e. not being a
1068  multiple times of a certain value).
1069 
1070  AARCH64_OPDE_REG_LIST
1071  Error about the register list operand having unexpected number of
1072  registers.
1073 
1074  AARCH64_OPDE_OTHER_ERROR
1075  Error of the highest severity and used for any severe issue that does not
1076  fall into any of the above categories.
1077 
1078  The enumerators are only interesting to GAS. They are declared here (in
1079  libopcodes) because that some errors are detected (and then notified to GAS)
1080  by libopcodes (rather than by GAS solely).
1081 
1082  The first three errors are only deteced by GAS while the
1083  AARCH64_OPDE_INVALID_VARIANT error can only be spotted by libopcodes as
1084  only libopcodes has the information about the valid variants of each
1085  instruction.
1086 
1087  The enumerators have an increasing severity. This is helpful when there are
1088  multiple instruction templates available for a given mnemonic name (e.g.
1089  FMOV); this mechanism will help choose the most suitable template from which
1090  the generated diagnostics can most closely describe the issues, if any. */
1091 
1093 {
1104 };
1105 
1106 /* N.B. GAS assumes that this structure work well with shallow copy. */
1108 {
1110  int index;
1111  const char *error;
1112  int data[3]; /* Some data for extra information. */
1114 };
1115 
1117 
1118 /* Encoding entrypoint. */
1119 
1120 extern int
1124 
1125 extern const aarch64_opcode *
1127  const aarch64_opcode *);
1128 
1129 /* Given the opcode enumerator OP, return the pointer to the corresponding
1130  opcode entry. */
1131 
1132 extern const aarch64_opcode *
1134 
1135 /* Generate the string representation of an operand. */
1136 extern void
1138  const aarch64_opnd_info *, int, int *, bfd_vma *,
1139  char **);
1140 
1141 /* Miscellaneous interface. */
1142 
1143 extern int
1144 aarch64_operand_index (const enum aarch64_opnd *, enum aarch64_opnd);
1145 
1148  const aarch64_opnd_qualifier_t, int);
1149 
1150 extern int
1152 
1153 extern int
1155 
1156 extern int
1158 
1159 extern int
1161  aarch64_operand_error *errors);
1162 
1163 /* Given an operand qualifier, return the expected data element size
1164  of a qualified operand. */
1165 extern unsigned char
1167 
1168 extern enum aarch64_operand_class
1170 
1171 extern const char *
1173 
1174 extern const char *
1176 
1177 extern bfd_boolean
1179 
1180 #ifdef DEBUG_AARCH64
1181 extern int debug_dump;
1182 
1183 extern void
1184 aarch64_verbose (const char *, ...) __attribute__ ((format (printf, 1, 2)));
1185 
1186 #define DEBUG_TRACE(M, ...) \
1187  { \
1188  if (debug_dump) \
1189  aarch64_verbose ("%s: " M ".", __func__, ##__VA_ARGS__); \
1190  }
1191 
1192 #define DEBUG_TRACE_IF(C, M, ...) \
1193  { \
1194  if (debug_dump && (C)) \
1195  aarch64_verbose ("%s: " M ".", __func__, ##__VA_ARGS__); \
1196  }
1197 #else /* !DEBUG_AARCH64 */
1198 #define DEBUG_TRACE(M, ...) ;
1199 #define DEBUG_TRACE_IF(C, M, ...) ;
1200 #endif /* DEBUG_AARCH64 */
1201 
1202 extern const char *const aarch64_sve_pattern_array[32];
1203 extern const char *const aarch64_sve_prfop_array[16];
1204 
1205 #ifdef __cplusplus
1206 }
1207 #endif
1208 
1209 #endif /* OPCODE_AARCH64_H */
bfd_boolean aarch64_sys_ins_reg_has_xt(const aarch64_sys_ins_reg *)
Definition: aarch64-opc.c:4445
unsigned char aarch64_opnd_qualifier_t
Definition: aarch64.h:652
static bfd_boolean pseudo_opcode_p(const aarch64_opcode *opcode)
Definition: aarch64.h:799
#define F_ALIAS
Definition: aarch64.h:722
aarch64_modifier_kind
Definition: aarch64.h:877
@ AARCH64_MOD_LSR
Definition: aarch64.h:882
@ AARCH64_MOD_NONE
Definition: aarch64.h:878
@ AARCH64_MOD_SXTH
Definition: aarch64.h:889
@ AARCH64_MOD_SXTB
Definition: aarch64.h:888
@ AARCH64_MOD_UXTH
Definition: aarch64.h:885
@ AARCH64_MOD_SXTW
Definition: aarch64.h:890
@ AARCH64_MOD_ASR
Definition: aarch64.h:881
@ AARCH64_MOD_ROR
Definition: aarch64.h:880
@ AARCH64_MOD_SXTX
Definition: aarch64.h:891
@ AARCH64_MOD_UXTW
Definition: aarch64.h:886
@ AARCH64_MOD_LSL
Definition: aarch64.h:883
@ AARCH64_MOD_UXTX
Definition: aarch64.h:887
@ AARCH64_MOD_MUL
Definition: aarch64.h:892
@ AARCH64_MOD_MSL
Definition: aarch64.h:879
@ AARCH64_MOD_UXTB
Definition: aarch64.h:884
@ AARCH64_MOD_MUL_VL
Definition: aarch64.h:893
aarch64_opnd_qualifier
Definition: aarch64.h:378
@ AARCH64_OPND_QLF_RETRIEVE
Definition: aarch64.h:448
@ AARCH64_OPND_QLF_imm_0_7
Definition: aarch64.h:434
@ AARCH64_OPND_QLF_W
Definition: aarch64.h:384
@ AARCH64_OPND_QLF_V_4S
Definition: aarch64.h:424
@ AARCH64_OPND_QLF_V_1D
Definition: aarch64.h:425
@ AARCH64_OPND_QLF_imm_1_64
Definition: aarch64.h:439
@ AARCH64_OPND_QLF_SP
Definition: aarch64.h:387
@ AARCH64_OPND_QLF_S_D
Definition: aarch64.h:403
@ AARCH64_OPND_QLF_S_Q
Definition: aarch64.h:404
@ AARCH64_OPND_QLF_V_8H
Definition: aarch64.h:422
@ AARCH64_OPND_QLF_S_B
Definition: aarch64.h:400
@ AARCH64_OPND_QLF_P_M
Definition: aarch64.h:430
@ AARCH64_OPND_QLF_CR
Definition: aarch64.h:433
@ AARCH64_OPND_QLF_V_2S
Definition: aarch64.h:423
@ AARCH64_OPND_QLF_V_4H
Definition: aarch64.h:421
@ AARCH64_OPND_QLF_V_2D
Definition: aarch64.h:426
@ AARCH64_OPND_QLF_imm_1_32
Definition: aarch64.h:438
@ AARCH64_OPND_QLF_V_16B
Definition: aarch64.h:419
@ AARCH64_OPND_QLF_imm_0_31
Definition: aarch64.h:436
@ AARCH64_OPND_QLF_LSL
Definition: aarch64.h:443
@ AARCH64_OPND_QLF_V_8B
Definition: aarch64.h:418
@ AARCH64_OPND_QLF_S_S
Definition: aarch64.h:402
@ AARCH64_OPND_QLF_V_2H
Definition: aarch64.h:420
@ AARCH64_OPND_QLF_imm_0_15
Definition: aarch64.h:435
@ AARCH64_OPND_QLF_V_1Q
Definition: aarch64.h:427
@ AARCH64_OPND_QLF_WSP
Definition: aarch64.h:386
@ AARCH64_OPND_QLF_S_H
Definition: aarch64.h:401
@ AARCH64_OPND_QLF_X
Definition: aarch64.h:385
@ AARCH64_OPND_QLF_P_Z
Definition: aarch64.h:429
@ AARCH64_OPND_QLF_imm_0_63
Definition: aarch64.h:437
@ AARCH64_OPND_QLF_NIL
Definition: aarch64.h:380
@ AARCH64_OPND_QLF_V_4B
Definition: aarch64.h:417
@ AARCH64_OPND_QLF_S_4B
Definition: aarch64.h:409
@ AARCH64_OPND_QLF_MSL
Definition: aarch64.h:444
bfd_boolean aarch64_sys_ins_reg_supported_p(const aarch64_feature_set, const aarch64_sys_ins_reg *)
Definition: aarch64-opc.c:4451
aarch64_opnd_qualifier_t aarch64_get_expected_qualifier(const aarch64_opnd_qualifier_seq_t *, int, const aarch64_opnd_qualifier_t, int)
Definition: aarch64-opc.c:621
const aarch64_sys_ins_reg aarch64_sys_regs_ic[]
Definition: aarch64-opc.c:4317
#define AARCH64_MAX_QLF_SEQ_NUM
Definition: aarch64.h:650
enum aarch64_operand_class aarch64_get_operand_class(enum aarch64_opnd)
Definition: aarch64-opc.c:328
const aarch64_sys_ins_reg aarch64_sys_regs_at[]
Definition: aarch64-opc.c:4339
static bfd_boolean optional_operand_p(const aarch64_opcode *opcode, unsigned int idx)
Definition: aarch64.h:805
const aarch64_cond aarch64_conds[16]
Definition: aarch64-opc.c:348
void aarch64_print_operand(char *, size_t, bfd_vma, const aarch64_opcode *, const aarch64_opnd_info *, int, int *, bfd_vma *, char **)
const char * aarch64_get_operand_desc(enum aarch64_opnd)
Definition: aarch64-opc.c:342
#define F_HAS_ALIAS
Definition: aarch64.h:723
const aarch64_sys_reg aarch64_sys_regs[]
Definition: aarch64-opc.c:3673
aarch64_operand_class
Definition: aarch64.h:124
@ AARCH64_OPND_CLASS_MODIFIED_REG
Definition: aarch64.h:127
@ AARCH64_OPND_CLASS_NIL
Definition: aarch64.h:125
@ AARCH64_OPND_CLASS_SYSTEM
Definition: aarch64.h:137
@ AARCH64_OPND_CLASS_INT_REG
Definition: aarch64.h:126
@ AARCH64_OPND_CLASS_IMMEDIATE
Definition: aarch64.h:136
@ AARCH64_OPND_CLASS_SVE_REG
Definition: aarch64.h:133
@ AARCH64_OPND_CLASS_ADDRESS
Definition: aarch64.h:135
@ AARCH64_OPND_CLASS_COND
Definition: aarch64.h:138
@ AARCH64_OPND_CLASS_SIMD_REGLIST
Definition: aarch64.h:132
@ AARCH64_OPND_CLASS_SIMD_REG
Definition: aarch64.h:129
@ AARCH64_OPND_CLASS_FP_REG
Definition: aarch64.h:128
@ AARCH64_OPND_CLASS_SISD_REG
Definition: aarch64.h:131
@ AARCH64_OPND_CLASS_PRED_REG
Definition: aarch64.h:134
@ AARCH64_OPND_CLASS_SIMD_ELEMENT
Definition: aarch64.h:130
const struct aarch64_name_value_pair aarch64_prfops[32]
Definition: aarch64-opc.c:480
static unsigned int get_opcode_dependent_value(const aarch64_opcode *opcode)
Definition: aarch64.h:818
const char *const aarch64_sve_pattern_array[32]
Definition: aarch64-opc.c:43
#define F_SF
Definition: aarch64.h:732
#define F_SIZEQ
Definition: aarch64.h:734
#define F_T
Definition: aarch64.h:740
bfd_boolean aarch64_sve_dupm_mov_immediate_p(uint64_t, int)
Definition: aarch64-opc.c:4521
int aarch64_stack_pointer_p(const aarch64_opnd_info *)
Definition: aarch64-opc.c:562
static bfd_boolean opcode_has_alias(const aarch64_opcode *opcode)
Definition: aarch64.h:786
static aarch64_insn get_optional_operand_default_value(const aarch64_opcode *opcode)
Definition: aarch64.h:812
bfd_boolean aarch64_extend_operator_p(enum aarch64_modifier_kind)
Definition: aarch64-opc.c:430
int aarch64_num_of_operands(const aarch64_opcode *)
Definition: aarch64-opc.c:842
const aarch64_sys_reg aarch64_pstatefields[]
Definition: aarch64-opc.c:4281
aarch64_opcode aarch64_opcode_table[]
Definition: aarch64-tbl.h:2241
#define F_N
Definition: aarch64.h:766
const aarch64_sys_ins_reg aarch64_sys_regs_dc[]
Definition: aarch64-opc.c:4325
#define F_GPRSIZE_IN_Q
Definition: aarch64.h:742
static bfd_boolean empty_qualifier_sequence_p(const aarch64_opnd_qualifier_t *qualifiers)
Definition: aarch64.h:659
const aarch64_sys_ins_reg aarch64_sys_regs_tlbi[]
Definition: aarch64-opc.c:4358
aarch64_insn_class
Definition: aarch64.h:454
@ asimdtbl
Definition: aarch64.h:469
@ sve_size_hsd
Definition: aarch64.h:535
@ ldst_unscaled
Definition: aarch64.h:513
@ floatsel
Definition: aarch64.h:505
@ log_shift
Definition: aarch64.h:520
@ loadlit
Definition: aarch64.h:518
@ sve_movprfx
Definition: aarch64.h:529
@ asisdsame
Definition: aarch64.h:479
@ ldst_imm9
Definition: aarch64.h:508
@ asimddiff
Definition: aarch64.h:460
@ ldst_immpre
Definition: aarch64.h:507
@ condcmp_reg
Definition: aarch64.h:487
@ asisdpair
Definition: aarch64.h:478
@ asisdmisc
Definition: aarch64.h:476
@ branch_imm
Definition: aarch64.h:482
@ ldstpair_off
Definition: aarch64.h:516
@ ldstpair_indexed
Definition: aarch64.h:517
@ pcreladdr
Definition: aarch64.h:523
@ cryptosha3
Definition: aarch64.h:491
@ asisdlsep
Definition: aarch64.h:473
@ asimdmisc
Definition: aarch64.h:465
@ condbranch
Definition: aarch64.h:485
@ floatimm
Definition: aarch64.h:504
@ floatdp1
Definition: aarch64.h:501
@ ldst_regoff
Definition: aarch64.h:511
@ sve_cpy
Definition: aarch64.h:525
@ asisddiff
Definition: aarch64.h:470
@ compbranch
Definition: aarch64.h:484
@ asimdshf
Definition: aarch64.h:468
@ exception
Definition: aarch64.h:495
@ asimdsame
Definition: aarch64.h:467
@ addsub_carry
Definition: aarch64.h:455
@ floatdp2
Definition: aarch64.h:502
@ floatccmp
Definition: aarch64.h:499
@ ldstnapair_offs
Definition: aarch64.h:515
@ cryptoaes
Definition: aarch64.h:489
@ asisdlse
Definition: aarch64.h:472
@ lse_atomic
Definition: aarch64.h:521
@ asisdelem
Definition: aarch64.h:471
@ log_imm
Definition: aarch64.h:519
@ ldst_immpost
Definition: aarch64.h:506
@ ldstexcl
Definition: aarch64.h:514
@ asimdimm
Definition: aarch64.h:463
@ cryptosm3
Definition: aarch64.h:538
@ cryptosha2
Definition: aarch64.h:490
@ asimdins
Definition: aarch64.h:464
@ sve_misc
Definition: aarch64.h:528
@ sve_size_sd
Definition: aarch64.h:536
@ asimdelem
Definition: aarch64.h:461
@ floatcmp
Definition: aarch64.h:500
@ floatdp3
Definition: aarch64.h:503
@ sve_size_bhsd
Definition: aarch64.h:534
@ dp_2src
Definition: aarch64.h:493
@ ldst_pos
Definition: aarch64.h:510
@ sve_limm
Definition: aarch64.h:527
@ asisdone
Definition: aarch64.h:477
@ addsub_shift
Definition: aarch64.h:458
@ asisdlso
Definition: aarch64.h:474
@ sve_index
Definition: aarch64.h:526
@ bitfield
Definition: aarch64.h:481
@ sve_size_bhs
Definition: aarch64.h:533
@ ldst_imm10
Definition: aarch64.h:509
@ asisdlsop
Definition: aarch64.h:475
@ dp_3src
Definition: aarch64.h:494
@ sve_shift_pred
Definition: aarch64.h:531
@ condcmp_imm
Definition: aarch64.h:486
@ sve_shift_unpred
Definition: aarch64.h:532
@ testbranch
Definition: aarch64.h:537
@ extract
Definition: aarch64.h:496
@ cryptosm4
Definition: aarch64.h:539
@ asimdext
Definition: aarch64.h:462
@ float2fix
Definition: aarch64.h:497
@ sve_pred_zm
Definition: aarch64.h:530
@ asimdperm
Definition: aarch64.h:466
@ ic_system
Definition: aarch64.h:524
@ float2int
Definition: aarch64.h:498
@ branch_reg
Definition: aarch64.h:483
@ ldst_unpriv
Definition: aarch64.h:512
@ dotproduct
Definition: aarch64.h:540
@ condsel
Definition: aarch64.h:488
@ movewide
Definition: aarch64.h:522
@ asimdall
Definition: aarch64.h:459
@ addsub_imm
Definition: aarch64.h:457
@ addsub_ext
Definition: aarch64.h:456
@ asisdshf
Definition: aarch64.h:480
@ dp_1src
Definition: aarch64.h:492
unsigned char aarch64_get_qualifier_esize(aarch64_opnd_qualifier_t)
Definition: aarch64-opc.c:766
const struct aarch64_name_value_pair aarch64_operand_modifiers[]
Definition: aarch64-opc.c:386
aarch64_opnd_qualifier_t aarch64_opnd_qualifier_seq_t[AARCH64_MAX_OPND_NUM]
Definition: aarch64.h:655
#define AARCH64_MAX_OPND_NUM
Definition: aarch64.h:648
static int opcode_priority(const aarch64_opcode *opcode)
Definition: aarch64.h:793
#define F_LSE_SZ
Definition: aarch64.h:770
int aarch64_opcode_encode(const aarch64_opcode *, const aarch64_inst *, aarch64_insn *, aarch64_opnd_qualifier_t *, aarch64_operand_error *)
static bfd_boolean alias_opcode_p(const aarch64_opcode *opcode)
Definition: aarch64.h:780
int aarch64_operand_index(const enum aarch64_opnd *, enum aarch64_opnd)
Definition: aarch64-opc.c:2736
aarch64_operand_error_kind
Definition: aarch64.h:1093
@ AARCH64_OPDE_OUT_OF_RANGE
Definition: aarch64.h:1100
@ AARCH64_OPDE_INVALID_VARIANT
Definition: aarch64.h:1098
@ AARCH64_OPDE_UNTIED_OPERAND
Definition: aarch64.h:1099
@ AARCH64_OPDE_RECOVERABLE
Definition: aarch64.h:1095
@ AARCH64_OPDE_NIL
Definition: aarch64.h:1094
@ AARCH64_OPDE_FATAL_SYNTAX_ERROR
Definition: aarch64.h:1097
@ AARCH64_OPDE_UNALIGNED
Definition: aarch64.h:1101
@ AARCH64_OPDE_REG_LIST
Definition: aarch64.h:1102
@ AARCH64_OPDE_SYNTAX_ERROR
Definition: aarch64.h:1096
@ AARCH64_OPDE_OTHER_ERROR
Definition: aarch64.h:1103
aarch64_opnd
Definition: aarch64.h:145
@ AARCH64_OPND_ADDR_SIMM10
Definition: aarch64.h:252
@ AARCH64_OPND_SVE_UIMM8_53
Definition: aarch64.h:351
@ AARCH64_OPND_Rm_SFT
Definition: aarch64.h:162
@ AARCH64_OPND_SVE_Rn_SP
Definition: aarch64.h:339
@ AARCH64_OPND_Sm
Definition: aarch64.h:173
@ AARCH64_OPND_FPIMM
Definition: aarch64.h:206
@ AARCH64_OPND_SVE_UIMM3
Definition: aarch64.h:348
@ AARCH64_OPND_UIMM3_OP1
Definition: aarch64.h:212
@ AARCH64_OPND_SVE_Vm
Definition: aarch64.h:354
@ AARCH64_OPND_SVE_ADDR_ZI_U5
Definition: aarch64.h:309
@ AARCH64_OPND_SVE_Pg4_5
Definition: aarch64.h:332
@ AARCH64_OPND_PRFOP
Definition: aarch64.h:266
@ AARCH64_OPND_SM3_IMM2
Definition: aarch64.h:369
@ AARCH64_OPND_FBITS
Definition: aarch64.h:226
@ AARCH64_OPND_SIMD_IMM
Definition: aarch64.h:199
@ AARCH64_OPND_SVE_Pg3
Definition: aarch64.h:331
@ AARCH64_OPND_SVE_ADDR_RI_S4x16
Definition: aarch64.h:269
@ AARCH64_OPND_CRm
Definition: aarch64.h:193
@ AARCH64_OPND_SVE_Pg4_16
Definition: aarch64.h:334
@ AARCH64_OPND_SVE_SIMM6
Definition: aarch64.h:346
@ AARCH64_OPND_IMM_2
Definition: aarch64.h:211
@ AARCH64_OPND_SVE_LIMM
Definition: aarch64.h:325
@ AARCH64_OPND_SIMM5
Definition: aarch64.h:219
@ AARCH64_OPND_SVE_IMM_ROT1
Definition: aarch64.h:322
@ AARCH64_OPND_BIT_NUM
Definition: aarch64.h:216
@ AARCH64_OPND_Va
Definition: aarch64.h:175
@ AARCH64_OPND_SVE_ADDR_RX_LSL2
Definition: aarch64.h:287
@ AARCH64_OPND_Fa
Definition: aarch64.h:167
@ AARCH64_OPND_LEt
Definition: aarch64.h:190
@ AARCH64_OPND_SVE_SHRIMM_PRED
Definition: aarch64.h:342
@ AARCH64_OPND_SVE_ADDR_RI_U6x2
Definition: aarch64.h:277
@ AARCH64_OPND_SVE_ADDR_RI_S4x4xVL
Definition: aarch64.h:273
@ AARCH64_OPND_ADDR_SIMM9_2
Definition: aarch64.h:245
@ AARCH64_OPND_IMM_VLSL
Definition: aarch64.h:197
@ AARCH64_OPND_SVE_ADDR_RR_LSL3
Definition: aarch64.h:284
@ AARCH64_OPND_SVE_Zm3_22_INDEX
Definition: aarch64.h:362
@ AARCH64_OPND_SVE_ADDR_RR_LSL2
Definition: aarch64.h:283
@ AARCH64_OPND_SIMD_FPIMM
Definition: aarch64.h:201
@ AARCH64_OPND_SVE_SHRIMM_UNPRED
Definition: aarch64.h:343
@ AARCH64_OPND_IMM_VLSR
Definition: aarch64.h:198
@ AARCH64_OPND_SVE_ADDR_ZZ_LSL
Definition: aarch64.h:313
@ AARCH64_OPND_SYSREG_IC
Definition: aarch64.h:262
@ AARCH64_OPND_SVE_ADDR_RZ_XTW3_14
Definition: aarch64.h:305
@ AARCH64_OPND_LIMM
Definition: aarch64.h:223
@ AARCH64_OPND_COND1
Definition: aarch64.h:233
@ AARCH64_OPND_BARRIER_PSB
Definition: aarch64.h:267
@ AARCH64_OPND_SVE_Zm3_INDEX
Definition: aarch64.h:361
@ AARCH64_OPND_SVE_Rm
Definition: aarch64.h:338
@ AARCH64_OPND_SVE_ADDR_RZ_XTW1_22
Definition: aarch64.h:299
@ AARCH64_OPND_SVE_Zd
Definition: aarch64.h:358
@ AARCH64_OPND_SVE_ADDR_RZ_XTW_14
Definition: aarch64.h:293
@ AARCH64_OPND_ADDR_UIMM12
Definition: aarch64.h:253
@ AARCH64_OPND_SVE_SHLIMM_PRED
Definition: aarch64.h:340
@ AARCH64_OPND_Em16
Definition: aarch64.h:184
@ AARCH64_OPND_SVE_SIMM8
Definition: aarch64.h:347
@ AARCH64_OPND_SVE_Pn
Definition: aarch64.h:336
@ AARCH64_OPND_LVt
Definition: aarch64.h:187
@ AARCH64_OPND_SVE_ADDR_RX_LSL3
Definition: aarch64.h:288
@ AARCH64_OPND_ADDR_SIMM9
Definition: aarch64.h:244
@ AARCH64_OPND_UIMM3_OP2
Definition: aarch64.h:213
@ AARCH64_OPND_SYSREG
Definition: aarch64.h:258
@ AARCH64_OPND_Ft2
Definition: aarch64.h:169
@ AARCH64_OPND_PSTATEFIELD
Definition: aarch64.h:259
@ AARCH64_OPND_SVE_ADDR_RZ_LSL3
Definition: aarch64.h:292
@ AARCH64_OPND_SVE_Pt
Definition: aarch64.h:337
@ AARCH64_OPND_Sd
Definition: aarch64.h:171
@ AARCH64_OPND_SVE_ADDR_RI_S4x3xVL
Definition: aarch64.h:272
@ AARCH64_OPND_SVE_ADDR_RX_LSL1
Definition: aarch64.h:286
@ AARCH64_OPND_SVE_ADDR_RR
Definition: aarch64.h:281
@ AARCH64_OPND_SVE_Zm_5
Definition: aarch64.h:359
@ AARCH64_OPND_SYSREG_AT
Definition: aarch64.h:260
@ AARCH64_OPND_SVE_LIMM_MOV
Definition: aarch64.h:326
@ AARCH64_OPND_IDX
Definition: aarch64.h:195
@ AARCH64_OPND_SVE_ZnxN
Definition: aarch64.h:366
@ AARCH64_OPND_SVE_I1_HALF_ONE
Definition: aarch64.h:319
@ AARCH64_OPND_ADDR_PCREL26
Definition: aarch64.h:239
@ AARCH64_OPND_Rn_SP
Definition: aarch64.h:158
@ AARCH64_OPND_SVE_VZn
Definition: aarch64.h:352
@ AARCH64_OPND_SVE_Pg4_10
Definition: aarch64.h:333
@ AARCH64_OPND_SIMD_IMM_SFT
Definition: aarch64.h:200
@ AARCH64_OPND_IMM_ROT2
Definition: aarch64.h:229
@ AARCH64_OPND_HALF
Definition: aarch64.h:225
@ AARCH64_OPND_ADDR_PCREL19
Definition: aarch64.h:237
@ AARCH64_OPND_IMMS
Definition: aarch64.h:208
@ AARCH64_OPND_SYSREG_DC
Definition: aarch64.h:261
@ AARCH64_OPND_SVE_ADDR_RI_S9xVL
Definition: aarch64.h:275
@ AARCH64_OPND_LVt_AL
Definition: aarch64.h:188
@ AARCH64_OPND_Fn
Definition: aarch64.h:165
@ AARCH64_OPND_BARRIER_ISB
Definition: aarch64.h:265
@ AARCH64_OPND_SIMD_ADDR_SIMPLE
Definition: aarch64.h:254
@ AARCH64_OPND_IMM_MOV
Definition: aarch64.h:227
@ AARCH64_OPND_Rd
Definition: aarch64.h:148
@ AARCH64_OPND_Em
Definition: aarch64.h:183
@ AARCH64_OPND_SVE_ADDR_RI_S6xVL
Definition: aarch64.h:274
@ AARCH64_OPND_Ft
Definition: aarch64.h:168
@ AARCH64_OPND_SVE_PRFOP
Definition: aarch64.h:329
@ AARCH64_OPND_ADDR_ADRP
Definition: aarch64.h:235
@ AARCH64_OPND_SVE_ADDR_RZ_XTW2_22
Definition: aarch64.h:303
@ AARCH64_OPND_SVE_UIMM7
Definition: aarch64.h:349
@ AARCH64_OPND_SVE_ADDR_RZ_XTW1_14
Definition: aarch64.h:297
@ AARCH64_OPND_SVE_ADDR_RI_U6
Definition: aarch64.h:276
@ AARCH64_OPND_SVE_AIMM
Definition: aarch64.h:316
@ AARCH64_OPND_SVE_SIMM5B
Definition: aarch64.h:345
@ AARCH64_OPND_NIL
Definition: aarch64.h:146
@ AARCH64_OPND_SHLL_IMM
Definition: aarch64.h:202
@ AARCH64_OPND_SVE_ADDR_RI_U6x8
Definition: aarch64.h:279
@ AARCH64_OPND_SVE_PATTERN
Definition: aarch64.h:327
@ AARCH64_OPND_SVE_ADDR_RZ_LSL2
Definition: aarch64.h:291
@ AARCH64_OPND_SVE_FPIMM8
Definition: aarch64.h:318
@ AARCH64_OPND_SVE_Za_16
Definition: aarch64.h:357
@ AARCH64_OPND_SVE_ADDR_RX
Definition: aarch64.h:285
@ AARCH64_OPND_ADDR_SIMM7
Definition: aarch64.h:243
@ AARCH64_OPND_NZCV
Definition: aarch64.h:220
@ AARCH64_OPND_LVn
Definition: aarch64.h:186
@ AARCH64_OPND_SVE_ADDR_RZ_LSL1
Definition: aarch64.h:290
@ AARCH64_OPND_SVE_UIMM8
Definition: aarch64.h:350
@ AARCH64_OPND_ADDR_PCREL21
Definition: aarch64.h:238
@ AARCH64_OPND_Rd_SP
Definition: aarch64.h:157
@ AARCH64_OPND_VdD1
Definition: aarch64.h:179
@ AARCH64_OPND_SVE_ZtxN
Definition: aarch64.h:368
@ AARCH64_OPND_ADDR_REGOFF
Definition: aarch64.h:242
@ AARCH64_OPND_AIMM
Definition: aarch64.h:224
@ AARCH64_OPND_IMMR
Definition: aarch64.h:207
@ AARCH64_OPND_VnD1
Definition: aarch64.h:180
@ AARCH64_OPND_SVE_SIMM5
Definition: aarch64.h:344
@ AARCH64_OPND_SVE_ADDR_RI_S4xVL
Definition: aarch64.h:270
@ AARCH64_OPND_UIMM4
Definition: aarch64.h:214
@ AARCH64_OPND_Rs
Definition: aarch64.h:153
@ AARCH64_OPND_SVE_ADDR_RZ
Definition: aarch64.h:289
@ AARCH64_OPND_SVE_Pd
Definition: aarch64.h:330
@ AARCH64_OPND_Rt2
Definition: aarch64.h:152
@ AARCH64_OPND_ADDR_OFFSET
Definition: aarch64.h:255
@ AARCH64_OPND_SVE_I1_HALF_TWO
Definition: aarch64.h:320
@ AARCH64_OPND_SVE_ADDR_RI_S4x2xVL
Definition: aarch64.h:271
@ AARCH64_OPND_SVE_Zm4_INDEX
Definition: aarch64.h:363
@ AARCH64_OPND_EXCEPTION
Definition: aarch64.h:217
@ AARCH64_OPND_Vd
Definition: aarch64.h:176
@ AARCH64_OPND_SVE_I1_ZERO_ONE
Definition: aarch64.h:321
@ AARCH64_OPND_SVE_ASIMM
Definition: aarch64.h:317
@ AARCH64_OPND_SVE_Za_5
Definition: aarch64.h:356
@ AARCH64_OPND_SVE_PATTERN_SCALED
Definition: aarch64.h:328
@ AARCH64_OPND_SVE_Pm
Definition: aarch64.h:335
@ AARCH64_OPND_SVE_ADDR_ZI_U5x8
Definition: aarch64.h:312
@ AARCH64_OPND_SVE_ADDR_RZ_XTW_22
Definition: aarch64.h:295
@ AARCH64_OPND_Fd
Definition: aarch64.h:164
@ AARCH64_OPND_SVE_SHLIMM_UNPRED
Definition: aarch64.h:341
@ AARCH64_OPND_SIMD_ADDR_POST
Definition: aarch64.h:256
@ AARCH64_OPND_SVE_ADDR_ZI_U5x4
Definition: aarch64.h:311
@ AARCH64_OPND_SVE_IMM_ROT2
Definition: aarch64.h:323
@ AARCH64_OPND_Vm
Definition: aarch64.h:178
@ AARCH64_OPND_IMM
Definition: aarch64.h:210
@ AARCH64_OPND_CCMP_IMM
Definition: aarch64.h:218
@ AARCH64_OPND_Rt
Definition: aarch64.h:151
@ AARCH64_OPND_IMM_ROT1
Definition: aarch64.h:228
@ AARCH64_OPND_Rt_SYS
Definition: aarch64.h:155
@ AARCH64_OPND_Rm
Definition: aarch64.h:150
@ AARCH64_OPND_SVE_Zn
Definition: aarch64.h:364
@ AARCH64_OPND_BARRIER
Definition: aarch64.h:264
@ AARCH64_OPND_SVE_ADDR_ZZ_UXTW
Definition: aarch64.h:315
@ AARCH64_OPND_Rm_SP
Definition: aarch64.h:159
@ AARCH64_OPND_SVE_Zt
Definition: aarch64.h:367
@ AARCH64_OPND_SVE_Zn_INDEX
Definition: aarch64.h:365
@ AARCH64_OPND_SVE_ADDR_RR_LSL1
Definition: aarch64.h:282
@ AARCH64_OPND_Rn
Definition: aarch64.h:149
@ AARCH64_OPND_SVE_Vd
Definition: aarch64.h:353
@ AARCH64_OPND_En
Definition: aarch64.h:182
@ AARCH64_OPND_MASK
Definition: aarch64.h:196
@ AARCH64_OPND_Rm_EXT
Definition: aarch64.h:161
@ AARCH64_OPND_SVE_ADDR_ZZ_SXTW
Definition: aarch64.h:314
@ AARCH64_OPND_SVE_Zm_16
Definition: aarch64.h:360
@ AARCH64_OPND_COND
Definition: aarch64.h:232
@ AARCH64_OPND_Ed
Definition: aarch64.h:181
@ AARCH64_OPND_IMM0
Definition: aarch64.h:204
@ AARCH64_OPND_ADDR_PCREL14
Definition: aarch64.h:236
@ AARCH64_OPND_SVE_ADDR_R
Definition: aarch64.h:280
@ AARCH64_OPND_SVE_ADDR_RZ_XTW3_22
Definition: aarch64.h:307
@ AARCH64_OPND_ADDR_SIMPLE
Definition: aarch64.h:241
@ AARCH64_OPND_Ra
Definition: aarch64.h:154
@ AARCH64_OPND_Sn
Definition: aarch64.h:172
@ AARCH64_OPND_FPIMM0
Definition: aarch64.h:205
@ AARCH64_OPND_SVE_ADDR_RI_U6x4
Definition: aarch64.h:278
@ AARCH64_OPND_SYSREG_TLBI
Definition: aarch64.h:263
@ AARCH64_OPND_SVE_ADDR_ZI_U5x2
Definition: aarch64.h:310
@ AARCH64_OPND_CRn
Definition: aarch64.h:192
@ AARCH64_OPND_Fm
Definition: aarch64.h:166
@ AARCH64_OPND_IMM_ROT3
Definition: aarch64.h:230
@ AARCH64_OPND_WIDTH
Definition: aarch64.h:209
@ AARCH64_OPND_SVE_Vn
Definition: aarch64.h:355
@ AARCH64_OPND_SVE_ADDR_RZ_XTW2_14
Definition: aarch64.h:301
@ AARCH64_OPND_UIMM7
Definition: aarch64.h:215
@ AARCH64_OPND_Vn
Definition: aarch64.h:177
@ AARCH64_OPND_PAIRREG
Definition: aarch64.h:160
@ AARCH64_OPND_SVE_INV_LIMM
Definition: aarch64.h:324
unsigned long long aarch64_feature_set
Definition: aarch64.h:96
int aarch64_zero_register_p(const aarch64_opnd_info *)
Definition: aarch64-opc.c:572
bfd_boolean aarch64_sys_reg_deprecated_p(const aarch64_sys_reg *)
Definition: aarch64-opc.c:4067
uint32_t aarch64_insn
Definition: aarch64.h:40
const char *const aarch64_sve_prfop_array[16]
Definition: aarch64-opc.c:84
const struct aarch64_name_value_pair aarch64_hint_options[]
Definition: aarch64-opc.c:470
const aarch64_opcode * aarch64_get_opcode(enum aarch64_op)
const aarch64_cond * get_inverted_cond(const aarch64_cond *cond)
Definition: aarch64-opc.c:376
bfd_boolean aarch64_sys_reg_supported_p(const aarch64_feature_set, const aarch64_sys_reg *)
Definition: aarch64-opc.c:4073
#define F_COND
Definition: aarch64.h:730
enum aarch64_modifier_kind aarch64_get_operand_modifier(const struct aarch64_name_value_pair *)
Definition: aarch64-opc.c:408
#define F_SSIZE
Definition: aarch64.h:738
static bfd_boolean opcode_has_special_coder(const aarch64_opcode *opcode)
Definition: aarch64.h:824
#define F_FPTYPE
Definition: aarch64.h:736
const char * aarch64_get_operand_name(enum aarch64_opnd)
Definition: aarch64-opc.c:334
const aarch64_cond * get_cond_from_value(aarch64_insn value)
Definition: aarch64-opc.c:369
aarch64_op
Definition: aarch64.h:546
@ OP_LDURH
Definition: aarch64.h:565
@ OP_PRFM_LIT
Definition: aarch64.h:577
@ OP_SXTL2
Definition: aarch64.h:626
@ OP_STURV
Definition: aarch64.h:569
@ OP_MOVM_P_P_P
Definition: aarch64.h:635
@ OP_FCMLA_ELEM
Definition: aarch64.h:642
@ OP_SXTL
Definition: aarch64.h:625
@ OP_STRB_POS
Definition: aarch64.h:548
@ OP_MOVN
Definition: aarch64.h:583
@ OP_FCVTXN_S
Definition: aarch64.h:621
@ OP_NOTS_P_P_P_Z
Definition: aarch64.h:639
@ OP_LDURSH
Definition: aarch64.h:566
@ OP_PRFM_POS
Definition: aarch64.h:559
@ OP_FCVTN2
Definition: aarch64.h:618
@ OP_STR_POS
Definition: aarch64.h:554
@ OP_STURB
Definition: aarch64.h:561
@ OP_BFC
Definition: aarch64.h:604
@ OP_UXTL
Definition: aarch64.h:627
@ OP_ASR_IMM
Definition: aarch64.h:593
@ OP_UXTB
Definition: aarch64.h:606
@ OP_FCVT
Definition: aarch64.h:616
@ OP_TOTAL_NUM
Definition: aarch64.h:644
@ OP_SBFX
Definition: aarch64.h:601
@ OP_STRF_POS
Definition: aarch64.h:556
@ OP_LDRSH_POS
Definition: aarch64.h:553
@ OP_BFXIL
Definition: aarch64.h:600
@ OP_LDUR
Definition: aarch64.h:568
@ OP_UXTL2
Definition: aarch64.h:628
@ OP_UXTW
Definition: aarch64.h:608
@ OP_B
Definition: aarch64.h:580
@ OP_LDRV_LIT
Definition: aarch64.h:575
@ OP_LDURSB
Definition: aarch64.h:563
@ OP_LDR_LIT
Definition: aarch64.h:574
@ OP_ROR_IMM
Definition: aarch64.h:623
@ OP_NIL
Definition: aarch64.h:547
@ OP_STRH_POS
Definition: aarch64.h:551
@ OP_LDRB_POS
Definition: aarch64.h:549
@ OP_LSL_IMM
Definition: aarch64.h:595
@ OP_NOT_P_P_P_Z
Definition: aarch64.h:640
@ OP_MOVS_P_P
Definition: aarch64.h:636
@ OP_STUR
Definition: aarch64.h:567
@ OP_LDURB
Definition: aarch64.h:562
@ OP_MOV_Z_Z
Definition: aarch64.h:633
@ OP_MOV_V
Definition: aarch64.h:591
@ OP_MOV_IMM_WIDEN
Definition: aarch64.h:589
@ OP_UBFIZ
Definition: aarch64.h:605
@ OP_LDR_POS
Definition: aarch64.h:555
@ OP_ADD
Definition: aarch64.h:579
@ OP_LSR_IMM
Definition: aarch64.h:594
@ OP_LDURSW
Definition: aarch64.h:571
@ OP_MOV_Z_P_Z
Definition: aarch64.h:631
@ OP_MOV_IMM_LOG
Definition: aarch64.h:587
@ OP_CSETM
Definition: aarch64.h:614
@ OP_LDRSW_POS
Definition: aarch64.h:558
@ OP_CINC
Definition: aarch64.h:610
@ OP_SBFIZ
Definition: aarch64.h:602
@ OP_STURH
Definition: aarch64.h:564
@ OP_BIC
Definition: aarch64.h:597
@ OP_FCVTN
Definition: aarch64.h:617
@ OP_BL
Definition: aarch64.h:581
@ OP_LDRF_POS
Definition: aarch64.h:557
@ OP_BFI
Definition: aarch64.h:603
@ OP_UXTH
Definition: aarch64.h:607
@ OP_MOV_Z_Zi
Definition: aarch64.h:634
@ OP_CNEG
Definition: aarch64.h:612
@ OP_FCVTL2
Definition: aarch64.h:620
@ OP_LDRSW_LIT
Definition: aarch64.h:576
@ OP_MOVZ_P_P_P
Definition: aarch64.h:638
@ OP_MOVZS_P_P_P
Definition: aarch64.h:637
@ OP_LDRSB_POS
Definition: aarch64.h:550
@ OP_CSET
Definition: aarch64.h:613
@ OP_MOVK
Definition: aarch64.h:585
@ OP_FCVTL
Definition: aarch64.h:619
@ OP_PRFUM
Definition: aarch64.h:572
@ OP_MOV_Z_V
Definition: aarch64.h:632
@ OP_MOV_IMM_WIDE
Definition: aarch64.h:588
@ OP_MOV_P_P
Definition: aarch64.h:630
@ OP_MOVZ
Definition: aarch64.h:584
@ OP_LDURV
Definition: aarch64.h:570
@ OP_LDRH_POS
Definition: aarch64.h:552
@ OP_UBFX
Definition: aarch64.h:599
@ OP_CINV
Definition: aarch64.h:611
#define F_LDS_SIZE
Definition: aarch64.h:744
const aarch64_opcode * aarch64_replace_opcode(struct aarch64_inst *, const aarch64_opcode *)
Definition: aarch64-opc.c:2715
#define F_PSEUDO
Definition: aarch64.h:762
const struct aarch64_name_value_pair aarch64_barrier_options[16]
Definition: aarch64-opc.c:443
bfd_boolean aarch64_pstatefield_supported_p(const aarch64_feature_set, const aarch64_sys_reg *)
Definition: aarch64-opc.c:4293
int aarch64_decode_insn(aarch64_insn, aarch64_inst *, bfd_boolean, aarch64_operand_error *errors)
Definition: aarch64-dis.c:2958
#define F_MISC
Definition: aarch64.h:764
lzma_index ** i
Definition: index.h:629
static int value
Definition: cmd_api.c:93
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition: cs_driver.c:93
#define __attribute__(x)
Definition: ansidecl.h:266
BFD_HOST_U_64_BIT bfd_vma
Definition: mybfd.h:111
int bfd_boolean
Definition: mybfd.h:98
#define TRUE
Definition: mybfd.h:103
#define FALSE
Definition: mybfd.h:102
int idx
Definition: setup.py:197
long int64_t
Definition: sftypes.h:32
unsigned int uint32_t
Definition: sftypes.h:29
unsigned long uint64_t
Definition: sftypes.h:28
#define cond(bop, top, mask, flags)
aarch64_insn value
Definition: aarch64.h:1026
const aarch64_opcode * opcode
Definition: aarch64.h:1029
const aarch64_cond * cond
Definition: aarch64.h:1032
aarch64_insn value
Definition: aarch64.h:834
const char * name
Definition: aarch64.h:833
aarch64_opnd_qualifier_seq_t qualifiers_list[AARCH64_MAX_QLF_SEQ_NUM]
Definition: aarch64.h:703
bfd_boolean(* verifier)(const struct aarch64_opcode *, const aarch64_insn)
Definition: aarch64.h:713
enum aarch64_insn_class iclass
Definition: aarch64.h:686
unsigned char tied_operand
Definition: aarch64.h:710
aarch64_insn mask
Definition: aarch64.h:683
uint32_t flags
Definition: aarch64.h:706
const aarch64_feature_set * avariant
Definition: aarch64.h:692
aarch64_insn opcode
Definition: aarch64.h:677
enum aarch64_op op
Definition: aarch64.h:689
const char * name
Definition: aarch64.h:673
enum aarch64_operand_error_kind kind
Definition: aarch64.h:1109
const char * error
Definition: aarch64.h:1111
bfd_boolean non_fatal
Definition: aarch64.h:1113
aarch64_insn pstatefield
Definition: aarch64.h:981
const aarch64_cond * cond
Definition: aarch64.h:979
unsigned is_reg
Definition: aarch64.h:962
aarch64_opnd_qualifier_t qualifier
Definition: aarch64.h:921
unsigned first_regno
Definition: aarch64.h:938
unsigned has_index
Definition: aarch64.h:941
int64_t value
Definition: aarch64.h:948
unsigned writeback
Definition: aarch64.h:965
struct aarch64_opnd_info::@37 shifter
struct aarch64_opnd_info::@35::@43 sysreg
unsigned regno
Definition: aarch64.h:928
struct aarch64_opnd_info::@35::@42 addr
const struct aarch64_name_value_pair * prfop
Definition: aarch64.h:985
int64_t amount
Definition: aarch64.h:996
aarch64_insn value
Definition: aarch64.h:973
unsigned operator_present
Definition: aarch64.h:993
unsigned present
Definition: aarch64.h:1007
unsigned int regno
Definition: aarch64.h:932
const struct aarch64_name_value_pair * barrier
Definition: aarch64.h:983
unsigned preind
Definition: aarch64.h:966
int64_t index
Definition: aarch64.h:933
unsigned pcrel
Definition: aarch64.h:964
struct aarch64_opnd_info::@35::@39 reglane
enum aarch64_modifier_kind kind
Definition: aarch64.h:992
struct aarch64_opnd_info::@35::@38 reg
unsigned postind
Definition: aarch64.h:967
unsigned is_fp
Definition: aarch64.h:949
const aarch64_sys_ins_reg * sysins_op
Definition: aarch64.h:982
unsigned amount_present
Definition: aarch64.h:995
struct aarch64_opnd_info::@35::@41 imm
unsigned base_regno
Definition: aarch64.h:954
uint32_t flags
Definition: aarch64.h:976
struct aarch64_opnd_info::@35::@42::@44 offset
unsigned skip
Definition: aarch64.h:999
unsigned num_regs
Definition: aarch64.h:939
struct aarch64_opnd_info::@35::@40 reglist
enum aarch64_opnd type
Definition: aarch64.h:920
const struct aarch64_name_value_pair * hint_option
Definition: aarch64.h:984
uint32_t value
Definition: aarch64.h:860
uint32_t flags
Definition: aarch64.h:861
const char * name
Definition: aarch64.h:859
uint32_t flags
Definition: aarch64.h:846
aarch64_insn value
Definition: aarch64.h:845
const char * name
Definition: aarch64.h:844
Definition: names.h:123