26 #include "libiberty.h"
33 #if !defined(EMBEDDED_ENV)
34 #define SYMTAB_AVAILABLE 1
83 "error allocating memory...broken disassembler\n");
89 bucket = &((*bucket)->next);
96 #ifdef DEBUG_HASHTABLE
100 printf (
"index: 0x%02X ops: ",
i);
101 while (tmp_hash !=
NULL)
104 tmp_hash = tmp_hash->
next;
112 printf (
"index: 0x%02X ops: ",
i);
113 while (tmp_hash !=
NULL)
116 tmp_hash = tmp_hash->
next;
138 if (
entry->opcode->match == (opcode &
entry->opcode->mask)) {
139 return entry->opcode;
146 if (
entry->opcode->match == (opcode &
entry->opcode->mask)) {
147 return entry->opcode;
156 #define NUMREGNAMES 32
203 unsigned long opcode,
bfd_vma address,
214 (*
info->fprintf_func) (
info->stream,
"%c", *argptr);
226 (*
info->fprintf_func) (
info->stream,
"%s", reg_base[
i].
name);
228 (*
info->fprintf_func) (
info->stream,
"unknown");
241 (*
info->fprintf_func) (
info->stream,
"%s", reg_base[
i].
name);
243 (*
info->fprintf_func) (
info->stream,
"unknown");
256 (*
info->fprintf_func) (
info->stream,
"%s", reg_base[
i].
name);
258 (*
info->fprintf_func) (
info->stream,
"unknown");
264 (*
info->fprintf_func) (
info->stream,
"%ld",
i);
269 (*
info->fprintf_func) (
info->stream,
"%ld",
i);
274 address = address + 4 +
i;
275 (*
info->print_address_func) (address,
info);
280 (*
info->fprintf_func) (
info->stream,
"%ld",
i);
285 (*
info->fprintf_func) (
info->stream,
"%ld",
i);
291 (*
info->fprintf_func) (
info->stream,
"%lu",
i);
298 address = (address & 0xf0000000) | (
i << 2);
299 (*
info->print_address_func) (address,
info);
305 (*
info->fprintf_func) (
info->stream,
"%s", reg_base[
i].
name);
309 (*
info->fprintf_func) (
info->stream,
"%ld",
i);
312 (*
info->fprintf_func) (
info->stream,
"unknown");
328 info->display_endian =
info->endian;
329 info->insn_info_valid = 1;
330 info->branch_delay_insns = 0;
351 (*
info->fprintf_func) (
info->stream,
"nop");
354 (*
info->fprintf_func) (
info->stream,
"%s",
op->name);
357 (*
info->fprintf_func) (
info->stream,
"%s",
op->name);
362 const char *argstr =
op->args;
363 if (argstr !=
NULL && *argstr !=
'\0')
365 (*
info->fprintf_func) (
info->stream,
" ");
366 while (*argstr !=
'\0')
378 (*
info->fprintf_func) (
info->stream,
"0x%lx", opcode);
RzBinInfo * info(RzBinFile *bf)
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags long
#define OP(v, w, x, y, z)
void * malloc(size_t size)
static const char struct stat static buf struct stat static buf static vhangup int status
assert(limit<=UINT32_MAX/2)
BFD_HOST_U_64_BIT bfd_vma
static bfd_vma bfd_getb32(const void *p)
static bfd_vma bfd_getl32(const void *p)
static struct nios2_reg * nios2_coprocessor_regs(void)
static void nios2_init_opcode_hash(void)
static nios2_opcode_hash * nios2_ps_hash[(OP_MASK_OP)+1]
static int nios2_disassemble(bfd_vma address, unsigned long opcode, disassemble_info *info)
static bfd_boolean nios2_hash_init
static nios2_opcode_hash * nios2_hash[(OP_MASK_OP)+1]
struct _nios2_opcode_hash nios2_opcode_hash
const struct nios2_opcode * nios2_find_opcode_hash(unsigned long opcode)
static int nios2_print_insn_arg(const char *argptr, unsigned long opcode, bfd_vma address, disassemble_info *info)
int print_insn_little_nios2(bfd_vma address, disassemble_info *info)
static struct nios2_reg * nios2_control_regs(void)
static int print_insn_nios2(bfd_vma address, disassemble_info *info, enum bfd_endian endianness)
int print_insn_big_nios2(bfd_vma address, disassemble_info *info)
struct nios2_reg * nios2_regs
#define GET_INSN_FIELD(X, i)
#define NIOS2_INSN_MACRO_MOV
#define NIOS2_INSN_MACRO_MOVI
struct nios2_opcode * nios2_opcodes
struct _nios2_opcode_hash * next
const struct nios2_opcode * opcode