Go to the documentation of this file.
38 if (ins->detail == NULL)
41 mips = &(ins->detail->mips);
45 for (
i = 0;
i <
mips->op_count;
i++) {
47 switch((
int)
op->type) {
54 printf(
"\t\toperands[%u].type: IMM = 0x%" PRIx64
"\n",
i,
op->imm);
57 printf(
"\t\toperands[%u].type: MEM\n",
i);
59 printf(
"\t\t\toperands[%u].mem.base: REG = %s\n",
61 if (
op->mem.disp != 0)
62 printf(
"\t\t\toperands[%u].mem.disp: 0x%" PRIx64
"\n",
i,
op->mem.disp);
80 #define MIPS_CODE "\x0C\x10\x00\x97\x00\x00\x00\x00\x24\x02\x00\x0c\x8f\xa2\x00\x00\x34\x21\x34\x56"
82 #define MIPS_CODE2 "\x56\x34\x21\x34\xc2\x17\x01\x00"
83 #define MIPS_32R6M "\x00\x07\x00\x07\x00\x11\x93\x7c\x01\x8c\x8b\x7c\x00\xc7\x48\xd0"
84 #define MIPS_32R6 "\xec\x80\x00\x19\x7c\x43\x22\xa0"
85 #define MIPS_64SD "\x70\x00\xb2\xff"
93 "MIPS-32 (Big-endian)"
100 "MIPS-64-EL (Little-endian)"
107 "MIPS-32R6 | Micro (Big-endian)"
114 "MIPS-32R6 (Big-endian)"
121 "MIPS-64-EL + Mips II (Little-endian)"
128 "MIPS-64-EL (Little-endian)"
140 printf(
"Failed on cs_open() with error returned: %u\n",
err);
150 printf(
"****************\n");
155 for (j = 0; j <
count; j++) {
156 printf(
"0x%" PRIx64
":\t%s\t%s\n", insn[j].address, insn[j].mnemonic, insn[j].op_str);
159 printf(
"0x%" PRIx64
":\n", insn[j-1].address + insn[j-1].
size);
164 printf(
"****************\n");
167 printf(
"ERROR: Failed to disasm given code!\n");
@ CS_MODE_MIPS2
Mips II ISA.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
@ MIPS_OP_REG
= CS_OP_REG (Register operand).
@ CS_MODE_LITTLE_ENDIAN
little-endian mode (default mode)
CAPSTONE_EXPORT size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64_t offset, size_t count, cs_insn **insn)
@ MIPS_OP_MEM
= CS_OP_MEM (Memory operand).
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
cs_arch
Architecture type.
@ CS_OPT_DETAIL
Break down instruction structure into details.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
@ CS_MODE_MICRO
MicroMips mode (MIPS)
static void print_string_hex(const char *comment, unsigned char *str, size_t len)
const CAPSTONE_EXPORT char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
unsigned __int64 uint64_t
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
@ CS_MODE_BIG_ENDIAN
big-endian mode
@ CS_MODE_MIPS32R6
Mips32r6 ISA.
@ CS_ARCH_MIPS
Mips architecture.
@ CS_MODE_MIPS64
Mips64 ISA (Mips)
static void print_insn_detail(cs_insn *ins)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
struct platform platforms[]
@ MIPS_OP_IMM
= CS_OP_IMM (Immediate operand).
@ CS_MODE_MIPS32
Mips32 ISA (Mips)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:31