1 /* aarch64-dis.h -- Header file for aarch64-dis.c and aarch64-dis-2.c.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 Contributed by ARM Ltd.
5 This file is part of the GNU opcodes library.
7 This library is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 It is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING3. If not,
19 see <http://www.gnu.org/licenses/>. */
21 #ifndef OPCODES_AARCH64_DIS_H
22 #define OPCODES_AARCH64_DIS_H
24 #include "aarch64-opc.h"
26 /* Lookup opcode WORD in the opcode table.
28 In the case of multiple aarch64_opcode candidates, one of them will be
29 returned; for other candidate(s), call aarch64_find_next_opcode to
30 obtain. Note that aarch64_find_next_opcode finds the next
31 aarch64_opcode candidate in a way as if all related aarch64_opcode
32 entries were in a single-link list.
34 N.B. all alias opcodes are ignored here. */
36 const aarch64_opcode
* aarch64_opcode_lookup (uint32_t);
37 const aarch64_opcode
* aarch64_find_next_opcode (const aarch64_opcode
*);
39 /* Given OPCODE, return its alias, e.g. given UBFM, return LSL.
41 In the case of multiple alias candidates, the one of the highest priority
42 (or one of several aliases of the same highest priority) will be
43 returned; for the other candidate(s), call aarch64_find_next_alias_opcode
44 to obtain. Note that aarch64_find_next_alias_opcode finds the next
45 alias candidate in a way as if all related aliases were in a single-link
46 list with priority from the highest to the least. */
48 const aarch64_opcode
* aarch64_find_alias_opcode (const aarch64_opcode
*);
49 const aarch64_opcode
* aarch64_find_next_alias_opcode (const aarch64_opcode
*);
51 /* Switch-table-based high-level operand extractor. */
54 aarch64_extract_operand (const aarch64_operand
*, aarch64_opnd_info
*,
55 const aarch64_insn
, const aarch64_inst
*,
56 aarch64_operand_error
*);
58 /* Operand extractors. */
60 #define AARCH64_DECL_OPD_EXTRACTOR(x) \
61 bool aarch64_##x (const aarch64_operand *, aarch64_opnd_info *, \
62 const aarch64_insn, const aarch64_inst *, \
63 aarch64_operand_error *)
65 AARCH64_DECL_OPD_EXTRACTOR (ext_none
);
66 AARCH64_DECL_OPD_EXTRACTOR (ext_regno
);
67 AARCH64_DECL_OPD_EXTRACTOR (ext_regno_pair
);
68 AARCH64_DECL_OPD_EXTRACTOR (ext_regrt_sysins
);
69 AARCH64_DECL_OPD_EXTRACTOR (ext_reglane
);
70 AARCH64_DECL_OPD_EXTRACTOR (ext_reglist
);
71 AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_reglist
);
72 AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_reglist_r
);
73 AARCH64_DECL_OPD_EXTRACTOR (ext_lut_reglist
);
74 AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_elemlist
);
75 AARCH64_DECL_OPD_EXTRACTOR (ext_advsimd_imm_shift
);
76 AARCH64_DECL_OPD_EXTRACTOR (ext_shll_imm
);
77 AARCH64_DECL_OPD_EXTRACTOR (ext_imm
);
78 AARCH64_DECL_OPD_EXTRACTOR (ext_imm_half
);
79 AARCH64_DECL_OPD_EXTRACTOR (ext_advsimd_imm_modified
);
80 AARCH64_DECL_OPD_EXTRACTOR (ext_fpimm
);
81 AARCH64_DECL_OPD_EXTRACTOR (ext_fbits
);
82 AARCH64_DECL_OPD_EXTRACTOR (ext_aimm
);
83 AARCH64_DECL_OPD_EXTRACTOR (ext_limm
);
84 AARCH64_DECL_OPD_EXTRACTOR (ext_inv_limm
);
85 AARCH64_DECL_OPD_EXTRACTOR (ext_ft
);
86 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simple
);
87 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_offset
);
88 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_regoff
);
89 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simm
);
90 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simm10
);
91 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_uimm12
);
92 AARCH64_DECL_OPD_EXTRACTOR (ext_simd_addr_post
);
93 AARCH64_DECL_OPD_EXTRACTOR (ext_cond
);
94 AARCH64_DECL_OPD_EXTRACTOR (ext_sysreg
);
95 AARCH64_DECL_OPD_EXTRACTOR (ext_pstatefield
);
96 AARCH64_DECL_OPD_EXTRACTOR (ext_sysins_op
);
97 AARCH64_DECL_OPD_EXTRACTOR (ext_barrier
);
98 AARCH64_DECL_OPD_EXTRACTOR (ext_barrier_dsb_nxs
);
99 AARCH64_DECL_OPD_EXTRACTOR (ext_hint
);
100 AARCH64_DECL_OPD_EXTRACTOR (ext_prfop
);
101 AARCH64_DECL_OPD_EXTRACTOR (ext_reg_extended
);
102 AARCH64_DECL_OPD_EXTRACTOR (ext_reg_shifted
);
103 AARCH64_DECL_OPD_EXTRACTOR (ext_reg_lsl_shifted
);
104 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4
);
105 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4xvl
);
106 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s6xvl
);
107 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s9xvl
);
108 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_u6
);
109 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_rr_lsl
);
110 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_rz_xtw
);
111 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zi_u5
);
112 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_lsl
);
113 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_sxtw
);
114 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_uxtw
);
115 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_aimm
);
116 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_aligned_reglist
);
117 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_asimm
);
118 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_half_one
);
119 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_half_two
);
120 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_zero_one
);
121 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_index
);
122 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_limm_mov
);
123 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_quad_index
);
124 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_reglist
);
125 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_strided_reglist
);
126 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_scale
);
127 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_shlimm
);
128 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_shrimm
);
129 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_vrs1
);
130 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_vrs2
);
131 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_tile_to_vec
);
132 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_hv_tiles
);
133 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_hv_tiles_range
);
134 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_list
);
135 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_za_array
);
136 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_addr_ri_u4xvl
);
137 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_sm_za
);
138 AARCH64_DECL_OPD_EXTRACTOR (ext_sme_pred_reg_with_index
);
139 AARCH64_DECL_OPD_EXTRACTOR (ext_imm_rotate1
);
140 AARCH64_DECL_OPD_EXTRACTOR (ext_imm_rotate2
);
141 AARCH64_DECL_OPD_EXTRACTOR (ext_x0_to_x30
);
142 AARCH64_DECL_OPD_EXTRACTOR (ext_simple_index
);
143 AARCH64_DECL_OPD_EXTRACTOR (ext_plain_shrimm
);
144 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_reglist_zt
);
145 AARCH64_DECL_OPD_EXTRACTOR (ext_rcpc3_addr_opt_offset
);
146 AARCH64_DECL_OPD_EXTRACTOR (ext_rcpc3_addr_offset
);
149 #undef AARCH64_DECL_OPD_EXTRACTOR
151 #endif /* OPCODES_AARCH64_DIS_H */