Go to the documentation of this file.
37 if (ins->detail == NULL)
40 xcore = &(ins->detail->xcore);
44 for (
i = 0;
i <
xcore->op_count;
i++) {
46 switch((
int)
op->type) {
53 printf(
"\t\toperands[%u].type: IMM = 0x%x\n",
i,
op->imm);
56 printf(
"\t\toperands[%u].type: MEM\n",
i);
58 printf(
"\t\t\toperands[%u].mem.base: REG = %s\n",
61 printf(
"\t\t\toperands[%u].mem.index: REG = %s\n",
63 if (
op->mem.disp != 0)
64 printf(
"\t\t\toperands[%u].mem.disp: 0x%x\n",
i,
op->mem.disp);
65 if (
op->mem.direct != 1)
66 printf(
"\t\t\toperands[%u].mem.direct: -1\n",
i);
78 #define XCORE_CODE "\xfe\x0f\xfe\x17\x13\x17\xc6\xfe\xec\x17\x97\xf8\xec\x4f\x1f\xfd\xec\x37\x07\xf2\x45\x5b\xf9\xfa\x02\x06\x1b\x10\x09\xfd\xec\xa7"
98 printf(
"Failed on cs_open() with error returned: %u\n",
err);
108 printf(
"****************\n");
113 for (j = 0; j <
count; j++) {
114 printf(
"0x%" PRIx64
":\t%s\t%s\n", insn[j].address, insn[j].mnemonic, insn[j].op_str);
117 printf(
"0x%" PRIx64
":\n", insn[j-1].address + insn[j-1].
size);
122 printf(
"****************\n");
125 printf(
"ERROR: Failed to disasm given code!\n");
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
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)
_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.
@ XCORE_OP_MEM
= CS_OP_MEM (Memory operand).
@ CS_OPT_DETAIL
Break down instruction structure into details.
static void print_string_hex(const char *comment, unsigned char *str, size_t len)
static void print_insn_detail(cs_insn *ins)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
const CAPSTONE_EXPORT char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
unsigned __int64 uint64_t
@ XCORE_OP_REG
= CS_OP_REG (Register operand).
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
@ CS_MODE_BIG_ENDIAN
big-endian mode
@ XCORE_OP_IMM
= CS_OP_IMM (Immediate operand).
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
struct platform platforms[]
@ CS_ARCH_XCORE
XCore architecture.
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:34