diff options
author | 2011-03-10 07:42:35 +0000 | |
---|---|---|
committer | 2011-03-10 07:42:35 +0000 | |
commit | 88cf8e789651fb27088b9640f2c8b522e546a321 (patch) | |
tree | edd6b4e1ce24f7682ee20a2698d61177cd09d0cb /src/emu/cpu/adsp2100 | |
parent | 9d26109f6a087888cef07710d46743486c0e60e7 (diff) |
Fix long-standing bug in ABS flags in ADSP21xx core. [Christophe Jaillet]
Diffstat (limited to 'src/emu/cpu/adsp2100')
-rw-r--r-- | src/emu/cpu/adsp2100/2100ops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c index a9a613c2921..18d6f155a31 100644 --- a/src/emu/cpu/adsp2100/2100ops.c +++ b/src/emu/cpu/adsp2100/2100ops.c @@ -794,9 +794,9 @@ void adsp21xx_device::alu_op_ar(int op) /* ABS X */ xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; + CLR_FLAGS; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; - CLR_S; if (xop & 0x8000) SET_S; break; default: @@ -920,9 +920,9 @@ void adsp21xx_device::alu_op_ar_const(int op) /* ABS X */ xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; + CLR_FLAGS; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; - CLR_S; if (xop & 0x8000) SET_S; break; default: @@ -1058,9 +1058,9 @@ void adsp21xx_device::alu_op_af(int op) /* ABS X */ xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; + CLR_FLAGS; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; - CLR_S; if (xop & 0x8000) SET_S; break; default: @@ -1181,9 +1181,9 @@ void adsp21xx_device::alu_op_af_const(int op) /* ABS X */ xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; + CLR_FLAGS; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; - CLR_S; if (xop & 0x8000) SET_S; break; default: @@ -1316,9 +1316,9 @@ void adsp21xx_device::alu_op_none(int op) /* ABS X */ xop = ALU_GETXREG_UNSIGNED(xop); res = (xop & 0x8000) ? -xop : xop; + CLR_FLAGS; if (xop == 0) SET_Z; if (xop == 0x8000) SET_N, SET_V; - CLR_S; if (xop & 0x8000) SET_S; break; } |