From cf6a0973d1948d237540e7226df3fd0a4b6aa129 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 13 Mar 2023 18:07:50 +0100 Subject: adsp2100: fix regression with ABS opcode S flag [mjrgh] --- src/devices/cpu/adsp2100/2100ops.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/devices/cpu/adsp2100/2100ops.hxx b/src/devices/cpu/adsp2100/2100ops.hxx index c5bc2bc90cc..0eab17b5ad6 100644 --- a/src/devices/cpu/adsp2100/2100ops.hxx +++ b/src/devices/cpu/adsp2100/2100ops.hxx @@ -834,6 +834,7 @@ void adsp21xx_device::alu_op_ar(int op) xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; CLR_FLAGS; + CLR_S; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; if (xop & 0x8000) SET_S; @@ -960,6 +961,7 @@ void adsp21xx_device::alu_op_ar_const(int op) xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; CLR_FLAGS; + CLR_S; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; if (xop & 0x8000) SET_S; @@ -1098,6 +1100,7 @@ void adsp21xx_device::alu_op_af(int op) xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; CLR_FLAGS; + CLR_S; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; if (xop & 0x8000) SET_S; @@ -1221,6 +1224,7 @@ void adsp21xx_device::alu_op_af_const(int op) xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; CLR_FLAGS; + CLR_S; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; if (xop & 0x8000) SET_S; @@ -1356,6 +1360,7 @@ void adsp21xx_device::alu_op_none(int op) xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; CLR_FLAGS; + CLR_S; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; if (xop & 0x8000) SET_S; -- cgit v1.2.3