From 9f5e492c5f70588f8ef07619530ad7ac298c27fe Mon Sep 17 00:00:00 2001 From: Rot127 Date: Fri, 5 Jan 2024 10:18:35 -0500 Subject: [PATCH] Return empty ESIL for new instructions which have immediates where previously regs were assumed. --- librz/analysis/arch/arm/arm_esil64.c | 3 +++ test/db/esil/arm_64 | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/librz/analysis/arch/arm/arm_esil64.c b/librz/analysis/arch/arm/arm_esil64.c index 4760b64177b..268933020bc 100644 --- a/librz/analysis/arch/arm/arm_esil64.c +++ b/librz/analysis/arch/arm/arm_esil64.c @@ -244,6 +244,9 @@ static void shifted_reg64_append(RzStrBuf *sb, csh *handle, cs_insn *insn, int n // got rid of the opchar= pattern here because it caused missing operators to fail silently // and makes things more complicated with very little benefit static void arm64math(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn, const char *opchar, int negate) { + if (ISIMM64(0) || ISIMM64(1)) { + return; + } const char *r0 = REG64(0); const char *r1 = REG64(1); diff --git a/test/db/esil/arm_64 b/test/db/esil/arm_64 index ec7995a6bae..d085f1d2c69 100644 --- a/test/db/esil/arm_64 +++ b/test/db/esil/arm_64 @@ -899,3 +899,18 @@ EXPECT=<