i960: don't preserve sign bit when shifting integer left (#13507)

This commit is contained in:
Matthew Daniels 2025-03-21 18:02:43 +00:00 committed by GitHub
parent 49e7a4a464
commit 5954767b0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1157,7 +1157,7 @@ void i960_cpu_device::execute_op(uint32_t opcode)
m_icount--;
t1 = get_1_ri(opcode);
t2 = get_2_ri(opcode);
set_ri(opcode, (t2 & 0x80000000) | (t1 >= 32 ? 0 : (t2<<t1) & 0x7fffffff)); // sign is preserved
set_ri(opcode, t1 >= 32 ? 0 : ((int32_t)t2) << t1);
break;
default: