Go to the documentation of this file.
37 if (ins->detail == NULL)
40 sparc = &(ins->detail->sparc);
44 for (
i = 0;
i <
sparc->op_count;
i++) {
46 switch((
int)
op->type) {
53 printf(
"\t\toperands[%u].type: IMM = 0x%" PRIx64
"\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);
81 #define SPARC_CODE "\x80\xa0\x40\x02\x85\xc2\x60\x08\x85\xe8\x20\x01\x81\xe8\x00\x00\x90\x10\x20\x01\xd5\xf6\x10\x16\x21\x00\x00\x0a\x86\x00\x40\x02\x01\x00\x00\x00\x12\xbf\xff\xff\x10\xbf\xff\xff\xa0\x02\x00\x09\x0d\xbf\xff\xff\xd4\x20\x60\x00\xd4\x4e\x00\x16\x2a\xc2\x80\x03"
83 #define SPARCV9_CODE "\x81\xa8\x0a\x24\x89\xa0\x10\x20\x89\xa0\x1a\x60\x89\xa0\x00\xe0"
110 printf(
"Failed on cs_open() with error returned: %u\n",
err);
120 printf(
"****************\n");
125 for (j = 0; j <
count; j++) {
126 printf(
"0x%" PRIx64
":\t%s\t%s\n", insn[j].address, insn[j].mnemonic, insn[j].op_str);
129 printf(
"0x%" PRIx64
":\n", insn[j-1].address + insn[j-1].
size);
134 printf(
"****************\n");
137 printf(
"ERROR: Failed to disasm given code!\n");
@ SPARC_OP_IMM
= CS_OP_IMM (Immediate operand).
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.
@ 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)
const CAPSTONE_EXPORT char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
unsigned __int64 uint64_t
@ SPARC_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
@ CS_ARCH_SPARC
Sparc architecture.
static void print_insn_detail(cs_insn *ins)
static void print_string_hex(const char *comment, unsigned char *str, size_t len)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
@ CS_MODE_V9
SparcV9 mode (Sparc)
struct platform platforms[]
@ SPARC_OP_MEM
= CS_OP_MEM (Memory operand).
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:32