aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--lib/dis-arm.inc.h37
-rw-r--r--lib/dis-thumb.inc.h6
-rw-r--r--lib/dis-thumb2.inc.h133
-rw-r--r--lib/dis.h2
-rw-r--r--test/test-tdarm-simple.c16
6 files changed, 186 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 97af141..6bb946b 100644
--- a/Makefile
+++ b/Makefile
@@ -30,12 +30,10 @@ all: generated/transform-dis-$(1).inc.h
#all: generated/jump-dis-$(1).inc.h
HEADERS := $$(HEADERS) generated/transform-dis-$(1).inc.h
endef
-
-$(eval $(call define_test,tdarm-simple,tdarm-simple,$(CC) -std=c11))
-$(eval $(call define_test,dis,dis,$(CC) -std=c11))
-$(eval $(call define_test,find-syms,find-syms,$(CC) -std=c89))
-$(eval $(call define_test,find-syms-cpp,find-syms,$(CXX) -x c++ -std=c++98))
-$(eval $(call define_test,substrate,substrate,$(CXX) -std=c++98))
+$(eval $(call do_prefix,thumb2,-n _thumb2,ARM))
+$(eval $(call do_prefix,thumb,-n _thumb,ARM))
+$(eval $(call do_prefix,arm,-n _arm,ARM))
+$(eval $(call do_prefix,arm64,,AArch64))
out/%.o: lib/%.c Makefile $(HEADERS)
$(CC) -fvisibility=hidden -std=c11 -c -o $@ $<
@@ -48,15 +46,16 @@ define define_test
out/test-$(1): test/test-$(2).c* $(HEADERS) Makefile out/libsubstitute.dylib
$(3) -o $$@ $$< -Ilib -Isubstrate -Lout -lsubstitute
endef
+$(eval $(call define_test,tdarm-simple,tdarm-simple,$(CC) -std=c11))
+$(eval $(call define_test,dis,dis,$(CC) -std=c11))
+$(eval $(call define_test,find-syms,find-syms,$(CC) -std=c89))
+$(eval $(call define_test,find-syms-cpp,find-syms,$(CXX) -x c++ -std=c++98))
+$(eval $(call define_test,substrate,substrate,$(CXX) -std=c++98))
generated: Makefile
rm -rf generated
mkdir generated
-$(eval $(call do_prefix,thumb2,-n _thumb2,ARM))
-$(eval $(call do_prefix,thumb,-n _thumb,ARM))
-$(eval $(call do_prefix,arm,-n _arm,ARM))
-$(eval $(call do_prefix,arm64,,AArch64))
clean:
rm -rf out
diff --git a/lib/dis-arm.inc.h b/lib/dis-arm.inc.h
index 2785725..550b8e7 100644
--- a/lib/dis-arm.inc.h
+++ b/lib/dis-arm.inc.h
@@ -1,7 +1,7 @@
#include "dis.h"
-static INLINE tdis_ret P(GPRPairOp_Rt_addr_offset_none_addr_S_2_STLEXD)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
- data(r(Rt), r(addr));
+static INLINE tdis_ret P(GPRPairOp_Rt_addr_offset_none_addr_unk_Rd_S_2_STLEXD)(tdis_ctx ctx, struct bitslice Rt, struct bitslice Rd, struct bitslice addr) {
+ data(r(Rt), r(Rd), r(addr));
}
static INLINE tdis_ret P(GPR_Rm_unk_Rd_1_MOVr)(tdis_ctx ctx, struct bitslice Rm, struct bitslice Rd) {
data(rout(Rd), r(Rm));
@@ -21,7 +21,7 @@ static INLINE tdis_ret P(GPR_Rn_unk_Rd_1_ADDri)(tdis_ctx ctx, struct bitslice Rd
static INLINE tdis_ret P(GPR_Rt_4_MCR)(tdis_ctx ctx, struct bitslice Rt) {
data(r(Rt));
}
-static INLINE tdis_ret P(GPR_Rt_addr_offset_none_addr_S_10_STL)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
+static INLINE tdis_ret P(GPR_Rt_addr_offset_none_addr_S_3_STL)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
data(r(addr), rout(Rt));
}
static INLINE tdis_ret P(GPR_Rt_addr_offset_none_addr_am2offset_imm_offset_S_4_STRBT_POST_IMM)(tdis_ctx ctx, UNUSED struct bitslice offset, struct bitslice Rt, struct bitslice addr) {
@@ -55,7 +55,7 @@ static INLINE tdis_ret P(GPR_Rt_ldst_so_reg_shift_S_1_STRrs)(tdis_ctx ctx, struc
data(rs(shift, 0, 4), rs(shift, 13, 4), r(Rt));
}
static INLINE tdis_ret P(GPRnopc_Rt_4_MCRR)(tdis_ctx ctx, UNUSED struct bitslice Rt) {
- // need Rt2 but whatever
+ /* need Rt2 but whatever */
return P(unidentified)(ctx);
}
static INLINE tdis_ret P(GPRnopc_Rt_addrmode_imm12_addr_S_1_STRBi12)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
@@ -88,14 +88,15 @@ static INLINE tdis_ret P(addr_offset_none_addr_postidx_imm8s4_offset_4_LDC2L_POS
static INLINE tdis_ret P(addr_offset_none_addr_postidx_imm8s4_offset_S_4_STC2L_POST)(tdis_ctx ctx, UNUSED struct bitslice offset, struct bitslice addr) {
data(r(addr));
}
-static INLINE tdis_ret P(addr_offset_none_addr_unk_Rt_16_LDA)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
+static INLINE tdis_ret P(addr_offset_none_addr_unk_Rt_13_LDA)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
data(r(addr), rout(Rt));
}
static INLINE tdis_ret P(addrmode3_addr_unk_Rt_4_LDRD)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
- data(rsout(addr, 9, 4), rs(addr, 0, 4), r(Rt));
+ /* ignoring Rt2 = Rt + 1, but it isn't supposed to load PC anyway */
+ data(rs(addr, 9, 4), rs(addr, 0, 4));
}
static INLINE tdis_ret P(addrmode3_pre_addr_unk_Rt_4_LDRD_PRE)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
- data(rsout(addr, 9, 4), rs(addr, 0, 4), r(Rt));
+ data(rs(addr, 9, 4), rs(addr, 0, 4));
}
static INLINE tdis_ret P(addrmode5_addr_8_LDC2L_OFFSET)(tdis_ctx ctx, struct bitslice addr) {
data(rsout(addr, 9, 4));
@@ -115,8 +116,8 @@ static INLINE tdis_ret P(addrmode_imm12_addr_unk_Rt_2_LDRBi12)(tdis_ctx ctx, str
static INLINE tdis_ret P(addrmode_imm12_pre_addr_unk_Rt_2_LDRB_PRE_IMM)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
data(rs(addr, 13, 4), rout(Rt));
}
-static INLINE tdis_ret P(adrlabel_label_1_ADR)(tdis_ctx ctx, struct bitslice label) {
- return P(adr)(ctx, ctx->pc + 8 + bs_get(label, ctx->op));
+static INLINE tdis_ret P(adrlabel_label_unk_Rd_1_ADR)(tdis_ctx ctx, struct bitslice label, struct bitslice Rd) {
+ return P(pcrel)(ctx, ctx->pc + 8 + bs_get(label, ctx->op), bs_get(Rd, ctx->op), false);
}
static INLINE tdis_ret P(br_target_target_B_1_Bcc)(tdis_ctx ctx, struct bitslice target) {
return P(branch)(ctx, ctx->pc + 8 + sext(bs_get(target, ctx->op), 24));
@@ -136,6 +137,24 @@ static INLINE tdis_ret P(unk_Rd_5_MOVTi16)(tdis_ctx ctx, struct bitslice Rd) {
static INLINE tdis_ret P(unk_Rt_13_MRC)(tdis_ctx ctx, struct bitslice Rt) {
data(rout(Rt));
}
+static INLINE tdis_ret P(GPR_Rn_reglist_regs_16_LDMDA)(tdis_ctx ctx, struct bitslice regs, UNUSED struct bitslice Rn) {
+ unsigned regs_val = bs_get(regs, ctx->op);
+ if(regs_val & (1 << 15))
+ return P(ret)(ctx);
+ return P(unidentified)(ctx);
+}
+static INLINE tdis_ret P(GPR_Rn_reglist_regs_S_16_STMDA)(tdis_ctx ctx, UNUSED struct bitslice regs, UNUSED struct bitslice Rn) {
+ return P(unidentified)(ctx);
+}
+static INLINE tdis_ret P(GPR_Rt_addr_offset_none_addr_unk_Rd_S_6_STLEX)(tdis_ctx ctx, struct bitslice Rt, struct bitslice Rd, struct bitslice addr) {
+ data(r(addr), r(Rt), r(Rd));
+}
+static INLINE tdis_ret P(addr_offset_none_addr_postidx_reg_Rm_unk_Rt_3_LDRHTr)(tdis_ctx ctx, struct bitslice Rm, struct bitslice Rt, struct bitslice addr) {
+ data(r(addr), rout(Rt), r(Rm));
+}
+static INLINE tdis_ret P(GPR_Rt_addr_offset_none_addr_postidx_reg_Rm_S_1_STRHTr)(tdis_ctx ctx, struct bitslice Rm, struct bitslice Rt, struct bitslice addr) {
+ data(r(addr), r(Rt), r(Rm));
+}
static tdis_ret P(dis_arm)(tdis_ctx ctx) {
unsigned op = ctx->op;
diff --git a/lib/dis-thumb.inc.h b/lib/dis-thumb.inc.h
index 8b41929..5541510 100644
--- a/lib/dis-thumb.inc.h
+++ b/lib/dis-thumb.inc.h
@@ -27,13 +27,13 @@ static INLINE tdis_ret P(t_adrlabel_addr_1_tADR)(tdis_ctx ctx, struct bitslice a
return P(pcrel)(ctx, ((ctx->pc + 4) & ~2) + bs_get(addr, ctx->op), bs_get(Rd, ctx->op), false);
}
static INLINE tdis_ret P(t_bcctarget_target_B_1_tBcc)(tdis_ctx ctx, struct bitslice target) {
- return P(branch)(ctx->pc + 2 + sext(bs_get(target, ctx->op), 8);
+ return P(branch)(ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 8);
}
static INLINE tdis_ret P(t_brtarget_target_B_1_tB)(tdis_ctx ctx, struct bitslice target) {
- return P(branch)(ctx->pc + 2 + sext(bs_get(target, ctx->op), 11);
+ return P(branch)(ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 11);
}
static INLINE tdis_ret P(t_cbtarget_target_B_2_tCBNZ)(tdis_ctx ctx, struct bitslice target) {
- return P(branch)(ctx->pc + 2 + bs_get(target, ctx->op);
+ return P(branch)(ctx->pc + 4 + 2 * bs_get(target, ctx->op);
}
static tdis_ret P(dis_thumb)(tdis_ctx ctx) {
diff --git a/lib/dis-thumb2.inc.h b/lib/dis-thumb2.inc.h
new file mode 100644
index 0000000..02b9ebe
--- /dev/null
+++ b/lib/dis-thumb2.inc.h
@@ -0,0 +1,133 @@
+#include "dis.h"
+static INLINE tdis_ret P(GPR_Rm_unk_Rd_1_t2MOVr)(tdis_ctx ctx, struct bitslice Rm, struct bitslice Rd) {
+ data(rout(Rd), r(Rm));
+}
+static INLINE tdis_ret P(GPR_Rn_unk_Rd_1_t2ADDri12)(tdis_ctx ctx, struct bitslice Rd, struct bitslice Rn) {
+ data(rout(Rd), r(Rn));
+}
+static INLINE tdis_ret P(GPR_Rt_8_VMOVDRR)(tdis_ctx ctx, struct bitslice Rt) {
+ return P(unidentified)(ctx); /* don't care */
+}
+static INLINE tdis_ret P(GPR_Rt_t2addrmode_imm12_addr_S_1_t2STRi12)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 13, 4), r(Rt));
+}
+static INLINE tdis_ret P(GPR_Rt_t2addrmode_negimm8_addr_S_1_t2STRi8)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 9, 4), r(Rt));
+}
+static INLINE tdis_ret P(GPR_Rt_t2addrmode_so_reg_addr_S_1_t2STRs)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 6, 4), rs(addr, 2, 4), r(Rt));
+}
+static INLINE tdis_ret P(GPRnopc_Rn_rGPR_Rm_unk_Rd_1_t2ADDrr)(tdis_ctx ctx, struct bitslice Rm, struct bitslice Rd, struct bitslice Rn) {
+ data(rout(Rd), r(Rm), r(Rn));
+}
+static INLINE tdis_ret P(GPRnopc_Rn_unk_Rd_2_t2ADDri)(tdis_ctx ctx, struct bitslice Rd, struct bitslice Rn) {
+ data(rout(Rd), r(Rn));
+}
+static INLINE tdis_ret P(GPRnopc_Rt_t2addrmode_imm8_pre_addr_S_1_t2STR_PRE)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 9, 4), r(Rt));
+}
+static INLINE tdis_ret P(GPRnopc_Rt_t2am_imm8_offset_offset_S_1_t2STR_POST)(tdis_ctx ctx, struct bitslice offset, struct bitslice Rt) {
+ data(r(Rt), r(Rn));
+}
+static INLINE tdis_ret P(addr_offset_none_addr_4_t2LDC2L_OPTION)(tdis_ctx ctx, struct bitslice addr) {
+ data(r(addr));
+}
+static INLINE tdis_ret P(addr_offset_none_addr_S_4_t2STC2L_OPTION)(tdis_ctx ctx, struct bitslice addr) {
+ data(r(addr));
+}
+static INLINE tdis_ret P(addr_offset_none_addr_postidx_imm8s4_offset_4_t2LDC2L_POST)(tdis_ctx ctx, UNUSED struct bitslice offset, struct bitslice addr) {
+ data(r(addr));
+}
+static INLINE tdis_ret P(addr_offset_none_addr_postidx_imm8s4_offset_S_4_t2STC2L_POST)(tdis_ctx ctx, UNUSED struct bitslice offset, struct bitslice addr) {
+ data(r(addr));
+}
+static INLINE tdis_ret P(addr_offset_none_addr_unk_Rt_11_t2LDA)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
+ data(rout(Rt), r(addr));
+}
+static INLINE tdis_ret P(addrmode5_addr_8_VLDRD)(tdis_ctx ctx, struct bitslice addr) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(addrmode5_addr_S_4_t2STC2L_OFFSET)(tdis_ctx ctx, struct bitslice addr) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(addrmode5_pre_addr_4_t2LDC2L_PRE)(tdis_ctx ctx, struct bitslice addr) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(addrmode5_pre_addr_S_4_t2STC2L_PRE)(tdis_ctx ctx, struct bitslice addr) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(brtarget_target_B_1_t2Bcc)(tdis_ctx ctx, struct bitslice target) {
+ return P(branch)(ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 20);
+}
+static INLINE tdis_ret P(rGPR_Rt_addr_offset_none_addr_S_11_t2STL)(tdis_ctx ctx, struct bitslice Rt, struct bitslice addr) {
+ data(r(Rt), r(addr));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_imm0_1020s4_addr_S_1_t2STREX)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 8, 4));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_imm12_addr_S_2_t2STRBi12)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 13, 4));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_imm8_pre_addr_S_2_t2STRB_PRE)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_imm8s4_addr_S_1_t2STRDi8)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_imm8s4_pre_addr_S_1_t2STRD_PRE)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_negimm8_addr_S_2_t2STRBi8)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2addrmode_so_reg_addr_S_2_t2STRBs)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 6, 4), rs(Rt, 2, 4), r(Rt));
+}
+static INLINE tdis_ret P(rGPR_Rt_t2am_imm8_offset_offset_S_2_t2STRB_POST)(tdis_ctx ctx, struct bitslice offset, struct bitslice Rt) {
+ data(r(Rt), r(Rn));
+}
+static INLINE tdis_ret P(t2addrmode_imm0_1020s4_addr_unk_Rt_1_t2LDREX)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rout(Rt), rs(addr, 8, 4));
+}
+static INLINE tdis_ret P(t2addrmode_imm12_addr_unk_Rt_5_t2LDRBi12)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rout(Rt), rs(addr, 13, 4));
+}
+static INLINE tdis_ret P(t2addrmode_imm8_addr_unk_Rt_S_3_t2STRBT)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(r(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(t2addrmode_imm8_pre_addr_unk_Rt_5_t2LDRB_PRE)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(t2addrmode_imm8s4_addr_unk_Rt_1_t2LDRDi8)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(t2addrmode_imm8s4_pre_addr_unk_Rt_1_t2LDRD_PRE)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(t2addrmode_negimm8_addr_unk_Rt_5_t2LDRBi8)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rout(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(t2addrmode_posimm8_addr_unk_Rt_5_t2LDRBT)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ data(rout(Rt), rs(addr, 9, 4));
+}
+static INLINE tdis_ret P(t2addrmode_so_reg_addr_unk_Rt_5_t2LDRBs)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+}
+static INLINE tdis_ret P(t2adrlabel_addr_unk_Rd_1_t2ADR)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rd) {
+ return P(pcrel)(ctx, ((ctx->pc + 4) & ~2) + (bs_get(addr, ctx->op) & ((1 << 12) - 1)), bs_get(Rd, ctx->op), false);
+}
+static INLINE tdis_ret P(t2ldrlabel_addr_unk_Rt_5_t2LDRBpci)(tdis_ctx ctx, struct bitslice addr, struct bitslice Rt) {
+ return P(pcrel)(ctx, ((ctx->pc + 4) & ~2) + (bs_get(addr, ctx->op) & ((1 << 12) - 1)), bs_get(Rd, ctx->op), true);
+}
+static INLINE tdis_ret P(uncondbrtarget_target_B_1_t2B)(tdis_ctx ctx, struct bitslice target) {
+ return P(branch)(ctx->pc + 4 + 2 * sext(bs_get(target, ctx->op), 24);
+}
+static INLINE tdis_ret P(unk_Rd_3_t2MOVTi16)(tdis_ctx ctx, struct bitslice Rd) {
+ data(rout(Rt));
+}
+static INLINE tdis_ret P(unk_Rm_B_2_t2TBB)(tdis_ctx ctx, struct bitslice Rm) {
+ /* Ew. Don't bother for now - this is hard to make show up in the first 8 bytes... */
+ return P(bad)(ctx);
+}
+static INLINE tdis_ret P(unk_Rt_13_VMOVRRD)(tdis_ctx ctx, struct bitslice Rt) {
+ return P(unidentified)(ctx);
+}
diff --git a/lib/dis.h b/lib/dis.h
index 386470a..c75886d 100644
--- a/lib/dis.h
+++ b/lib/dis.h
@@ -1,8 +1,10 @@
+#pragma once
#include <stdbool.h>
#define UNUSED __attribute__((unused))
#define INLINE inline __attribute__((always_inline))
+#define NOINLINE inline __attribute__((noinline))
struct bitslice_run {
int inpos, outpos, len;
diff --git a/test/test-tdarm-simple.c b/test/test-tdarm-simple.c
index fb2b977..7211e9b 100644
--- a/test/test-tdarm-simple.c
+++ b/test/test-tdarm-simple.c
@@ -13,7 +13,7 @@ typedef struct tc {
} *tdis_ctx;
#define P(x) P_##x
-__attribute__((noinline))
+NOINLINE
static tdis_ret P_data(struct tc *ctx, unsigned o0, unsigned o1, unsigned o2, unsigned o3, unsigned out_mask) {
printf("data: %08x\n", ctx->op);
unsigned os[] = {o0, o1, o2, o3};
@@ -27,19 +27,25 @@ static tdis_ret P_data(struct tc *ctx, unsigned o0, unsigned o1, unsigned o2, un
return (tdis_ret) {true};
}
-__attribute__((noinline))
-static tdis_ret P_adr(struct tc *ctx, UNUSED uint32_t dpc) {
+NOINLINE
+static tdis_ret P_pcrel(struct tc *ctx, UNUSED uint32_t dpc, UNUSED unsigned reg, UNUSED bool is_load) {
printf("adr: %08x\n", ctx->op);
return (tdis_ret) {false};
}
-__attribute__((noinline))
+NOINLINE
+static tdis_ret P_ret(struct tc *ctx) {
+ printf("ret: %08x\n", ctx->op);
+ return (tdis_ret) {false};
+}
+
+NOINLINE
static tdis_ret P_branch(struct tc *ctx, UNUSED uint32_t dpc) {
printf("branch: %08x\n", ctx->op);
return (tdis_ret) {false};
}
-__attribute__((noinline))
+NOINLINE
static tdis_ret P_unidentified(struct tc *ctx) {
printf("unidentified: %08x\n", ctx->op);
return (tdis_ret) {false};