Rizin
unix-like reverse engineering framework and cli tools
aarch64-dis.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2012-2018 Free Software Foundation, Inc.
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 /* aarch64-dis.h -- Header file for aarch64-dis.c and aarch64-dis-2.c.
5  Copyright (C) 2012-2018 Free Software Foundation, Inc.
6  Contributed by ARM Ltd.
7 
8  This file is part of the GNU opcodes library.
9 
10  This library is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 3, or (at your option)
13  any later version.
14 
15  It is distributed in the hope that it will be useful, but WITHOUT
16  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18  License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; see the file COPYING3. If not,
22  see <http://www.gnu.org/licenses/>. */
23 
24 #ifndef OPCODES_AARCH64_DIS_H
25 #define OPCODES_AARCH64_DIS_H
26 // #include "bfd_stdint.h"
27 #include "aarch64-opc.h"
28 
29 /* Lookup opcode WORD in the opcode table.
30 
31  In the case of multiple aarch64_opcode candidates, one of them will be
32  returned; for other candidate(s), call aarch64_find_next_opcode to
33  obtain. Note that aarch64_find_next_opcode finds the next
34  aarch64_opcode candidate in a way as if all related aarch64_opcode
35  entries were in a single-link list.
36 
37  N.B. all alias opcodes are ignored here. */
38 
41 
42 /* Given OPCODE, return its alias, e.g. given UBFM, return LSL.
43 
44  In the case of multiple alias candidates, the one of the highest priority
45  (or one of several aliases of the same highest priority) will be
46  returned; for the other candidate(s), call aarch64_find_next_alias_opcode
47  to obtain. Note that aarch64_find_next_alias_opcode finds the next
48  alias candidate in a way as if all related aliases were in a single-link
49  list with priority from the highest to the least. */
50 
53 
54 /* Switch-table-based high-level operand extractor. */
55 
58  const aarch64_insn, const aarch64_inst *,
60 
61 /* Operand extractors. */
62 
63 #define AARCH64_DECL_OPD_EXTRACTOR(x) \
64  bfd_boolean aarch64_##x (const aarch64_operand *, aarch64_opnd_info *, \
65  const aarch64_insn, const aarch64_inst *, \
66  aarch64_operand_error *)
67 
69 AARCH64_DECL_OPD_EXTRACTOR (ext_regno_pair);
70 AARCH64_DECL_OPD_EXTRACTOR (ext_regrt_sysins);
73 AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_reglist);
74 AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_reglist_r);
75 AARCH64_DECL_OPD_EXTRACTOR (ext_ldst_elemlist);
76 AARCH64_DECL_OPD_EXTRACTOR (ext_advsimd_imm_shift);
80 AARCH64_DECL_OPD_EXTRACTOR (ext_advsimd_imm_modified);
87 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simple);
88 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_offset);
89 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_regoff);
91 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_simm10);
92 AARCH64_DECL_OPD_EXTRACTOR (ext_addr_uimm12);
93 AARCH64_DECL_OPD_EXTRACTOR (ext_simd_addr_post);
96 AARCH64_DECL_OPD_EXTRACTOR (ext_pstatefield);
101 AARCH64_DECL_OPD_EXTRACTOR (ext_reg_extended);
102 AARCH64_DECL_OPD_EXTRACTOR (ext_reg_shifted);
103 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4);
104 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4xvl);
105 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s6xvl);
106 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s9xvl);
107 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_u6);
108 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_rr_lsl);
109 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_rz_xtw);
110 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zi_u5);
111 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_lsl);
112 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_sxtw);
113 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_zz_uxtw);
116 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_half_one);
117 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_half_two);
118 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_float_zero_one);
120 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_limm_mov);
121 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_quad_index);
122 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_reglist);
124 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_shlimm);
125 AARCH64_DECL_OPD_EXTRACTOR (ext_sve_shrimm);
126 AARCH64_DECL_OPD_EXTRACTOR (ext_imm_rotate1);
127 AARCH64_DECL_OPD_EXTRACTOR (ext_imm_rotate2);
128 
129 #undef AARCH64_DECL_OPD_EXTRACTOR
130 
131 #endif /* OPCODES_AARCH64_DIS_H */
const aarch64_opcode * aarch64_find_next_opcode(const aarch64_opcode *)
bfd_boolean aarch64_extract_operand(const aarch64_operand *, aarch64_opnd_info *, const aarch64_insn, const aarch64_inst *, aarch64_operand_error *)
const aarch64_opcode * aarch64_find_next_alias_opcode(const aarch64_opcode *)
#define AARCH64_DECL_OPD_EXTRACTOR(x)
Definition: aarch64-dis.h:63
const aarch64_opcode * aarch64_opcode_lookup(uint32_t)
const aarch64_opcode * aarch64_find_alias_opcode(const aarch64_opcode *)
uint32_t aarch64_insn
Definition: aarch64.h:40
int bfd_boolean
Definition: mybfd.h:98
unsigned int uint32_t
Definition: sftypes.h:29