Automatic date update in version.in
[deliverable/binutils-gdb.git] / opcodes / aarch64-dis.h
CommitLineData
a06ea964 1/* aarch64-dis.h -- Header file for aarch64-dis.c and aarch64-dis-2.c.
250d07de 2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
a06ea964
NC
3 Contributed by ARM Ltd.
4
5 This file is part of the GNU opcodes library.
6
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)
10 any later version.
11
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.
16
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/>. */
20
21#ifndef OPCODES_AARCH64_DIS_H
22#define OPCODES_AARCH64_DIS_H
3dfb1b6d 23#include <stdint.h>
a06ea964
NC
24#include "aarch64-opc.h"
25
26/* Lookup opcode WORD in the opcode table.
27
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.
33
34 N.B. all alias opcodes are ignored here. */
35
36const aarch64_opcode* aarch64_opcode_lookup (uint32_t);
37const aarch64_opcode* aarch64_find_next_opcode (const aarch64_opcode *);
38
39/* Given OPCODE, return its alias, e.g. given UBFM, return LSL.
40
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. */
47
48const aarch64_opcode* aarch64_find_alias_opcode (const aarch64_opcode *);
49const aarch64_opcode* aarch64_find_next_alias_opcode (const aarch64_opcode *);
50
51/* Switch-table-based high-level operand extractor. */
52
78933a4a 53bool
561a72d4
TC
54aarch64_extract_operand (const aarch64_operand *, aarch64_opnd_info *,
55 const aarch64_insn, const aarch64_inst *,
56 aarch64_operand_error *);
a06ea964
NC
57
58/* Operand extractors. */
59
60#define AARCH64_DECL_OPD_EXTRACTOR(x) \
78933a4a
AM
61 bool aarch64_##x (const aarch64_operand *, aarch64_opnd_info *, \
62 const aarch64_insn, const aarch64_inst *, \
63 aarch64_operand_error *)
a06ea964 64
c2e5c986 65AARCH64_DECL_OPD_EXTRACTOR (ext_none);
a06ea964 66AARCH64_DECL_OPD_EXTRACTOR (ext_regno);
ee804238 67AARCH64_DECL_OPD_EXTRACTOR (ext_regno_pair);
a06ea964
NC
68AARCH64_DECL_OPD_EXTRACTOR (ext_regrt_sysins);
69AARCH64_DECL_OPD_EXTRACTOR (ext_reglane);
70AARCH64_DECL_OPD_EXTRACTOR (ext_reglist);
71AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_reglist);
72AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_reglist_r);
73AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_elemlist);
74AARCH64_DECL_OPD_EXTRACTOR (ext_advsimd_imm_shift);
75AARCH64_DECL_OPD_EXTRACTOR (ext_shll_imm);
76AARCH64_DECL_OPD_EXTRACTOR (ext_imm);
77AARCH64_DECL_OPD_EXTRACTOR (ext_imm_half);
78AARCH64_DECL_OPD_EXTRACTOR (ext_advsimd_imm_modified);
aa2aa4c6 79AARCH64_DECL_OPD_EXTRACTOR (ext_fpimm);
a06ea964
NC
80AARCH64_DECL_OPD_EXTRACTOR (ext_fbits);
81AARCH64_DECL_OPD_EXTRACTOR (ext_aimm);
82AARCH64_DECL_OPD_EXTRACTOR (ext_limm);
e950b345 83AARCH64_DECL_OPD_EXTRACTOR (ext_inv_limm);
a06ea964
NC
84AARCH64_DECL_OPD_EXTRACTOR (ext_ft);
85AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simple);
f42f1a1d 86AARCH64_DECL_OPD_EXTRACTOR (ext_addr_offset);
a06ea964
NC
87AARCH64_DECL_OPD_EXTRACTOR (ext_addr_regoff);
88AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simm);
3f06e550 89AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simm10);
a06ea964
NC
90AARCH64_DECL_OPD_EXTRACTOR (ext_addr_uimm12);
91AARCH64_DECL_OPD_EXTRACTOR (ext_simd_addr_post);
92AARCH64_DECL_OPD_EXTRACTOR (ext_cond);
93AARCH64_DECL_OPD_EXTRACTOR (ext_sysreg);
94AARCH64_DECL_OPD_EXTRACTOR (ext_pstatefield);
95AARCH64_DECL_OPD_EXTRACTOR (ext_sysins_op);
96AARCH64_DECL_OPD_EXTRACTOR (ext_barrier);
fd195909 97AARCH64_DECL_OPD_EXTRACTOR (ext_barrier_dsb_nxs);
9ed608f9 98AARCH64_DECL_OPD_EXTRACTOR (ext_hint);
a06ea964
NC
99AARCH64_DECL_OPD_EXTRACTOR (ext_prfop);
100AARCH64_DECL_OPD_EXTRACTOR (ext_reg_extended);
101AARCH64_DECL_OPD_EXTRACTOR (ext_reg_shifted);
582e12bf 102AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4);
98907a70
RS
103AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4xvl);
104AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s6xvl);
105AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s9xvl);
4df068de
RS
106AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_u6);
107AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_rr_lsl);
108AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_rz_xtw);
109AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zi_u5);
110AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_lsl);
111AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_sxtw);
112AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_uxtw);
e950b345
RS
113AARCH64_DECL_OPD_EXTRACTOR (ext_sve_aimm);
114AARCH64_DECL_OPD_EXTRACTOR (ext_sve_asimm);
165d4950
RS
115AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_half_one);
116AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_half_two);
117AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_zero_one);
f11ad6bc 118AARCH64_DECL_OPD_EXTRACTOR (ext_sve_index);
e950b345 119AARCH64_DECL_OPD_EXTRACTOR (ext_sve_limm_mov);
582e12bf 120AARCH64_DECL_OPD_EXTRACTOR (ext_sve_quad_index);
f11ad6bc 121AARCH64_DECL_OPD_EXTRACTOR (ext_sve_reglist);
2442d846 122AARCH64_DECL_OPD_EXTRACTOR (ext_sve_scale);
e950b345
RS
123AARCH64_DECL_OPD_EXTRACTOR (ext_sve_shlimm);
124AARCH64_DECL_OPD_EXTRACTOR (ext_sve_shrimm);
582e12bf
RS
125AARCH64_DECL_OPD_EXTRACTOR (ext_imm_rotate1);
126AARCH64_DECL_OPD_EXTRACTOR (ext_imm_rotate2);
a06ea964
NC
127
128#undef AARCH64_DECL_OPD_EXTRACTOR
129
130#endif /* OPCODES_AARCH64_DIS_H */
This page took 0.423308 seconds and 4 git commands to generate.