8 #include <capstone/capstone.h>
10 #ifdef CAPSTONE_TMS320C64X_H
11 #define CAPSTONE_HAS_TMS320C64X 1
14 #define CAPSTONE_HAS_TMS320C64X 0
15 #warning Cannot find capstone-tms320c64x support
18 #include "../arch/tms320/tms320_dasm.h"
21 #if CAPSTONE_HAS_TMS320C64X
27 #if CAPSTONE_HAS_TMS320C64X
62 op->size = insn->size;
63 char *buf_asm =
sdb_fmt(
"%s%s%s", insn->mnemonic, insn->op_str[0] ?
" " :
"", insn->op_str);
84 #if CAPSTONE_HAS_TMS320C64X
86 return tms320c64x_disassemble(
a,
op,
buf,
len);
110 #if CAPSTONE_HAS_TMS320C64X
121 #if CAPSTONE_HAS_TMS320C64X
122 .cpus =
"c54x,c55x,c55x+,c64x",
123 .desc =
"TMS320 DSP family (c54x,c55x,c55x+,c64x)",
125 .cpus =
"c54x,c55x,c55x+",
126 .desc =
"TMS320 DSP family (c54x,c55x,c55x+)",
136 #ifndef RZ_PLUGIN_INCORE
RZ_API void rz_asm_op_set_asm(RzAsmOp *op, const char *str)
static bool tms320_fini(void *user)
static bool tms320_init(void **user)
RZ_API RzLibStruct rizin_plugin
struct tms_cs_context_t TmsContext
RzAsmPlugin rz_asm_plugin_tms320
static int tms320_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
@ CS_ARCH_TMS320C64X
TMS320C64x architecture.
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ CS_OPT_OFF
Turn OFF an option - default for CS_OPT_DETAIL, CS_OPT_SKIPDATA, CS_OPT_UNSIGNED.
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)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
RZ_API char * sdb_fmt(const char *fmt,...)
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
#define rz_return_val_if_fail(expr, val)
RZ_API int rz_str_casecmp(const char *dst, const char *orig)
RZ_API void rz_str_case(char *str, bool up)
RZ_API int rz_str_replace_char(char *s, int a, int b)
#define RZ_SYS_ENDIAN_BIG
#define RZ_SYS_ENDIAN_LITTLE
int tms320_dasm_fini(tms320_dasm_t *dasm)
int tms320_dasm_init(tms320_dasm_t *dasm)
int tms320_dasm(tms320_dasm_t *dasm, const ut8 *stream, int len)
#define tms320_f_set_cpu(d, v)
#define TMS320_F_CPU_C55X_PLUS
#define TMS320_F_CPU_C54X
#define TMS320_F_CPU_C55X
if(dbg->bits==RZ_SYS_BITS_64)