Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "ansidecl.h"
#include "sysdep.h"
#include "disas-asm.h"
#include "libiberty.h"
#include "elf/mips.h"
#include "opintl.h"
#include "opcode/mips.h"
#include "elf-bfd.h"
Go to the source code of this file.
Classes | |
struct | mips_cp0sel_name |
struct | mips_abi_choice |
struct | mips_arch_choice |
Macros | |
#define | SYMTAB_AVAILABLE 1 |
#define | INSNLEN 4 |
#define | mips16_reg_names(rn) mips_gpr_names[mips16_to_32_reg_map[rn]] |
#define INSNLEN 4 |
Definition at line 46 of file mips-dis.c.
#define mips16_reg_names | ( | rn | ) | mips_gpr_names[mips16_to_32_reg_map[rn]] |
Definition at line 64 of file mips-dis.c.
#define SYMTAB_AVAILABLE 1 |
Definition at line 41 of file mips-dis.c.
|
static |
Definition at line 2053 of file mips-dis.c.
References BFD_ENDIAN_BIG, bfd_getb32(), bfd_getl32(), bfd_mach_mips16, bfd_target_elf_flavour, info(), INSNLEN, long, NULL, parse_mips_dis_options(), print_insn_mips(), print_insn_mips16(), set_default_mips_dis_options(), status, and STO_MIPS16.
Referenced by print_insn_big_mips(), and print_insn_little_mips().
|
static |
Definition at line 465 of file mips-dis.c.
References ARRAY_SIZE, c, i, mips_abi_choices, and NULL.
Referenced by parse_mips_dis_option().
|
static |
Definition at line 480 of file mips-dis.c.
References ARRAY_SIZE, c, i, mips_arch_choices, and NULL.
Referenced by parse_mips_dis_option().
|
static |
Definition at line 495 of file mips-dis.c.
References ARRAY_SIZE, mips_arch_choice::bfd_mach, mips_arch_choice::bfd_mach_valid, c, i, mips_arch_choices, and NULL.
Referenced by set_default_mips_dis_options().
|
static |
Definition at line 524 of file mips-dis.c.
References EF_MIPS_ABI2, EI_CLASS, ELFCLASS64, and header.
Referenced by set_default_mips_dis_options().
|
static |
Definition at line 736 of file mips-dis.c.
References mips_cp0sel_name::cp0reg, i, len, NULL, and sel().
Referenced by print_insn_args().
Definition at line 588 of file mips-dis.c.
References choose_abi_by_name(), choose_arch_by_name(), mips_arch_choice::cp0_names, mips_arch_choice::cp0sel_names, mips_arch_choice::cp0sel_names_len, mips_abi_choice::fpr_names, mips_abi_choice::gpr_names, mips_arch_choice::hwr_names, i, len, mips_cp0_names, mips_cp0sel_names, mips_cp0sel_names_len, mips_fpr_names, mips_gpr_names, mips_hwr_names, NULL, and val.
Referenced by parse_mips_dis_options().
void parse_mips_dis_options | ( | const char * | options | ) |
Definition at line 704 of file mips-dis.c.
References options, and parse_mips_dis_option().
Referenced by _print_insn_mips().
|
static |
Definition at line 754 of file mips-dis.c.
References _, mips_cp0sel_name::cp0reg, d, delta, FP_D, FP_S, info(), INSNLEN, lookup_mips_cp0sel_name(), mips_cp0_names, mips_cp0sel_names, mips_cp0sel_names_len, mips_fpr_names, mips_gpr_names, mips_hwr_names, n, NULL, op, OP_MASK_ALN, OP_MASK_BCC, OP_MASK_BP, OP_MASK_CACHE, OP_MASK_CCC, OP_MASK_CODE, OP_MASK_CODE19, OP_MASK_CODE2, OP_MASK_CODE20, OP_MASK_COPZ, OP_MASK_DELTA, OP_MASK_DSPACC, OP_MASK_DSPACC_S, OP_MASK_DSPSFT, OP_MASK_DSPSFT_7, OP_MASK_EXTMSBD, OP_MASK_FD, OP_MASK_FR, OP_MASK_FS, OP_MASK_FT, OP_MASK_IMM10, OP_MASK_IMM8, OP_MASK_IMMEDIATE, OP_MASK_INSMSB, OP_MASK_MT_H, OP_MASK_MT_U, OP_MASK_MTACC_D, OP_MASK_MTACC_T, OP_MASK_OP, OP_MASK_PERFREG, OP_MASK_PREFX, OP_MASK_RD, OP_MASK_RDDSP, OP_MASK_RS, OP_MASK_RT, OP_MASK_SA3, OP_MASK_SA4, OP_MASK_SEL, OP_MASK_SHAMT, OP_MASK_TARGET, OP_MASK_UDI1, OP_MASK_UDI2, OP_MASK_UDI3, OP_MASK_UDI4, OP_MASK_VECALIGN, OP_MASK_VECBYTE, OP_MASK_VSEL, OP_MASK_WRDSP, OP_OP_COP0, OP_SH_ALN, OP_SH_BCC, OP_SH_BP, OP_SH_CACHE, OP_SH_CCC, OP_SH_CODE, OP_SH_CODE19, OP_SH_CODE2, OP_SH_CODE20, OP_SH_COPZ, OP_SH_DELTA, OP_SH_DSPACC, OP_SH_DSPACC_S, OP_SH_DSPSFT, OP_SH_DSPSFT_7, OP_SH_EXTMSBD, OP_SH_FD, OP_SH_FR, OP_SH_FS, OP_SH_FT, OP_SH_IMM10, OP_SH_IMM8, OP_SH_IMMEDIATE, OP_SH_INSMSB, OP_SH_MT_H, OP_SH_MT_U, OP_SH_MTACC_D, OP_SH_MTACC_T, OP_SH_OP, OP_SH_PERFREG, OP_SH_PREFX, OP_SH_RD, OP_SH_RDDSP, OP_SH_RS, OP_SH_RT, OP_SH_SA3, OP_SH_SA4, OP_SH_SEL, OP_SH_SHAMT, OP_SH_TARGET, OP_SH_UDI1, OP_SH_UDI2, OP_SH_UDI3, OP_SH_UDI4, OP_SH_VECALIGN, OP_SH_VECBYTE, OP_SH_VSEL, OP_SH_WRDSP, pc, mips_opcode::pinfo, reg, and sel().
Referenced by print_insn_mips().
int print_insn_big_mips | ( | bfd_vma | memaddr, |
struct disassemble_info * | info | ||
) |
Definition at line 2098 of file mips-dis.c.
References _print_insn_mips(), BFD_ENDIAN_BIG, and info().
Referenced by disassemble().
int print_insn_little_mips | ( | bfd_vma | memaddr, |
struct disassemble_info * | info | ||
) |
Definition at line 2104 of file mips-dis.c.
References _print_insn_mips(), BFD_ENDIAN_LITTLE, and info().
Referenced by disassemble().
|
static |
Definition at line 1276 of file mips-dis.c.
References d, dis_branch, dis_condbranch, dis_condjsr, dis_dref, dis_jsr, dis_nonbranch, dis_noninsn, i, info(), init, INSN2_ALIAS, INSN_COND_BRANCH_DELAY, INSN_COND_BRANCH_LIKELY, INSN_LOAD_MEMORY_DELAY, INSN_MACRO, INSN_STORE_MEMORY, INSN_UNCOND_BRANCH_DELAY, INSN_WRITE_GPR_31, INSNLEN, mips_isa, mips_opcodes, mips_processor, no_aliases, NULL, NUMOPCODES, op, OP_MASK_OP, OP_SH_OP, OPCODE_IS_MEMBER, and print_insn_args().
Referenced by _print_insn_mips().
|
static |
Definition at line 1888 of file mips-dis.c.
References BFD_ENDIAN_BIG, bfd_getb16(), bfd_getl16(), bfd_mips16_num_opcodes, dis_branch, dis_jsr, dis_nonbranch, dis_noninsn, extend(), FALSE, info(), INSN2_ALIAS, INSN_MACRO, INSN_UNCOND_BRANCH_DELAY, length, mips16_opcodes, MIPS16OP_MASK_RX, MIPS16OP_MASK_RY, MIPS16OP_MASK_RZ, MIPS16OP_SH_RX, MIPS16OP_SH_RY, MIPS16OP_SH_RZ, no_aliases, NULL, op, print_mips16_insn_arg(), s, status, and TRUE.
Referenced by _print_insn_mips().
|
static |
Definition at line 1376 of file mips-dis.c.
References _, args, baseaddr, BFD_ENDIAN_BIG, bfd_getb16(), bfd_getl16(), bfd_target_unknown_flavour, test-lz4-speed::branch, dis_branch, dis_condbranch, dis_dref, dis_jsr, extend(), i, info(), MIPS16_ALL_ARGS, MIPS16_ALL_STATICS, MIPS16_INSN_READ_PC, MIPS16_INSN_READ_SP, mips16_reg_names, MIPS16OP_EXTRACT_REG32R, MIPS16OP_MASK_IMM11, MIPS16OP_MASK_IMM4, MIPS16OP_MASK_IMM5, MIPS16OP_MASK_IMM6, MIPS16OP_MASK_IMM8, MIPS16OP_MASK_MOVE32Z, MIPS16OP_MASK_REGR32, MIPS16OP_MASK_RX, MIPS16OP_MASK_RY, MIPS16OP_MASK_RZ, MIPS16OP_SH_IMM11, MIPS16OP_SH_IMM4, MIPS16OP_SH_IMM5, MIPS16OP_SH_IMM6, MIPS16OP_SH_IMM8, MIPS16OP_SH_MOVE32Z, MIPS16OP_SH_REGR32, MIPS16OP_SH_RX, MIPS16OP_SH_RY, MIPS16OP_SH_RZ, mips_gpr_names, shift(), status, and type.
Referenced by print_insn_mips16().
void print_mips_disassembler_options | ( | FILE * | stream | ) |
Definition at line 2110 of file mips-dis.c.
References _, ARRAY_SIZE, i, mips_abi_choices, and mips_arch_choices.
|
static |
Definition at line 540 of file mips-dis.c.
References bfd_target_elf_flavour, choose_arch_by_number(), mips_arch_choice::cp0_names, mips_arch_choice::cp0sel_names, mips_arch_choice::cp0sel_names_len, CPU_LOONGSON_2F, elf_elfheader, header, mips_arch_choice::hwr_names, info(), is_newabi(), mips_arch_choice::isa, ISA_MIPS3, mips_cp0_names, mips_cp0_names_numeric, mips_cp0sel_names, mips_cp0sel_names_len, mips_fpr_names, mips_fpr_names_numeric, mips_gpr_names, mips_gpr_names_newabi, mips_gpr_names_oldabi, mips_hwr_names, mips_hwr_names_numeric, mips_isa, mips_processor, no_aliases, NULL, and mips_arch_choice::processor.
Referenced by _print_insn_mips().
Definition at line 59 of file mips-dis.c.
struct mips_abi_choice mips_abi_choices[] |
Definition at line 310 of file mips-dis.c.
Referenced by choose_abi_by_name(), and print_mips_disassembler_options().
const struct mips_arch_choice mips_arch_choices[] |
Definition at line 310 of file mips-dis.c.
Referenced by choose_arch_by_name(), choose_arch_by_number(), and print_mips_disassembler_options().
Definition at line 456 of file mips-dis.c.
Referenced by parse_mips_dis_option(), print_insn_args(), and set_default_mips_dis_options().
Definition at line 131 of file mips-dis.c.
Definition at line 176 of file mips-dis.c.
Definition at line 123 of file mips-dis.c.
Referenced by set_default_mips_dis_options().
Definition at line 265 of file mips-dis.c.
|
static |
Definition at line 457 of file mips-dis.c.
Referenced by parse_mips_dis_option(), print_insn_args(), and set_default_mips_dis_options().
|
static |
Definition at line 458 of file mips-dis.c.
Referenced by parse_mips_dis_option(), print_insn_args(), and set_default_mips_dis_options().
|
static |
Definition at line 131 of file mips-dis.c.
|
static |
Definition at line 176 of file mips-dis.c.
|
static |
Definition at line 265 of file mips-dis.c.
Definition at line 455 of file mips-dis.c.
Referenced by parse_mips_dis_option(), print_insn_args(), and set_default_mips_dis_options().
Definition at line 99 of file mips-dis.c.
Definition at line 115 of file mips-dis.c.
Definition at line 107 of file mips-dis.c.
Definition at line 91 of file mips-dis.c.
Referenced by set_default_mips_dis_options().
Definition at line 454 of file mips-dis.c.
Referenced by parse_mips_dis_option(), print_insn_args(), print_mips16_insn_arg(), and set_default_mips_dis_options().
Definition at line 83 of file mips-dis.c.
Referenced by set_default_mips_dis_options().
Definition at line 67 of file mips-dis.c.
Definition at line 75 of file mips-dis.c.
Referenced by set_default_mips_dis_options().
Definition at line 459 of file mips-dis.c.
Referenced by parse_mips_dis_option(), print_insn_args(), and set_default_mips_dis_options().
Definition at line 310 of file mips-dis.c.
Definition at line 302 of file mips-dis.c.
Referenced by set_default_mips_dis_options().
|
static |
Definition at line 453 of file mips-dis.c.
Referenced by print_insn_mips(), and set_default_mips_dis_options().
|
static |
Definition at line 452 of file mips-dis.c.
Referenced by print_insn_mips(), and set_default_mips_dis_options().
|
static |
Definition at line 462 of file mips-dis.c.
Referenced by print_insn_mips(), print_insn_mips16(), and set_default_mips_dis_options().