diff options
author | yz70s <yz70s@users.noreply.github.com> | 2015-03-03 23:00:15 +0100 |
---|---|---|
committer | yz70s <yz70s@users.noreply.github.com> | 2015-03-03 23:03:44 +0100 |
commit | 556b4259c9ffe8ff847b0c8375b71a29a75cdab0 (patch) | |
tree | ada5bb77cbc529f1728b4d217fd1dc0464ad3f5f | |
parent | dd7ea6355b8bbdfa743e347f5321302df0ae6831 (diff) |
i386.c: x87 condition code flag C1 must be 1 in case of a stack overflow, 0 in case of a stack undeflow (nw)
-rw-r--r-- | src/emu/cpu/i386/x87ops.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/cpu/i386/x87ops.inc b/src/emu/cpu/i386/x87ops.inc index d46f27f2fe5..545e9e8e684 100644 --- a/src/emu/cpu/i386/x87ops.inc +++ b/src/emu/cpu/i386/x87ops.inc @@ -226,13 +226,13 @@ void i386_device::x87_write_stack(int i, floatx80 value, int update_tag) void i386_device::x87_set_stack_underflow() { - m_x87_sw |= X87_SW_C1 | X87_SW_IE | X87_SW_SF; + m_x87_sw &= ~X87_SW_C1; + m_x87_sw |= X87_SW_IE | X87_SW_SF; } void i386_device::x87_set_stack_overflow() { - m_x87_sw &= ~X87_SW_C1; - m_x87_sw |= X87_SW_IE | X87_SW_SF; + m_x87_sw |= X87_SW_C1 | X87_SW_IE | X87_SW_SF; } int i386_device::x87_inc_stack() |