23 #define DEF_READ_GENERIC(bytes, readtype, fmt) \
24 static int read_generic##readtype(int *pos, CILOp *op, const ut8 *buf, int len) { \
25 if (*pos + bytes > len) { \
28 rz_strbuf_appendf(&op->strbuf, fmt, rz_read_at_le##readtype(buf, *pos)); \
45 #define read_ShortInlineVar read_generic8
46 #define read_ShortInlineI read_generic8
48 #define read_InlineVar read_generic16
50 #define read_InlineI read_generic32
51 #define read_InlineSig read_generic32
52 #define read_InlineType read_generic32
53 #define read_InlineField read_generic32
54 #define read_InlineString read_generic32
55 #define read_InlineTok read_generic32
57 #define read_InlineI8 read_generic64
59 #define read_ShortInlineR read_generic_float
60 #define read_InlineR read_generic_double
128 #define OPCODE_SINGLE(name, string, param, byte, control) [name] = { .str = string, .read_param = read_##param },
130 #include "opcodes_single.def"
134 #define OPCODE_DOUBLE(name, string, param, byte, control) [name] = { .str = string, .read_param = read_##param },
135 #define OPCODE_PREFIX(name, string, param, byte, control) [name] = { \
138 .read_param = read_##param \
141 #include "opcodes_double.def"
142 #include "opcodes_prefix.def"
176 if (!opcode_reader.
str) {
190 if (opcode_reader.
prefix) {
static int read_InlineBrTarget(int *pos, CILOp *op, const ut8 *buf, int len)
static const CILOpcodeReader opcode_readers_single[]
static int read_ShortInlineBrTarget(int *pos, CILOp *op, const ut8 *buf, int len)
static int read_InlineMethod(int *pos, CILOp *op, const ut8 *buf, int len)
#define DEF_READ_GENERIC(bytes, readtype, fmt)
static const CILOpcodeReader opcode_readers_double[]
static int read_InlineNone(int *pos, CILOp *op, const ut8 *buf, int len)
int cil_dis(CILOp *op, const ut8 *buf, int len)
Disassemble a CIL buffer.
static int read_InlineSwitch(int *pos, CILOp *op, const ut8 *buf, int len)
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 count
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 start
static ut32 rz_read_at_le32(const void *src, size_t offset)
static ut32 rz_read_le32(const void *src)
static ut8 rz_read_at_le8(const void *src, size_t offset)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API void rz_strbuf_init(RzStrBuf *sb)
int(* read_param)(int *pos, CILOp *op, const ut8 *buf, int len)