Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdlib.h>
#include <string.h>
#include "disas-asm.h"
#include "sysdep.h"
#include "opcode/cris.h"
#include "libiberty.h"
Go to the source code of this file.
Classes | |
struct | cris_disasm_data |
Macros | |
#define | MAX_BYTES_PER_CRIS_INSN 8 |
#define | PARSE_PREFIX 1 |
#define | REGISTER_PREFIX_CHAR '$' |
#define | TRACE_CASE (disdata->trace_case) |
#define | CR16_SUPPORTS_CPU 0 |
Enumerations | |
enum | cris_disass_family { cris_dis_v0_v10 , cris_dis_common_v10_v32 , cris_dis_v32 } |
Variables | |
static long | case_offset = 0 |
static long | case_offset_counter = 0 |
static long | no_of_case_offsets = 0 |
static long | last_immediate = 0 |
#define CR16_SUPPORTS_CPU 0 |
Definition at line 1633 of file cris-dis.c.
#define MAX_BYTES_PER_CRIS_INSN 8 |
Definition at line 35 of file cris-dis.c.
#define PARSE_PREFIX 1 |
Definition at line 41 of file cris-dis.c.
#define REGISTER_PREFIX_CHAR '$' |
Definition at line 45 of file cris-dis.c.
#define TRACE_CASE (disdata->trace_case) |
Definition at line 69 of file cris-dis.c.
enum cris_disass_family |
Enumerator | |
---|---|
cris_dis_v0_v10 | |
cris_dis_common_v10_v32 | |
cris_dis_v32 |
Definition at line 72 of file cris-dis.c.
|
static |
Definition at line 632 of file cris-dis.c.
References cris_opcode::args, cris_dis_v32, cris_opcode::imm_oprnd_size, cris_spec_reg::reg_size, s, SIZE_FIX_32, SIZE_SPEC_REG, and spec_reg_info().
Referenced by print_insn_cris_generic().
|
static |
Referenced by get_opcode_entry().
|
static |
Definition at line 386 of file cris-dis.c.
References BDAP_QUICK_OPCODE, cris_dis_v0_v10, test_evm::cs, DIP_OPCODE, cris_disasm_data::distype, get_opcode_entry(), cris_opcode::match, NO_CRIS_PREFIX, NULL, cris_spec_reg::reg_size, s, spec_reg_info(), and autogen_x86imm::tmp.
disassembler_ftype cris_get_disassembler | ( | bfd * | abfd | ) |
Definition at line 1635 of file cris-dis.c.
References bfd_get_symbol_leading_char, print_insn_cris_with_register_prefix(), print_insn_cris_without_register_prefix(), print_insn_crisv10_v32_with_register_prefix(), print_insn_crisv10_v32_without_register_prefix(), print_insn_crisv32_with_register_prefix(), and print_insn_crisv32_without_register_prefix().
bfd_boolean cris_parse_disassembler_options | ( | disassemble_info * | info, |
enum cris_disass_family | distype | ||
) |
Definition at line 106 of file cris-dis.c.
References calloc(), cris_disasm_data::distype, FALSE, if(), info(), cris_disasm_data::trace_case, and TRUE.
Referenced by print_insn_cris_with_register_prefix(), print_insn_cris_without_register_prefix(), print_insn_crisv10_v32_with_register_prefix(), print_insn_crisv10_v32_without_register_prefix(), print_insn_crisv32_with_register_prefix(), and print_insn_crisv32_without_register_prefix().
Definition at line 557 of file cris-dis.c.
References last_immediate, cris_spec_reg::number, and sprintf.
Referenced by print_with_operands().
|
static |
Definition at line 535 of file cris-dis.c.
References last_immediate, cris_spec_reg::number, sprintf, and TRACE_CASE.
Referenced by print_with_operands().
|
static |
Definition at line 568 of file cris-dis.c.
References cris_dis_v32, cris_disasm_data::distype, REGISTER_PREFIX_CHAR, and sprintf.
Referenced by print_with_operands().
|
static |
Definition at line 605 of file cris-dis.c.
References cris_support_regs, i, cris_support_reg::name, NULL, cris_spec_reg::number, REGISTER_PREFIX_CHAR, and sprintf.
Referenced by print_with_operands().
|
static |
Definition at line 174 of file cris-dis.c.
References cris_opcode::applicable_version, cris_opcode::args, BDAP_QUICK_OPCODE, calloc(), cris_constraint(), cris_dis_v32, cris_opcodes, cris_ver_sim_v0_10, cris_ver_v0_10, cris_ver_v0_3, cris_ver_v10, cris_ver_v10p, cris_ver_v32p, cris_ver_v3_10, cris_ver_v3p, cris_ver_v8, cris_ver_v8_10, cris_ver_v8p, cris_ver_version_all, cris_ver_warning, DIP_OPCODE, cris_disasm_data::distype, cris_opcode::lose, cris_opcode::match, cris_opcode::name, NO_CRIS_PREFIX, NULL, and number_of_bits().
Referenced by cris_constraint(), and print_insn_cris_generic().
|
static |
Definition at line 680 of file cris-dis.c.
References cris_dis_v32, cris_disasm_data::distype, disasm_mc::fnames, and i.
Referenced by print_with_operands().
int print_insn_cris_generic | ( | bfd_vma | memaddr, |
disassemble_info * | info, | ||
bfd_boolean | with_reg_prefix | ||
) |
Definition at line 1387 of file cris-dis.c.
References addr, cris_opcode::args, BFD_ENDIAN_BIG, bytes_to_skip(), case_offset, case_offset_counter, cris_dis_v32, dis_nonbranch, dis_noninsn, cris_disasm_data::distype, get_opcode_entry(), info(), long, MAX_BYTES_PER_CRIS_INSN, memset(), nbytes, NO_CRIS_PREFIX, no_of_case_offsets, NULL, PARSE_PREFIX, print_with_operands(), status, and TRACE_CASE.
Referenced by print_insn_cris_with_register_prefix(), print_insn_cris_without_register_prefix(), print_insn_crisv10_v32_with_register_prefix(), print_insn_crisv10_v32_without_register_prefix(), print_insn_crisv32_with_register_prefix(), and print_insn_crisv32_without_register_prefix().
int print_insn_cris_with_register_prefix | ( | bfd_vma | vma, |
disassemble_info * | info | ||
) |
Definition at line 1557 of file cris-dis.c.
References cris_dis_v0_v10, cris_parse_disassembler_options(), info(), print_insn_cris_generic(), and TRUE.
Referenced by cris_get_disassembler(), and disassemble().
int print_insn_cris_without_register_prefix | ( | bfd_vma | vma, |
disassemble_info * | info | ||
) |
Definition at line 1594 of file cris-dis.c.
References cris_dis_v0_v10, cris_parse_disassembler_options(), FALSE, info(), and print_insn_cris_generic().
Referenced by cris_get_disassembler(), and disassemble().
int print_insn_crisv10_v32_with_register_prefix | ( | bfd_vma | vma, |
disassemble_info * | info | ||
) |
Definition at line 1582 of file cris-dis.c.
References cris_dis_common_v10_v32, cris_parse_disassembler_options(), info(), print_insn_cris_generic(), and TRUE.
Referenced by cris_get_disassembler(), and disassemble().
int print_insn_crisv10_v32_without_register_prefix | ( | bfd_vma | vma, |
disassemble_info * | info | ||
) |
Definition at line 1619 of file cris-dis.c.
References cris_dis_common_v10_v32, cris_parse_disassembler_options(), FALSE, info(), and print_insn_cris_generic().
Referenced by cris_get_disassembler(), and disassemble().
int print_insn_crisv32_with_register_prefix | ( | bfd_vma | vma, |
disassemble_info * | info | ||
) |
Definition at line 1569 of file cris-dis.c.
References cris_dis_v32, cris_parse_disassembler_options(), info(), print_insn_cris_generic(), and TRUE.
Referenced by cris_get_disassembler(), and disassemble().
int print_insn_crisv32_without_register_prefix | ( | bfd_vma | vma, |
disassemble_info * | info | ||
) |
Definition at line 1606 of file cris-dis.c.
References cris_dis_v32, cris_parse_disassembler_options(), FALSE, info(), and print_insn_cris_generic().
Referenced by cris_get_disassembler(), and disassemble().
|
static |
Definition at line 709 of file cris-dis.c.
References addr, cris_opcode::args, BA_PC_INCR_OPCODE, BA_QUICK_OPCODE, BDAP_INDIR_OPCODE, BDAP_QUICK_OPCODE, BIAP_OPCODE, BRANCH_INCR_HIGH, BRANCH_PC_LOW, case_offset, case_offset_counter, CONST_STRNEQ, cris_cc_strings, CRIS_DIS_FLAG_MEM_TARGET2_IS_REG, CRIS_DIS_FLAG_MEM_TARGET2_MEM, CRIS_DIS_FLAG_MEM_TARGET2_MEM_BYTE, CRIS_DIS_FLAG_MEM_TARGET2_MEM_WORD, CRIS_DIS_FLAG_MEM_TARGET2_MULT2, CRIS_DIS_FLAG_MEM_TARGET2_MULT4, CRIS_DIS_FLAG_MEM_TARGET_IS_REG, CRIS_DIS_FLAG_MEMREF, cris_dis_v32, test_evm::cs, cris_opcode::delayed, DIP_OPCODE, dis_branch, dis_condbranch, dis_dref, dis_jsr, dis_nonbranch, cris_disasm_data::distype, format_dec(), format_hex(), format_reg(), format_sup_reg(), cris_opcode::imm_oprnd_size, info(), last_immediate, cris_opcode::match, cris_spec_reg::name, cris_opcode::name, nbytes, no_of_case_offsets, NULL, cris_spec_reg::number, print_flags(), cris_spec_reg::reg_size, REGISTER_PREFIX_CHAR, s, SIZE_FIX_32, SIZE_SPEC_REG, spec_reg_info(), and TRACE_CASE.
Referenced by print_insn_cris_generic().
|
static |
Definition at line 126 of file cris-dis.c.
References cris_spec_reg::applicable_version, cris_dis_v32, cris_spec_regs, cris_ver_v10p, cris_ver_v32p, cris_ver_v3p, cris_ver_v8p, cris_ver_version_all, cris_ver_warning, i, cris_spec_reg::name, NULL, cris_spec_reg::number, and cris_spec_reg::warning.
Referenced by bytes_to_skip(), cris_constraint(), and print_with_operands().
|
static |
Definition at line 88 of file cris-dis.c.
Referenced by print_insn_cris_generic(), and print_with_operands().
|
static |
Definition at line 91 of file cris-dis.c.
Referenced by print_insn_cris_generic(), and print_with_operands().
|
static |
Definition at line 97 of file cris-dis.c.
Referenced by format_dec(), format_hex(), and print_with_operands().
|
static |
Definition at line 94 of file cris-dis.c.
Referenced by print_insn_cris_generic(), and print_with_operands().