From b1833266e096737e498b67c065aa81cee64fa09b Mon Sep 17 00:00:00 2001 From: mumbel <22204578+mumbel@users.noreply.github.com> Date: Tue, 30 Jul 2019 17:30:32 -0500 Subject: [PATCH] fixup a refactor bug in shifting --- Ghidra/Processors/SuperH/data/languages/superh.sinc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/Processors/SuperH/data/languages/superh.sinc b/Ghidra/Processors/SuperH/data/languages/superh.sinc index 75cd4f6ee7..6205a0c2e4 100644 --- a/Ghidra/Processors/SuperH/data/languages/superh.sinc +++ b/Ghidra/Processors/SuperH/data/languages/superh.sinc @@ -1296,7 +1296,7 @@ imm20s: "#"value is l_simm20_20_23 & l_simm20_00_16 temp = ((rn_08_11 & 0x80000000) != 0); - rn_08_11 = rn_08_11 | zext($(T_FLAG)); + rn_08_11 = (rn_08_11 << 1) | zext($(T_FLAG)); $(T_FLAG) = temp; } @@ -1307,7 +1307,7 @@ imm20s: "#"value is l_simm20_20_23 & l_simm20_00_16 temp = !((rn_08_11 & 1) == 0); - rn_08_11= rn_08_11 | (0x80000000 * zext($(T_FLAG))); + rn_08_11= (rn_08_11 >> 1) | (0x80000000 * zext($(T_FLAG))); $(T_FLAG) = temp; }