From 8c0b923455b833afb047c35bf6119b9fab5c84d0 Mon Sep 17 00:00:00 2001 From: pjht Date: Fri, 18 Nov 2022 16:03:11 -0600 Subject: [PATCH] Fix rotation of 8 being interpreted as 0 --- src/disas.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/disas.rs b/src/disas.rs index 61a9b39..3758b56 100644 --- a/src/disas.rs +++ b/src/disas.rs @@ -841,7 +841,11 @@ impl Disasm<'_, T> { let rotation = if ins_word[10] { Rotation::Register(ins_word[4..7].load_be::()) } else { - Rotation::Immediate(ins_word[4..7].load_be::()) + let mut rotation = ins_word[4..7].load_be::(); + if rotation == 0 { + rotation = 8; + } + Rotation::Immediate(rotation) }; (op, dst, rotation) };