Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | aarch64_opcode |
struct | aarch64_name_value_pair |
struct | aarch64_sys_reg |
struct | aarch64_sys_ins_reg |
struct | aarch64_cond |
struct | aarch64_opnd_info |
struct | aarch64_inst |
struct | aarch64_operand_error |
Macros | |
#define | AARCH64_PCREL_OFFSET 0 |
#define | AARCH64_FEATURE_SHA2 0x200000000ULL /* SHA2 instructions. */ |
#define | AARCH64_FEATURE_AES 0x800000000ULL /* AES instructions. */ |
#define | AARCH64_FEATURE_V8_4 0x000000800ULL /* ARMv8.4 processors. */ |
#define | AARCH64_FEATURE_SM4 0x100000000ULL /* SM3 & SM4 instructions. */ |
#define | AARCH64_FEATURE_SHA3 0x400000000ULL /* SHA3 instructions. */ |
#define | AARCH64_FEATURE_V8 0x00000001 /* All processors. */ |
#define | AARCH64_FEATURE_V8_2 0x00000020 /* ARMv8.2 processors. */ |
#define | AARCH64_FEATURE_V8_3 0x00000040 /* ARMv8.3 processors. */ |
#define | AARCH64_FEATURE_CRYPTO 0x00010000 /* Crypto instructions. */ |
#define | AARCH64_FEATURE_FP 0x00020000 /* FP instructions. */ |
#define | AARCH64_FEATURE_SIMD 0x00040000 /* SIMD instructions. */ |
#define | AARCH64_FEATURE_CRC 0x00080000 /* CRC instructions. */ |
#define | AARCH64_FEATURE_LSE 0x00100000 /* LSE instructions. */ |
#define | AARCH64_FEATURE_PAN 0x00200000 /* PAN instructions. */ |
#define | AARCH64_FEATURE_LOR 0x00400000 /* LOR instructions. */ |
#define | AARCH64_FEATURE_RDMA 0x00800000 /* v8.1 SIMD instructions. */ |
#define | AARCH64_FEATURE_V8_1 0x01000000 /* v8.1 features. */ |
#define | AARCH64_FEATURE_F16 0x02000000 /* v8.2 FP16 instructions. */ |
#define | AARCH64_FEATURE_RAS 0x04000000 /* RAS Extensions. */ |
#define | AARCH64_FEATURE_PROFILE 0x08000000 /* Statistical Profiling. */ |
#define | AARCH64_FEATURE_SVE 0x10000000 /* SVE instructions. */ |
#define | AARCH64_FEATURE_RCPC 0x20000000 /* RCPC instructions. */ |
#define | AARCH64_FEATURE_COMPNUM 0x40000000 /* Complex # instructions. */ |
#define | AARCH64_FEATURE_DOTPROD 0x080000000 /* Dot Product instructions. */ |
#define | AARCH64_FEATURE_F16_FML 0x1000000000ULL /* v8.2 FP16FML ins. */ |
#define | AARCH64_ARCH_V8 |
#define | AARCH64_ARCH_V8_1 |
#define | AARCH64_ARCH_V8_2 |
#define | AARCH64_ARCH_V8_3 |
#define | AARCH64_ARCH_V8_4 |
#define | AARCH64_ARCH_NONE AARCH64_FEATURE (0, 0) |
#define | AARCH64_ANY AARCH64_FEATURE (-1, 0) /* Any basic core. */ |
#define | AARCH64_CPU_HAS_ALL_FEATURES(CPU, FEAT) ((~(CPU) & (FEAT)) == 0) |
#define | AARCH64_CPU_HAS_ANY_FEATURES(CPU, FEAT) (((CPU) & (FEAT)) != 0) |
#define | AARCH64_CPU_HAS_FEATURE(CPU, FEAT) AARCH64_CPU_HAS_ALL_FEATURES (CPU,FEAT) |
#define | AARCH64_MERGE_FEATURE_SETS(TARG, F1, F2) |
#define | AARCH64_CLEAR_FEATURE(TARG, F1, F2) |
#define | AARCH64_FEATURE(core, coproc) ((core) | (coproc)) |
#define | AARCH64_MAX_OPND_NUM 6 |
#define | AARCH64_MAX_QLF_SEQ_NUM 10 |
#define | F_ALIAS (1 << 0) |
#define | F_HAS_ALIAS (1 << 1) |
#define | F_P1 (1 << 2) |
#define | F_P2 (2 << 2) |
#define | F_P3 (3 << 2) |
#define | F_COND (1 << 4) |
#define | F_SF (1 << 5) |
#define | F_SIZEQ (1 << 6) |
#define | F_FPTYPE (1 << 7) |
#define | F_SSIZE (1 << 8) |
#define | F_T (1 << 9) |
#define | F_GPRSIZE_IN_Q (1 << 10) |
#define | F_LDS_SIZE (1 << 11) |
#define | F_OPD0_OPT (1 << 12) |
#define | F_OPD1_OPT (2 << 12) |
#define | F_OPD2_OPT (3 << 12) |
#define | F_OPD3_OPT (4 << 12) |
#define | F_OPD4_OPT (5 << 12) |
#define | F_DEFAULT(X) (((X) & 0x1f) << 15) |
#define | F_CONV (1 << 20) |
#define | F_PSEUDO (1 << 21) |
#define | F_MISC (1 << 22) |
#define | F_N (1 << 23) |
#define | F_OD(X) (((X) & 0x7) << 24) |
#define | F_LSE_SZ (1 << 27) |
#define | F_STRICT (1ULL << 28) |
#define | F_SYS_READ (1ULL << 29) |
#define | F_SYS_WRITE (1ULL << 30) |
#define | DEBUG_TRACE(M, ...) ; |
#define | DEBUG_TRACE_IF(C, M, ...) ; |
Typedefs | |
typedef uint32_t | aarch64_insn |
typedef unsigned long long | aarch64_feature_set |
typedef unsigned char | aarch64_opnd_qualifier_t |
typedef aarch64_opnd_qualifier_t | aarch64_opnd_qualifier_seq_t[AARCH64_MAX_OPND_NUM] |
typedef struct aarch64_opcode | aarch64_opcode |
typedef struct aarch64_opnd_info | aarch64_opnd_info |
typedef struct aarch64_inst | aarch64_inst |
typedef struct aarch64_operand_error | aarch64_operand_error |
#define AARCH64_ANY AARCH64_FEATURE (-1, 0) /* Any basic core. */ |
#define AARCH64_ARCH_NONE AARCH64_FEATURE (0, 0) |
#define AARCH64_ARCH_V8 |
#define AARCH64_ARCH_V8_1 |
#define AARCH64_ARCH_V8_2 |
#define AARCH64_ARCH_V8_3 |
#define AARCH64_ARCH_V8_4 |
#define AARCH64_CPU_HAS_ALL_FEATURES | ( | CPU, | |
FEAT | |||
) | ((~(CPU) & (FEAT)) == 0) |
#define AARCH64_CPU_HAS_ANY_FEATURES | ( | CPU, | |
FEAT | |||
) | (((CPU) & (FEAT)) != 0) |
#define AARCH64_CPU_HAS_FEATURE | ( | CPU, | |
FEAT | |||
) | AARCH64_CPU_HAS_ALL_FEATURES (CPU,FEAT) |
#define AARCH64_FEATURE | ( | core, | |
coproc | |||
) | ((core) | (coproc)) |
#define AARCH64_FEATURE_AES 0x800000000ULL /* AES instructions. */ |
#define AARCH64_FEATURE_COMPNUM 0x40000000 /* Complex # instructions. */ |
#define AARCH64_FEATURE_CRC 0x00080000 /* CRC instructions. */ |
#define AARCH64_FEATURE_CRYPTO 0x00010000 /* Crypto instructions. */ |
#define AARCH64_FEATURE_DOTPROD 0x080000000 /* Dot Product instructions. */ |
#define AARCH64_FEATURE_F16 0x02000000 /* v8.2 FP16 instructions. */ |
#define AARCH64_FEATURE_F16_FML 0x1000000000ULL /* v8.2 FP16FML ins. */ |
#define AARCH64_FEATURE_FP 0x00020000 /* FP instructions. */ |
#define AARCH64_FEATURE_LOR 0x00400000 /* LOR instructions. */ |
#define AARCH64_FEATURE_LSE 0x00100000 /* LSE instructions. */ |
#define AARCH64_FEATURE_PAN 0x00200000 /* PAN instructions. */ |
#define AARCH64_FEATURE_PROFILE 0x08000000 /* Statistical Profiling. */ |
#define AARCH64_FEATURE_RAS 0x04000000 /* RAS Extensions. */ |
#define AARCH64_FEATURE_RCPC 0x20000000 /* RCPC instructions. */ |
#define AARCH64_FEATURE_RDMA 0x00800000 /* v8.1 SIMD instructions. */ |
#define AARCH64_FEATURE_SHA2 0x200000000ULL /* SHA2 instructions. */ |
#define AARCH64_FEATURE_SHA3 0x400000000ULL /* SHA3 instructions. */ |
#define AARCH64_FEATURE_SIMD 0x00040000 /* SIMD instructions. */ |
#define AARCH64_FEATURE_SM4 0x100000000ULL /* SM3 & SM4 instructions. */ |
#define AARCH64_FEATURE_SVE 0x10000000 /* SVE instructions. */ |
#define AARCH64_FEATURE_V8 0x00000001 /* All processors. */ |
#define AARCH64_FEATURE_V8_1 0x01000000 /* v8.1 features. */ |
#define AARCH64_FEATURE_V8_2 0x00000020 /* ARMv8.2 processors. */ |
#define AARCH64_FEATURE_V8_3 0x00000040 /* ARMv8.3 processors. */ |
#define AARCH64_FEATURE_V8_4 0x000000800ULL /* ARMv8.4 processors. */ |
typedef uint32_t aarch64_insn |
typedef struct aarch64_inst aarch64_inst |
typedef struct aarch64_opcode aarch64_opcode |
typedef struct aarch64_operand_error aarch64_operand_error |
typedef struct aarch64_opnd_info aarch64_opnd_info |
typedef aarch64_opnd_qualifier_t aarch64_opnd_qualifier_seq_t[AARCH64_MAX_OPND_NUM] |
typedef unsigned char aarch64_opnd_qualifier_t |
enum aarch64_insn_class |
Definition at line 453 of file aarch64.h.
Definition at line 876 of file aarch64.h.
enum aarch64_op |
Definition at line 545 of file aarch64.h.
Definition at line 123 of file aarch64.h.
Definition at line 1092 of file aarch64.h.
enum aarch64_opnd |
Definition at line 144 of file aarch64.h.
Definition at line 377 of file aarch64.h.
int aarch64_decode_insn | ( | aarch64_insn | insn, |
aarch64_inst * | inst, | ||
bfd_boolean | noaliases_p, | ||
aarch64_operand_error * | errors | ||
) |
Definition at line 2958 of file aarch64-dis.c.
References aarch64_find_next_opcode(), aarch64_opcode_decode(), aarch64_opcode_lookup(), DEBUG_TRACE, ERR_OK, ERR_UND, NULL, printf(), and autogen_x86imm::tmp.
Referenced by print_insn_aarch64_word().
bfd_boolean aarch64_extend_operator_p | ( | enum | aarch64_modifier_kind | ) |
Definition at line 430 of file aarch64-opc.c.
References AARCH64_MOD_LSL, AARCH64_MOD_SXTX, FALSE, and TRUE.
Referenced by operand_general_constraint_met_p().
aarch64_opnd_qualifier_t aarch64_get_expected_qualifier | ( | const aarch64_opnd_qualifier_seq_t * | qseq_list, |
int | idx, | ||
const | aarch64_opnd_qualifier_t, | ||
int | known_idx | ||
) |
Definition at line 621 of file aarch64-opc.c.
References AARCH64_MAX_QLF_SEQ_NUM, AARCH64_OPND_NIL, assert(), i, and setup::idx.
const aarch64_opcode* aarch64_get_opcode | ( | enum | aarch64_op | ) |
Definition at line 318 of file aarch64-opc-2.c.
References aarch64_opcode_table, op, and op_enum_table.
enum aarch64_operand_class aarch64_get_operand_class | ( | enum | aarch64_opnd | ) |
Definition at line 205 of file aarch64-opc.c.
Referenced by aarch64_ext_regrt_sysins(), aarch64_stack_pointer_p(), aarch64_zero_register_p(), do_special_decoding(), operand_general_constraint_met_p(), select_operand_for_fptype_field_coding(), select_operand_for_scalar_size_field_coding(), and select_operand_for_sf_field_coding().
const char* aarch64_get_operand_desc | ( | enum | aarch64_opnd | ) |
Definition at line 342 of file aarch64-opc.c.
References aarch64_operands, aarch64_operand::desc, and type.
enum aarch64_modifier_kind aarch64_get_operand_modifier | ( | const struct aarch64_name_value_pair * | desc | ) |
Definition at line 376 of file aarch64-opc.c.
References aarch64_conds, and cond.
const char* aarch64_get_operand_name | ( | enum | aarch64_opnd | ) |
Definition at line 334 of file aarch64-opc.c.
References aarch64_operands, aarch64_operand::name, and type.
unsigned char aarch64_get_qualifier_esize | ( | aarch64_opnd_qualifier_t | qualifier | ) |
Definition at line 766 of file aarch64-opc.c.
References aarch64_opnd_qualifiers, assert(), operand_qualifier_data::data0, operand_variant_qualifier_p(), and TRUE.
Referenced by aarch64_ext_addr_regoff(), aarch64_ext_addr_simm(), aarch64_ext_addr_uimm12(), aarch64_ext_advsimd_imm_modified(), aarch64_ext_limm(), aarch64_ext_reglane(), aarch64_ext_simd_addr_post(), aarch64_ext_sve_limm_mov(), aarch64_print_operand(), get_int_reg_name(), operand_general_constraint_met_p(), and select_operand_for_scalar_size_field_coding().
int aarch64_num_of_operands | ( | const aarch64_opcode * | opcode | ) |
Definition at line 842 of file aarch64-opc.c.
References AARCH64_MAX_OPND_NUM, AARCH64_OPND_NIL, assert(), i, and aarch64_opcode::operands.
Referenced by aarch64_find_best_match(), determine_disassembling_preference(), and match_operands_qualifier().
int aarch64_opcode_encode | ( | const aarch64_opcode * | , |
const aarch64_inst * | , | ||
aarch64_insn * | , | ||
aarch64_opnd_qualifier_t * | , | ||
aarch64_operand_error * | |||
) |
int aarch64_operand_index | ( | const enum aarch64_opnd * | operands, |
enum | aarch64_opnd | ||
) |
Definition at line 2736 of file aarch64-opc.c.
References AARCH64_MAX_OPND_NUM, AARCH64_OPND_NIL, and i.
Referenced by do_special_decoding().
void aarch64_print_operand | ( | char * | , |
size_t | , | ||
bfd_vma | , | ||
const aarch64_opcode * | , | ||
const aarch64_opnd_info * | , | ||
int | , | ||
int * | , | ||
bfd_vma * | , | ||
char ** | |||
) |
bfd_boolean aarch64_pstatefield_supported_p | ( | const | aarch64_feature_set, |
const aarch64_sys_reg * | reg | ||
) |
Definition at line 4293 of file aarch64-opc.c.
References AARCH64_CPU_HAS_FEATURE, AARCH64_FEATURE_PAN, AARCH64_FEATURE_V8_2, AARCH64_FEATURE_V8_4, F_ARCHEXT, FALSE, features, reg, and TRUE.
const aarch64_opcode* aarch64_replace_opcode | ( | struct aarch64_inst * | inst, |
const aarch64_opcode * | opcode | ||
) |
Definition at line 2715 of file aarch64-opc.c.
References AARCH64_MAX_OPND_NUM, AARCH64_OPND_NIL, DEBUG_TRACE, i, aarch64_opcode::name, aarch64_inst::opcode, aarch64_opcode::operands, aarch64_inst::operands, and aarch64_opnd_info::type.
Referenced by determine_disassembling_preference().
int aarch64_stack_pointer_p | ( | const aarch64_opnd_info * | operand | ) |
Definition at line 562 of file aarch64-opc.c.
References aarch64_get_operand_class(), aarch64_operands, AARCH64_OPND_CLASS_INT_REG, and operand_maybe_stack_pointer().
Referenced by aarch64_print_operand(), operand_also_qualified_p(), and operand_general_constraint_met_p().
bfd_boolean aarch64_sve_dupm_mov_immediate_p | ( | uint64_t | uvalue, |
int | esize | ||
) |
Definition at line 4521 of file aarch64-opc.c.
References FALSE.
Referenced by aarch64_ext_sve_limm_mov(), and operand_general_constraint_met_p().
bfd_boolean aarch64_sys_ins_reg_has_xt | ( | const aarch64_sys_ins_reg * | sys_ins_reg | ) |
Definition at line 4445 of file aarch64-opc.c.
References F_HASXT, and aarch64_sys_ins_reg::flags.
Referenced by aarch64_ext_regrt_sysins(), aarch64_ext_sysins_op(), and operand_general_constraint_met_p().
bfd_boolean aarch64_sys_ins_reg_supported_p | ( | const | aarch64_feature_set, |
const aarch64_sys_ins_reg * | reg | ||
) |
Definition at line 4451 of file aarch64-opc.c.
References AARCH64_CPU_HAS_FEATURE, AARCH64_FEATURE_V8_2, C12, C7, C9, CPENS, F_ARCHEXT, FALSE, features, reg, and TRUE.
bfd_boolean aarch64_sys_reg_deprecated_p | ( | const aarch64_sys_reg * | reg | ) |
Definition at line 4067 of file aarch64-opc.c.
References F_DEPRECATED, and reg.
Referenced by aarch64_print_operand().
bfd_boolean aarch64_sys_reg_supported_p | ( | const | aarch64_feature_set, |
const aarch64_sys_reg * | reg | ||
) |
Definition at line 4073 of file aarch64-opc.c.
References AARCH64_CPU_HAS_FEATURE, AARCH64_FEATURE_PAN, AARCH64_FEATURE_PROFILE, AARCH64_FEATURE_RAS, AARCH64_FEATURE_SVE, AARCH64_FEATURE_V8_1, AARCH64_FEATURE_V8_2, AARCH64_FEATURE_V8_3, AARCH64_FEATURE_V8_4, C0, C1, C10, C12, C13, C14, C2, C3, C4, C5, C6, C7, C8, C9, CPEN_, CPENC, CPENS, F_ARCHEXT, FALSE, features, reg, and TRUE.
int aarch64_zero_register_p | ( | const aarch64_opnd_info * | operand | ) |
Definition at line 572 of file aarch64-opc.c.
References aarch64_get_operand_class(), aarch64_operands, AARCH64_OPND_CLASS_INT_REG, and operand_maybe_stack_pointer().
|
inlinestatic |
Definition at line 780 of file aarch64.h.
References F_ALIAS, FALSE, aarch64_opcode::opcode, and TRUE.
Referenced by determine_disassembling_preference().
|
inlinestatic |
const aarch64_cond* get_cond_from_value | ( | aarch64_insn | value | ) |
Definition at line 369 of file aarch64-opc.c.
References aarch64_conds, assert(), int, and value.
Referenced by aarch64_ext_cond(), and do_special_decoding().
const aarch64_cond* get_inverted_cond | ( | const aarch64_cond * | cond | ) |
Definition at line 376 of file aarch64-opc.c.
Referenced by convert_csinc_to_cset(), and convert_from_csel().
|
inlinestatic |
Definition at line 818 of file aarch64.h.
References aarch64_opcode::opcode.
Referenced by aarch64_ext_ldst_elemlist(), aarch64_ext_ldst_reglist(), aarch64_ext_ldst_reglist_r(), aarch64_ext_simd_addr_post(), aarch64_ext_sve_reglist(), and operand_general_constraint_met_p().
|
inlinestatic |
Definition at line 812 of file aarch64.h.
References aarch64_opcode::opcode.
Referenced by aarch64_print_operand().
|
inlinestatic |
Definition at line 786 of file aarch64.h.
References F_HAS_ALIAS, FALSE, aarch64_opcode::opcode, and TRUE.
Referenced by determine_disassembling_preference().
|
inlinestatic |
Definition at line 824 of file aarch64.h.
References F_COND, F_FPTYPE, F_GPRSIZE_IN_Q, F_LDS_SIZE, F_LSE_SZ, F_MISC, F_N, F_SF, F_SIZEQ, F_SSIZE, F_T, FALSE, aarch64_opcode::opcode, and TRUE.
Referenced by aarch64_opcode_decode().
|
inlinestatic |
Definition at line 793 of file aarch64.h.
References aarch64_opcode::opcode.
|
inlinestatic |
Definition at line 805 of file aarch64.h.
References FALSE, setup::idx, aarch64_opcode::opcode, and TRUE.
Referenced by aarch64_print_operand().
|
inlinestatic |
Definition at line 799 of file aarch64.h.
References F_PSEUDO, FALSE, aarch64_opcode::opcode, and TRUE.
Referenced by determine_disassembling_preference().
|
extern |
Definition at line 437 of file aarch64-opc.c.
Referenced by aarch64_ext_barrier().
|
extern |
Definition at line 348 of file aarch64-opc.c.
Referenced by aarch64_get_operand_modifier(), and get_cond_from_value().
|
extern |
Definition at line 437 of file aarch64-opc.c.
Referenced by aarch64_ext_hint().
|
extern |
Definition at line 2162 of file aarch64-tbl.h.
Referenced by aarch64_find_alias_opcode(), aarch64_find_next_alias_opcode(), aarch64_find_next_opcode(), aarch64_get_opcode(), and aarch64_opcode_lookup().
|
extern |
Definition at line 376 of file aarch64-opc.c.
Referenced by aarch64_get_operand_modifier_from_value(), aarch64_print_operand(), and print_register_offset_address().
|
extern |
Definition at line 437 of file aarch64-opc.c.
Referenced by aarch64_ext_prfop().
|
extern |
Definition at line 4281 of file aarch64-opc.c.
Referenced by aarch64_ext_pstatefield(), and aarch64_print_operand().
Definition at line 43 of file aarch64-opc.c.
Referenced by aarch64_print_operand().
Definition at line 84 of file aarch64-opc.c.
Referenced by aarch64_print_operand().
|
extern |
Definition at line 3673 of file aarch64-opc.c.
Referenced by aarch64_print_operand().
|
extern |
Definition at line 4339 of file aarch64-opc.c.
Referenced by aarch64_ext_sysins_op().
|
extern |
Definition at line 4325 of file aarch64-opc.c.
Referenced by aarch64_ext_sysins_op().
|
extern |
Definition at line 4317 of file aarch64-opc.c.
Referenced by aarch64_ext_sysins_op().
|
extern |
Definition at line 4358 of file aarch64-opc.c.
Referenced by aarch64_ext_sysins_op().