From aca16bebbd40713761ec210e24717535f926f547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D8=B5=D8=B7=D9=81=D9=8A=20=D9=85=D8=AD=D9=85=D9=88?= =?UTF-8?q?=D8=AF=20=D9=83=D9=85=D8=A7=D9=84=20=D8=A7=D9=84=D8=AF=D9=8A?= =?UTF-8?q?=D9=86?= <48567303+moste00@users.noreply.github.com> Date: Fri, 31 May 2024 01:52:52 +0300 Subject: [PATCH] MSP430: Fix immediate value/memory distinction --- librz/arch/p/asm/asm_msp430.c | 8 +----- test/db/analysis/msp430 | 48 ++++++++++++++++----------------- test/db/asm/msp430 | 50 +++++++++++++++++------------------ 3 files changed, 50 insertions(+), 56 deletions(-) diff --git a/librz/arch/p/asm/asm_msp430.c b/librz/arch/p/asm/asm_msp430.c index 43ea2b12140..0724d125ada 100644 --- a/librz/arch/p/asm/asm_msp430.c +++ b/librz/arch/p/asm/asm_msp430.c @@ -21,13 +21,7 @@ static int disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len) { } else { rz_asm_op_set_asm(op, cmd.instr); } - char *buf_asm = rz_strbuf_get(&op->buf_asm); - if (a->syntax != RZ_ASM_SYNTAX_ATT) { - rz_str_replace_ch(buf_asm, '#', 0, 1); - // rz_str_replace_ch (buf_asm, "$", "$$", 1); - rz_str_replace_ch(buf_asm, '&', 0, 1); - rz_str_replace_ch(buf_asm, '%', 0, 1); - } + fail: return op->size = ret; } diff --git a/test/db/analysis/msp430 b/test/db/analysis/msp430 index 6644d653af6..45ab63d3d50 100644 --- a/test/db/analysis/msp430 +++ b/test/db/analysis/msp430 @@ -8,24 +8,24 @@ echo afi EOF EXPECT=<