25 #include <sys/types.h>
31 #include "libiberty.h"
40 #define MAX(a,b) (((a)) > ((b)) ? ((a)) : ((b)))
48 #define OPCODES_SIGJMP_BUF void*
49 #define OPCODES_SIGSETJMP(buf) nothing()
50 #define OPCODES_SIGLONGJMP(buf,val) nothing()
53 #define OPCODES_SIGJMP_BUF sigjmp_buf
54 #define OPCODES_SIGSETJMP(buf) sigsetjmp((buf), 0)
55 #define OPCODES_SIGLONGJMP(buf,val) siglongjmp((buf), (val))
102 int signed_operand_val;
106 if (operand_val < 0xa) {
107 (*
info->fprintf_func) (
info->stream,
"%u", operand_val);
109 (*
info->fprintf_func) (
info->stream,
"0x%x", operand_val);
115 signed_operand_val = (
int) operand_val;
122 &operand_val, memaddr);
123 info->target = operand_val;
128 if ((signed_operand_val > -256) && (signed_operand_val < 256)) {
129 (*
info->fprintf_func) (
info->stream,
"%d", signed_operand_val);
131 (*
info->fprintf_func) (
info->stream,
"0x%x", signed_operand_val);
139 (*
info->fprintf_func) (
info->stream,
"%s%u",
145 (*
info->fprintf_func) (
info->stream,
":%s%u",
160 unsigned operand_val;
161 int bytes_fetched,
size, maxsize,
i,
n, noperands, nslots;
169 int first, first_slot, valid_insn;
188 info->bytes_per_line =
MAX (maxsize, 4);
200 info->private_data = (
void *) &priv;
227 for (
n = 0;
n < nslots;
n++) {
243 (*
info->fprintf_func) (
info->stream,
"{ ");
247 for (
n = 0;
n < nslots;
n++) {
251 (*
info->fprintf_func) (
info->stream,
"; ");
256 (*
info->fprintf_func) (
info->stream,
"%s",
262 for (
i = 0;
i < noperands;
i++) {
267 (*
info->fprintf_func) (
info->stream,
" ");
270 (*
info->fprintf_func) (
info->stream,
", ");
273 slot_buffer, &operand_val);
280 (*
info->fprintf_func) (
info->stream,
" }");
284 info->display_endian =
info->endian;
RzBinInfo * info(RzBinFile *bf)
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 static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
return memset(p, 0, total)
static const char struct stat static buf struct stat static buf static vhangup int status
BFD_HOST_U_64_BIT bfd_vma
OPCODES_SIGJMP_BUF bailout
__declspec(noreturn) void uv_fatal_error(const int errorno
static void print_xtensa_operand(bfd_vma memaddr, struct disassemble_info *info, xtensa_opcode opc, int opnd, unsigned operand_val)
static void nothing(void)
int print_insn_xtensa(bfd_vma memaddr, struct disassemble_info *info)
static int fetch_data(struct disassemble_info *info, bfd_vma memaddr)
#define OPCODES_SIGSETJMP(buf)
#define OPCODES_SIGJMP_BUF
#define OPCODES_SIGLONGJMP(buf, val)
xtensa_isa xtensa_default_isa
const char * xtensa_regfile_shortname(xtensa_isa isa, xtensa_regfile rf)
int xtensa_operand_is_PCrelative(xtensa_isa isa, xtensa_opcode opc, int opnd)
int xtensa_format_get_slot(xtensa_isa isa, xtensa_format fmt, int slot, const xtensa_insnbuf insn, xtensa_insnbuf slotbuf)
int xtensa_format_num_slots(xtensa_isa isa, xtensa_format fmt)
int xtensa_operand_undo_reloc(xtensa_isa isa, xtensa_opcode opc, int opnd, uint32 *valp, uint32 pc)
int xtensa_operand_num_regs(xtensa_isa isa, xtensa_opcode opc, int opnd)
int xtensa_operand_is_register(xtensa_isa isa, xtensa_opcode opc, int opnd)
uint32 xtensa_insnbuf_word
xtensa_opcode xtensa_opcode_decode(xtensa_isa isa, xtensa_format fmt, int slot, const xtensa_insnbuf slotbuf)
int xtensa_opcode_num_operands(xtensa_isa isa, xtensa_opcode opc)
xtensa_insnbuf_word * xtensa_insnbuf
int xtensa_insnbuf_size(xtensa_isa isa)
xtensa_regfile xtensa_operand_regfile(xtensa_isa isa, xtensa_opcode opc, int opnd)
int xtensa_operand_get_field(xtensa_isa isa, xtensa_opcode opc, int opnd, xtensa_format fmt, int slot, const xtensa_insnbuf slotbuf, uint32 *valp)
int xtensa_operand_decode(xtensa_isa isa, xtensa_opcode opc, int opnd, uint32 *valp)
int xtensa_format_length(xtensa_isa isa, xtensa_format fmt)
xtensa_format xtensa_format_decode(xtensa_isa isa, const xtensa_insnbuf insn)
void xtensa_insnbuf_from_chars(xtensa_isa isa, xtensa_insnbuf insn, const unsigned char *cp, int num_chars)
xtensa_isa xtensa_isa_init(xtensa_isa_status *errno_p, char **error_msg_p)
int xtensa_operand_is_visible(xtensa_isa isa, xtensa_opcode opc, int opnd)
int xtensa_isa_maxlength(xtensa_isa isa)
const char * xtensa_opcode_name(xtensa_isa isa, xtensa_opcode opc)
xtensa_insnbuf xtensa_insnbuf_alloc(xtensa_isa isa)