commit a41c311aaba1ff822cdc8d8d9ce51054bf597684
parent 282c6929df2023a780ac30eed224a180a6a05406
Author: Gabriel G. de Brito <gabrielgbrito@icloud.com>
Date: Tue, 1 Apr 2025 09:30:51 -0300
Fixed overflow avoidance code causing slr to not work in REDUX-V
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/reduxv/reduxv.go b/reduxv/reduxv.go
@@ -168,7 +168,7 @@ func (m *ReduxV) NextInstruction() (*machine.Call, error) {
case 0xd:
m.SetRegister(uint64(ra), rav-rbv)
case 0xe:
- m.SetRegister(uint64(ra), rav<<rbv)
+ m.SetRegister(uint64(ra), (rav<<rbv)&0xff)
case 0xf:
m.SetRegister(uint64(ra), rav>>rbv)
}