From 4b97c29d400cee6cd2a9a7fa0c519cd7f184748c Mon Sep 17 00:00:00 2001 From: codefrog2002 <36536480+codefrog2002@users.noreply.github.com> Date: Fri, 17 Nov 2023 00:22:12 -0800 Subject: tms32025 neg instruction accidentally modifies the wrong status register - C_FLG is in ST1, not in ST0. Calling CLR0(C_FLG) or SET0(C_FLG) accidentally modifies ST0's INTM bit instead of ST1's C bit. (#11752) --- src/devices/cpu/tms32025/tms32025.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp index 86dbb05e48a..028c3e11f01 100644 --- a/src/devices/cpu/tms32025/tms32025.cpp +++ b/src/devices/cpu/tms32025/tms32025.cpp @@ -1178,8 +1178,8 @@ void tms32025_device::neg() if (OVM) m_ACC.d = 0x7fffffff; } else m_ACC.d = -m_ACC.d; - if (m_ACC.d) CLR0(C_FLAG); - else SET0(C_FLAG); + if (m_ACC.d) CLR1(C_FLAG); + else SET1(C_FLAG); } /* void tms32025_device::nop() { } // NOP is a subset of the MAR instruction -- cgit v1.2.3