summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu
diff options
context:
space:
mode:
author AJR <ariedlmayer@gmail.com>2025-03-21 14:21:08 -0400
committer AJR <ariedlmayer@gmail.com>2025-03-21 14:21:08 -0400
commite3997fb6b2caefaeba23cc6f3d3b67013ece87fb (patch)
treef62c31bd156c94b0d56fa88050c952898aae3115 /src/devices/cpu
parent5954767b0b4da0c43f7194c7def4c162fbc8ef78 (diff)
Revert "i960: don't preserve sign bit when shifting integer left (#13507)"
This reverts commit 5954767b0b4da0c43f7194c7def4c162fbc8ef78. This was merged way too hastily based on incomplete information.
Diffstat (limited to 'src/devices/cpu')
-rw-r--r--src/devices/cpu/i960/i960.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index 40bda560f40..7d31ad031bf 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -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, t1 >= 32 ? 0 : ((int32_t)t2) << t1);
+ set_ri(opcode, (t2 & 0x80000000) | (t1 >= 32 ? 0 : (t2<<t1) & 0x7fffffff)); // sign is preserved
break;
default: