197 for (
i = 0;
i < 256;
i++) {
200 for (j = 0; j <
i; j++) {
222 for (
i = 0;
i < 256;
i++) {
245 free(par.op_obj[par.op_code].op_name);
246 par.op_obj[par.op_code].op_name =
strdup(par.op_name);
247 par.op_obj[par.op_code].op_code = par.op_code;
248 par.op_obj[par.op_code].op_pop = par.pop;
249 par.op_obj[par.op_code].op_push = par.push;
250 if (!par.fallthrough) {
251 par.op_obj[par.op_code].type |=
NOFOLLOW;
256 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
257 par.op_obj[par.op_code].type |=
HASNAME;
261 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
262 par.op_obj[par.op_code].type |=
HASLOCAL;
266 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
267 par.op_obj[par.op_code].type |=
HASFREE;
273 name_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
276 local_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
279 free_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
282 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
285 RZ_LOG_ERROR(
"Error in store_op in pyc/opcode.c, call function %u.\n", par.func);
288 par.op_obj[par.op_code].type |=
HASSTORE;
292 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
293 par.op_obj[par.op_code].type |=
HASVARGS;
297 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
298 par.op_obj[par.op_code].type |=
HASCONST;
302 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
307 def_op00(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push, .fallthrough = par.fallthrough);
308 par.op_obj[par.op_code].type |=
HASJABS;
309 if (par.conditional) {
315 def_op00(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push, .fallthrough = par.fallthrough);
316 par.op_obj[par.op_code].type |=
HASJREL;
317 if (par.conditional) {
323 def_op(.
op_obj = par.op_obj, .
op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
324 par.op_obj[par.op_code].type |=
HASNARGS;
334 RZ_LOG_ERROR(
"Error in rm_op() while constructing opcodes for .pyc file: \n .op_code = %u, .op_name = %s", par.op_code, par.op_name);
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
void * malloc(size_t size)
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
void free_opcode(pyc_opcodes *opcodes)
pyc_opcodes * new_pyc_opcodes()
void() rm_op(struct op_parameter par)
void() free_opN(struct op_parameter par)
void() const_opN(struct op_parameter par)
pyc_opcodes * get_opcode_by_version(char *version)
void() local_opN(struct op_parameter par)
void() def_opN(struct op_parameter par)
void() store_opN(struct op_parameter par)
static version_opcode version_op[]
void() varargs_op(struct op_parameter par)
bool pyc_opcodes_equal(pyc_opcodes *op, const char *version)
void() compare_op(struct op_parameter par)
void() jrel_opN(struct op_parameter par)
void add_arg_fmt(pyc_opcodes *ret, char *op_name, const char *(*formatter)(ut32 oparg))
void() name_opN(struct op_parameter par)
void() jabs_opN(struct op_parameter par)
void() nargs_op(struct op_parameter par)
pyc_opcodes * opcode_24(void)
pyc_opcodes * opcode_15(void)
pyc_opcodes * opcode_12(void)
pyc_opcodes * opcode_37(void)
pyc_opcodes * opcode_32(void)
pyc_opcodes * opcode_23(void)
pyc_opcodes * opcode_31(void)
pyc_opcodes * opcode_26(void)
pyc_opcodes * opcode_14(void)
pyc_opcodes * opcode_25(void)
pyc_opcodes * opcode_11(void)
pyc_opcodes * opcode_38(void)
pyc_opcodes * opcode_27(void)
pyc_opcodes * opcode_21(void)
pyc_opcodes * opcode_13(void)
pyc_opcodes * opcode_10(void)
pyc_opcodes * opcode_16(void)
pyc_opcodes * opcode_39(void)
pyc_opcodes * opcode_33(void)
pyc_opcodes * opcode_34(void)
pyc_opcodes * opcode_36(void)
pyc_opcodes * opcode_22(void)
pyc_opcodes * opcode_30(void)
pyc_opcodes * opcode_20(void)
pyc_opcodes * opcode_35(void)
void(* RzListFree)(void *ptr)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
pyc_opcode_object * op_obj
const char *(* formatter)(ut32 oparg)
pyc_opcode_object * opcodes
pyc_opcodes *(* opcode_func)()