diff options
author | hap <happppp@users.noreply.github.com> | 2020-06-25 10:08:23 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2020-06-25 10:08:39 +0200 |
commit | 7664bed4b7d54296c7c3de1efa36c241051c41b8 (patch) | |
tree | 59e34657fea5d5a0ad9ffba381e38a78b033603a | |
parent | f30c2f6eece13ec7ad0dc0ae705e7cca2fa8e165 (diff) |
i86: Fixed old regression with NEG opcode flags. [dink/fbneo]
-rw-r--r-- | src/devices/cpu/i86/i86.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/devices/cpu/i86/i86.cpp b/src/devices/cpu/i86/i86.cpp index 50d2039569a..2ded7b638eb 100644 --- a/src/devices/cpu/i86/i86.cpp +++ b/src/devices/cpu/i86/i86.cpp @@ -2266,10 +2266,10 @@ bool i8086_common_cpu_device::common_op(uint8_t op) CLKM(NEGNOT_R8,NEGNOT_M8); break; case 0x18: /* NEG */ - m_CarryVal = (tmp!=0) ? 1 : 0; - tmp = (~tmp)+1; - set_SZPF_Byte(tmp); - PutbackRMByte(tmp&0xff); + m_dst = 0; + m_src = tmp; + SUBB(); + PutbackRMByte(m_dst); CLKM(NEGNOT_R8,NEGNOT_M8); break; case 0x20: /* MUL */ @@ -2356,10 +2356,10 @@ bool i8086_common_cpu_device::common_op(uint8_t op) CLKM(NEGNOT_R16,NEGNOT_M16); break; case 0x18: /* NEG */ - m_CarryVal = (tmp!=0) ? 1 : 0; - tmp = (~tmp) + 1; - set_SZPF_Word(tmp); - PutbackRMWord(tmp); + m_dst = 0; + m_src = tmp; + SUBX(); + PutbackRMWord(m_dst); CLKM(NEGNOT_R16,NEGNOT_M16); break; case 0x20: /* MUL */ |