Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | arc_opcode |
struct | arc_operand_value |
struct | arc_ext_operand_value |
struct | arc_operand |
Typedefs | |
typedef unsigned int | arc_insn |
Variables | |
struct arc_ext_operand_value * | arc_ext_operands |
const struct arc_operand * | arc_operands |
int | arc_operand_count |
const struct arc_operand_value * | arc_suffixes |
int | arc_suffixes_count |
const struct arc_operand_value * | arc_reg_names |
int | arc_reg_names_count |
unsigned char * | arc_operand_map |
int | arc_cond_p |
int | arc_mach_a4 |
unsigned long | arc_ld_ext_mask |
int | arc_user_mode_only |
#define A | ( | x | ) | (((unsigned) (x) & ARC_MASK_REG) << ARC_SHIFT_REGA) |
#define AC_EXTENDED_MULTIPLY AC_SIMD_EXTENDED |
#define AC_OP1_DEST_IGNORED (AC_SYNTAX_SIMD << 1) |
#define AC_OP1_IMM_IMPLIED (AC_OP1_MUST_BE_IMM << 1) |
#define AC_OP1_MUST_BE_IMM (AC_OP1_DEST_IGNORED << 1) |
#define AC_SIMD_ENCODE_LIMM (AC_SIMD_SCALE_0 << 1) |
#define AC_SIMD_ENCODE_S12 (AC_SUFFIX_LANEMASK << 1) |
#define AC_SIMD_ENCODE_U16 (AC_SIMD_KREG << 1) |
#define AC_SIMD_ENCODE_U6 (AC_SIMD_ENCODE_U8 << 1) |
#define AC_SIMD_ENCODE_U8 (AC_SIMD_FLAG2_SET << 1) |
#define AC_SIMD_ENCODE_ZR (AC_SIMD_ENCODE_U16 << 1) |
#define AC_SIMD_EXTEND1 (AC_SIMD_SETLM << 1) |
#define AC_SIMD_EXTEND2 (AC_SIMD_EXTENDED << 1) |
#define AC_SIMD_EXTEND3 (AC_SIMD_EXTEND2 << 1) |
#define AC_SIMD_EXTENDED (AC_SIMD_ENCODE_LIMM << 1) |
#define AC_SIMD_FLAG1_SET (AC_SIMD_FLAG_SET << 1) |
#define AC_SIMD_FLAG2_SET (AC_SIMD_FLAG1_SET << 1) |
#define AC_SIMD_FLAG_SET (AC_SIMD_FLAGS_NONE << 1) |
#define AC_SIMD_FLAGS_NONE (AC_SUFFIX_FLAG << 1) |
#define AC_SIMD_IREGA (AC_SIMD_SYNTAX_DISC << 1) |
#define AC_SIMD_IREGB (AC_SIMD_IREGA << 1) |
#define AC_SIMD_KREG (AC_SIMD_EXTEND1 << 1) |
#define AC_SIMD_SCALE_0 (AC_SIMD_SCALE_4 << 1) |
#define AC_SIMD_SCALE_1 (AC_SIMD_ENCODE_U6 << 1) |
#define AC_SIMD_SCALE_2 (AC_SIMD_SCALE_1 << 1) |
#define AC_SIMD_SCALE_3 (AC_SIMD_SCALE_2 << 1) |
#define AC_SIMD_SCALE_4 (AC_SIMD_SCALE_3 << 1) |
#define AC_SIMD_SETLM (AC_SIMD_ZERVC << 1) |
#define AC_SIMD_SYNTAX_0 (AC_SIMD_SYNTAX_C << 1) |
#define AC_SIMD_SYNTAX_C (AC_SIMD_SYNTAX_VVI << 1) |
#define AC_SIMD_SYNTAX_C0 (AC_SIMD_SYNTAX_CC << 1) |
#define AC_SIMD_SYNTAX_C00 (AC_SIMD_SYNTAX_VL0 << 1) |
#define AC_SIMD_SYNTAX_CC (AC_SIMD_SYNTAX_0 << 1) |
#define AC_SIMD_SYNTAX_D0 (AC_SIMD_SYNTAX_DC << 1) |
#define AC_SIMD_SYNTAX_DC (AC_SIMD_SYNTAX_C0 << 1) |
#define AC_SIMD_SYNTAX_DISC (AC_OP1_IMM_IMPLIED << 1) |
#define AC_SIMD_SYNTAX_V00 (AC_SIMD_SYNTAX_VbC0 << 1) |
#define AC_SIMD_SYNTAX_Vb00 (AC_SIMD_SYNTAX_VbI0 << 1) |
#define AC_SIMD_SYNTAX_VbC0 (AC_SIMD_SYNTAX_Vb00 << 1) |
#define AC_SIMD_SYNTAX_VbI0 (AC_SIMD_SYNTAX_VV0 << 1) |
#define AC_SIMD_SYNTAX_VC0 (AC_SIMD_SYNTAX_V00 << 1) |
#define AC_SIMD_SYNTAX_VD (AC_SIMD_SYNTAX_D0 << 1) |
#define AC_SIMD_SYNTAX_VL0 (AC_SIMD_SYNTAX_VU0 << 1) |
#define AC_SIMD_SYNTAX_VU0 (AC_SIMD_SYNTAX_VVL << 1) |
#define AC_SIMD_SYNTAX_VV (AC_SIMD_SYNTAX_VVC << 1) |
#define AC_SIMD_SYNTAX_VV0 (AC_SIMD_SYNTAX_VVV << 1) |
#define AC_SIMD_SYNTAX_VVC (AC_SIMD_SYNTAX_VC0 << 1) |
#define AC_SIMD_SYNTAX_VVI (AC_SIMD_SYNTAX_VV << 1) |
#define AC_SIMD_SYNTAX_VVL (AC_SIMD_SYNTAX_VD << 1) |
#define AC_SIMD_SYNTAX_VVV (AC_SIMD_IREGB << 1) |
#define AC_SIMD_ZERVA (AC_SIMD_ENCODE_S12 << 1) |
#define AC_SIMD_ZERVB (AC_SIMD_ZERVA << 1) |
#define AC_SIMD_ZERVC (AC_SIMD_ZERVB << 1) |
#define AC_SUFFIX_COND (AC_SUFFIX_DIRECT << 1) |
#define AC_SUFFIX_DIRECT (AC_SUFFIX_NONE << 1) |
#define AC_SUFFIX_FLAG (AC_SUFFIX_COND << 1) |
#define AC_SUFFIX_LANEMASK (AC_SIMD_EXTEND3 << 1) |
#define AC_SYNTAX_1OP (AC_SYNTAX_2OP << 1) |
#define AC_SYNTAX_2OP (AC_SYNTAX_3OP << 1) |
#define AC_SYNTAX_NOP (AC_SYNTAX_1OP << 1) |
#define AC_SYNTAX_SIMD (AC_SYNTAX_NOP << 1) |
#define ARC_HAVE_CPU | ( | bits | ) | ((bits) & ARC_MACH_CPU_MASK) |
#define ARC_HAVE_MACH | ( | bits | ) | ((bits) & ARC_MACH_MASK) |
#define ARC_MACH_CPU_MASK (ARC_MACH_BIG - 1) |
#define ARC_MACH_MASK ((ARC_MACH_BIG << 1) - 1) |
#define ARC_MOD_P | ( | X | ) | ((X) & ARC_MOD_BITS) |
#define ARC_OPCODE_COND_BRANCH (ARC_OPCODE_FLAG_START) |
#define ARC_OPCODE_CPU | ( | bits | ) | ((bits) & ARC_MACH_CPU_MASK) |
#define ARC_OPCODE_FLAG_START (ARC_MACH_MASK + 1) |
#define ARC_OPCODE_MACH | ( | bits | ) | ((bits) & ARC_MACH_MASK) |
#define ARC_OPVAL_CPU | ( | bits | ) | ((bits) & ARC_MACH_CPU_MASK) |
#define ARC_OPVAL_MACH | ( | bits | ) | ((bits) & ARC_MACH_MASK) |
#define ARC_SIMD_LANEMASK (ARC_SIMD_SCALE4 <<0x1) |
#define ARC_SIMD_REGISTER (ARC_SIMD_LANEMASK <<0x1) |
#define ARC_SIMD_SCALE1 (ARC_INCR_U6 << 0x1) |
#define ARC_SIMD_SCALE2 (ARC_SIMD_SCALE1 << 0x1) |
#define ARC_SIMD_SCALE3 (ARC_SIMD_SCALE2 << 0x1) |
#define ARC_SIMD_SCALE4 (ARC_SIMD_SCALE3 << 0x1) |
#define ARC_SIMD_SETLM (ARC_SIMD_ZERVC <<0x1) |
#define ARC_SIMD_ZERVA (ARC_SIMD_REGISTER <<0x1) |
#define ARC_SIMD_ZERVB (ARC_SIMD_ZERVA <<0x1) |
#define ARC_SIMD_ZERVC (ARC_SIMD_ZERVB <<0x1) |
#define ARCOMPACT (ARC_MACH_ARC5 | ARC_MACH_ARC6 | ARC_MACH_ARC601 | ARC_MACH_ARC7) |
#define B | ( | x | ) | (((unsigned) (x) & ARC_MASK_REG) << ARC_SHIFT_REGB) |
#define C | ( | x | ) | (((unsigned) (x) & ARC_MASK_REG) << ARC_SHIFT_REGC) |
#define OP1_DEST_IGNORED (SYNTAX_NOP << 1) |
#define OP1_IMM_IMPLIED (OP1_MUST_BE_IMM << 1) |
#define OP1_MUST_BE_IMM (OP1_DEST_IGNORED << 1) |
#define SIMD_LONG_INST (SYNTAX_VALID << 1) |
#define SUFFIX_COND (SUFFIX_NONE << 1) |
#define SUFFIX_FLAG (SUFFIX_COND << 1) |
#define SUFFIX_NONE (OP1_IMM_IMPLIED << 1) |
#define SYNTAX_1OP (SYNTAX_2OP << 1) |
#define SYNTAX_2OP (SYNTAX_3OP << 1) |
#define SYNTAX_3OP (SYNTAX_LENGTH ) |
#define SYNTAX_LENGTH (ARC_OPCODE_COND_BRANCH << 1) |
#define SYNTAX_NOP (SYNTAX_1OP << 1) |
#define SYNTAX_VALID (SUFFIX_FLAG << 1) |
Definition at line 4595 of file arc-opc.c.
Referenced by insert_reg().
int ac_constant_operand | ( | const struct arc_operand * | op | ) |
int ac_register_operand | ( | const struct arc_operand * | op | ) |
int ac_symbol_operand | ( | const struct arc_operand * | op | ) |
char* arc_aux_reg_name | ( | int | regVal | ) |
Definition at line 4965 of file arc-opc.c.
References arc_reg_names, arc_reg_names_count, AUXREG_AC, i, arc_operand_value::name, NULL, type, and value.
Referenced by my_sprintf().
Definition at line 4282 of file arc-opc.c.
References ARC_MACH_ARC4, ARC_MACH_ARC5, ARC_MACH_ARC6, ARC_MACH_ARC601, ARC_MACH_ARC7, and ARC_MACH_BIG.
Definition at line 1658 of file arc-opc.c.
References ARC_REG_LIMM, ARC_REG_SHIMM, B, C, and I.
Referenced by insert_st_syntax().
void arc_opcode_init_extract | ( | void | ) |
void arc_opcode_init_insert | ( | void | ) |
Definition at line 4457 of file arc-opc.c.
References addrwb_p, arc_cond_p, flag_p, flagshimm_handled_p, i, jumpflags_p, limm_p, ls_operand, nullify, nullify_p, OP_NONE, OPERANDS, and shimm_p.
Referenced by arc_opcode_init_extract().
void arc_opcode_init_tables | ( | int | flags | ) |
Definition at line 4304 of file arc-opc.c.
References ARC_HASH_ICODE, ARC_HASH_OPCODE, arc_mach_a4, ARC_MACH_ARC7, ARC_OPCODE_CPU, arc_opcodes, arc_operand_map, arc_operand_map_a4, arc_operand_map_ac, arc_operands, arc_operands_a4, arc_operands_ac, arc_reg_names, arc_reg_names_a4, arc_reg_names_a500600, arc_reg_names_a700, arc_reg_names_count, arc_suffixes, arc_suffixes_a4, arc_suffixes_ac, arc_suffixes_count, cpu_type, ELEMENTS_IN, flags, arc_operand::fmt, i, icode_map, int, memset(), arc_opcode::next_asm, arc_opcode::next_dis, opcode_map, benchmark::syntax, and value.
const struct arc_opcode* arc_opcode_lookup_asm | ( | const char * | insn | ) |
Definition at line 4432 of file arc-opc.c.
References ARC_HASH_OPCODE, and opcode_map.
const struct arc_opcode* arc_opcode_lookup_dis | ( | unsigned int | insn | ) |
Definition at line 4441 of file arc-opc.c.
References ARC_HASH_ICODE, and icode_map.
const struct arc_operand_value* arc_opcode_lookup_suffix | ( | const struct arc_operand * | type, |
int | value | ||
) |
Definition at line 4494 of file arc-opc.c.
References arc_ext_operands, arc_operands, arc_suffixes, arc_suffixes_count, test_evm::end, arc_ext_operand_value::next, arc_ext_operand_value::operand, arc_operand_value::type, type, v, arc_operand_value::value, and value.
Referenced by extract_cond(), and extract_flag().
int arc_opcode_supported | ( | const struct arc_opcode * | opcode | ) |
Definition at line 4400 of file arc-opc.c.
References ARC_HAVE_CPU, ARC_OPCODE_CPU, cpu_type, and arc_opcode::flags.
int arc_opval_supported | ( | const struct arc_operand_value * | ) |
int arc_test_wb | ( | void | ) |
struct arc_operand_value* get_ext_suffix | ( | char * | s, |
char | field | ||
) |
Definition at line 4873 of file arc-opc.c.
References ADDRESS12, ADDRESS22_AC, ADDRESS22S_AC, ADDRESS24, ADDRESS3, ADDRESS3_AC, ADDRESS9_AC, arc_ext_operands, arc_mach_a4, CACHEBYPASS11_AC, CACHEBYPASS14, CACHEBYPASS15_AC, CACHEBYPASS26, CACHEBYPASS5, CACHEBYPASS5_AC, COND, COND_AC, test-lz4-speed::default, FLAG, FLAG_AC, JUMPFLAGS, NULL, s, SIGN0, SIGN16_AC, SIGN6_AC, SIGN9, SIZE1, SIZE10, SIZE17_AC, SIZE1_AC, SIZE22, SIZE7_AC, and suffix.
|
extern |
Definition at line 858 of file arc-opc.c.
Referenced by arc_opcode_init_insert(), insert_base(), insert_cond(), insert_forcelimm(), insert_offset(), and insert_reg().
|
extern |
Definition at line 880 of file arc-opc.c.
Referenced by arc_opcode_lookup_suffix(), get_ext_suffix(), and lookup_register().
Definition at line 876 of file arc-opc.c.
Referenced by insert_ex_syntax(), and insert_ld_syntax().
|
extern |
Definition at line 866 of file arc-opc.c.
Referenced by arc_opcode_init_tables(), arc_operand_type(), get_ext_suffix(), insert_addr_wb(), insert_base(), insert_ld_syntax(), insert_offset(), insert_reg(), insert_reladdr(), and insert_st_syntax().
|
extern |
|
extern |
Definition at line 889 of file arc-opc.c.
Referenced by arc_opcode_init_tables(), and extract_ld_offset().
|
extern |
Definition at line 893 of file arc-opc.c.
Referenced by arc_opcode_init_tables(), arc_opcode_lookup_suffix(), extract_ld_offset(), and insert_reg().
|
extern |
Definition at line 4100 of file arc-opc.c.
Referenced by arc_aux_reg_name(), arc_opcode_init_tables(), and lookup_register().
|
extern |
Definition at line 4101 of file arc-opc.c.
Referenced by arc_aux_reg_name(), arc_opcode_init_tables(), and lookup_register().
|
extern |
Definition at line 4264 of file arc-opc.c.
Referenced by arc_opcode_init_tables(), and arc_opcode_lookup_suffix().
|
extern |
Definition at line 4265 of file arc-opc.c.
Referenced by arc_opcode_init_tables(), and arc_opcode_lookup_suffix().
|
extern |
Definition at line 878 of file arc-opc.c.
Referenced by insert_ex_syntax(), and insert_ld_syntax().