21 ctx->ht_itcond = ht_uu_new0();
22 ctx->ht_itblock = ht_uu_new0();
26 ht_uu_free(
ctx->ht_itblock);
27 ht_uu_free(
ctx->ht_itcond);
37 ht_uu_find(
ctx->ht_itblock, insn->address, &
found);
43 for (
size_t i = 1;
i <
size;
i++) {
50 switch (insn->mnemonic[
i]) {
52 cond.cond = insn->detail->arm.cc;
55 cond.cond = (insn->detail->arm.cc % 2) ? insn->detail->arm.cc + 1 : insn->detail->arm.cc - 1;
61 ht_uu_update(
ctx->ht_itcond, insn->address +
cond.off,
cond.packed);
64 ht_uu_update(
ctx->ht_itblock, insn->address, block.
packed);
77 for (
size_t i = 0;
i < 4 && block.
off[
i];
i++) {
78 ht_uu_delete(
ctx->ht_itcond, insn->address + block.
off[
i]);
80 ht_uu_delete(
ctx->ht_itblock, insn->address);
94 insn->detail->arm.cc =
cond.cond;
95 insn->detail->arm.update_flags = 0;
99 if (insn->size != 4) {
113 for (
size_t i = 0;
i < 4;
i++) {
125 ht_uu_delete(
ctx->ht_itcond, blockaddr + itblock.
off[
idx]);
127 ht_uu_update(
ctx->ht_itcond, blockaddr + itblock.
off[
idx], adjcond.
packed);
129 ht_uu_update(
ctx->ht_itblock, blockaddr, itblock.
packed);
RZ_API void rz_arm_it_context_fini(RzArmITContext *ctx)
union arm_cs_itcond_t ArmCSITCond
union arm_cs_itblock_t ArmCSITBlock
RZ_API void rz_arm_it_context_init(RzArmITContext *ctx)
RZ_API void rz_arm_it_update_nonblock(RzArmITContext *ctx, cs_insn *insn)
RZ_API bool rz_arm_it_apply_cond(RzArmITContext *ctx, cs_insn *insn)
RZ_API void rz_arm_it_update_block(RzArmITContext *ctx, cs_insn *insn)
RZ_API const KEY_TYPE bool * found
#define rz_return_if_fail(expr)
#define RZ_STATIC_ASSERT(x)
RZ_API size_t rz_str_nlen(const char *s, size_t n)
#define cond(bop, top, mask, flags)
ut64 packed
for putting into HtUU
ut8 off[4]
offsets of the up to 4 conditioned instructions from the addr of the it, 0-terminated if less than 4.
ut64 packed
for putting into HtUU
ut8 off
offset of this instruction from the it, for back-referencing to the ArmCSITBlock
ut64(WINAPI *w32_GetEnabledXStateFeatures)()