51 rz_list_foreach (
reg->regset[
i].regs,
iter, item) {
52 if (item->
size != 1) {
58 rz_list_foreach (
flags, iter2, item2) {
87 rz_list_foreach (
reg->regset[
i].regs,
iter, item) {
90 rz_list_foreach (
flags, fiter, flag) {
109 rz_list_foreach (items,
iter, item) {
115 if (
pc && !strcmp(item->
name,
pc)) {
170 for (
size_t i = 0;
i < regs_count;
i++) {
177 for (
size_t j = 0; j <
i; j++) {
197 for (
size_t i = 0;
i < regs_count;
i++) {
224 for (
size_t i = 0;
i < rb->regs_count;
i++) {
263 for (
size_t i = 0;
i < rb->regs_count;
i++) {
330 for (
size_t i = 0;
i < rb->regs_count;
i++) {
334 RZ_LOG_ERROR(
"IL Variable \"%s\" does not exist for bound register of the same name.\n", item->
name);
338 if (item->
size == 1) {
RZ_API RzILBool * rz_il_bool_new(bool true_or_false)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_OWN RzILVal * rz_il_value_new_bitv(RZ_NONNULL RzBitVector *bv)
RZ_API RZ_OWN RzILVal * rz_il_value_new_bool(RZ_NONNULL RzILBool *b)
RZ_API void rz_il_vm_sync_from_reg(RZ_NONNULL RzILVM *vm, RZ_NONNULL RzILRegBinding *rb, RZ_NONNULL RzReg *reg)
static void reg_binding_item_fini(RzILRegBindingItem *item, void *unused)
RZ_API void rz_il_vm_setup_reg_binding(RZ_NONNULL RzILVM *vm, RZ_NONNULL RZ_BORROW RzILRegBinding *rb)
RZ_API bool rz_il_vm_sync_to_reg(RZ_NONNULL RzILVM *vm, RZ_NONNULL RzILRegBinding *rb, RZ_NONNULL RzReg *reg)
static int reg_offset_cmp(const void *value, const void *list_data)
RZ_API RzILRegBinding * rz_il_reg_binding_exactly(RZ_NONNULL RzReg *reg, size_t regs_count, RZ_NONNULL RZ_BORROW const char **regs)
RZ_API void rz_il_reg_binding_free(RzILRegBinding *rb)
RZ_API RzILRegBinding * rz_il_reg_binding_derive(RZ_NONNULL RzReg *reg)
Calculate a new binding of IL variables against the profile of the given RzReg.
RZ_API void rz_il_vm_set_global_var(RZ_NONNULL RzILVM *vm, RZ_NONNULL const char *name, RZ_OWN RzILVal *val)
RZ_API RZ_BORROW RzILVal * rz_il_vm_get_var_value(RZ_NONNULL RzILVM *vm, RzILVarKind kind, const char *name)
RZ_API RZ_BORROW RzILVar * rz_il_vm_create_global_var(RZ_NONNULL RzILVM *vm, RZ_NONNULL const char *name, RzILSortPure sort)
RZ_API RZ_BORROW RzILVar * rz_il_vm_get_var(RZ_NONNULL RzILVM *vm, RzILVarKind kind, const char *name)
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API void rz_list_sort(RZ_NONNULL RzList *list, RZ_NONNULL RzListComparator cmp)
Sorts via merge sort or via insertion sort a list.
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
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")
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
RZ_API const char * rz_reg_get_name(RzReg *reg, int role)
RZ_API RZ_OWN RzList * rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList *regs)
Filter out all register items that are smaller than but covered entirely by some other register.
RZ_API bool rz_reg_set_bv(RZ_NONNULL RzReg *reg, RZ_NONNULL RzRegItem *item, RZ_NONNULL const RzBitVector *bv)
RZ_API RzBitVector * rz_reg_get_bv(RZ_NONNULL RzReg *reg, RZ_NONNULL RzRegItem *item)
RZ_API ut64 rz_reg_get_value(RzReg *reg, RzRegItem *item)
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
RZ_API bool rz_bv_set_from_ut64(RZ_NONNULL RzBitVector *bv, ut64 value)
RZ_API void rz_bv_free(RZ_NULLABLE RzBitVector *bv)
RZ_API ut32 rz_bv_len(RZ_NONNULL const RzBitVector *bv)
RZ_API bool rz_bv_is_zero_vector(RZ_NONNULL const RzBitVector *x)
RZ_API bool rz_bv_set_all(RZ_NONNULL RzBitVector *bv, bool b)
#define rz_bv_new_zero(l)
RZ_API ut32 rz_bv_copy_nbits(RZ_NONNULL const RzBitVector *src, ut32 src_start_pos, RZ_NONNULL RzBitVector *dst, ut32 dst_start_pos, ut32 nbit)
#define RZ_LOG_ERROR(fmtstr,...)
void(* RzVectorFree)(void *e, void *user)
RZ_API void * rz_vector_flush(RzVector *vec)
Turn the vector into a fixed-size array. This will clear the vector and return an array of its origin...
RZ_API void * rz_vector_push(RzVector *vec, void *x)
RZ_API void rz_vector_fini(RzVector *vec)
static size_t rz_vector_len(const RzVector *vec)
RZ_API void rz_vector_init(RzVector *vec, size_t elem_size, RzVectorFree free, void *free_user)
static struct sockaddr static addrlen static backlog const void static flags void flags
static RzILSortPure rz_il_sort_pure_bool()
@ RZ_IL_TYPE_PURE_BITVECTOR
static RzILSortPure rz_il_sort_pure_bv(ut32 length)
ut32 size
number of bits of the register and variable
char * name
name of both the register and the variable that binds to it
RzILRegBindingItem * regs
regs_count registers that are bound to variables
Definition of a variable inside the vm.
Low-level VM to execute raw IL code.
RzRegisterType type
Register type.
int size
in bits> 8,16,32,64 ... 128/256
int offset
Offset into register profile in bits.
@ RZ_IL_VAR_KIND_GLOBAL
global var, usually bound to a physical representation like a register.