From 94330e8cb98249162594e6febbe8f92cca87e775 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 17 Oct 2022 17:55:21 -0700 Subject: Fix rotate left to not drop the highest bit --- isa/decode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'isa/decode.cpp') diff --git a/isa/decode.cpp b/isa/decode.cpp index 03e2225..dde5b74 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp @@ -168,9 +168,9 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit } if (ral && !rar) { unsigned int x = (ctx.link.value() << 12) | ctx.acc.value(); - x = ((x << 1) & 07777) | (x >> 12); + x = ((x << 1) & 017777) | (x >> 12); if (bsw) - x = ((x << 1) & 07777) | (x >> 12); + x = ((x << 1) & 017777) | (x >> 12); ctx.link = x >> 12; ctx.acc = x & 07777; } -- cgit v1.2.3