From d454912a877fc15e76940a32b671016736dcd68b Mon Sep 17 00:00:00 2001 From: ghidorahrex Date: Mon, 2 Dec 2019 13:37:50 -0500 Subject: [PATCH] GT-3278: Corrected XGATE ROR instruction semantics. --- Ghidra/Processors/HCS12/data/languages/XGATE.sinc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/Processors/HCS12/data/languages/XGATE.sinc b/Ghidra/Processors/HCS12/data/languages/XGATE.sinc index 8759ed7a1e..1dcbd04c7a 100644 --- a/Ghidra/Processors/HCS12/data/languages/XGATE.sinc +++ b/Ghidra/Processors/HCS12/data/languages/XGATE.sinc @@ -762,7 +762,7 @@ rd_hi: reg8 is reg8 & reg8_hi { export reg8_hi; } :ROR rd, ximm4 is opcode=0x1 & rd & ximm4 & op3=0xf { local cnt:2 = ximm4; - rd = (rd >> cnt) | (rd << (16 - rd)); + rd = (rd >> cnt) | (rd << (16 - cnt)); default_flags(rd); } @@ -770,7 +770,7 @@ rd_hi: reg8 is reg8 & reg8_hi { export reg8_hi; } :ROR rd, rs1 is opcode=0x1 & rd & rs1 & op4=0x17 { local cnt:2 = rs1 & 0xf; - rd = (rd >> cnt) | (rd << (16 - rd)); + rd = (rd >> cnt) | (rd << (16 - cnt)); default_flags(rd); }