ref: 2619be4d4d175a1ad4782bcd298b8ff37141135d
parent: 0b9c6fa117c3fe571aed497579b3340b2f8a1164
author: Alex Musolino <[email protected]>
date: Sat Nov 28 18:02:28 EST 2020
games/mix: fix SLAX and SRAX instructions (thanks nicolagi) MIX shift instructions shift by bytes not bits.
--- a/sys/src/games/mix/mix.c
+++ b/sys/src/games/mix/mix.c
@@ -668,9 +668,9 @@
rax |= rx & MASK5;
rx &= ~MASK5;
if(left)
- rax <<= m;
+ rax <<= m*BITS;
else
- rax >>= m;
+ rax >>= m*BITS;
rx |= rax & MASK5;
ra |= rax>>5*BITS & MASK5;
}