summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/h8
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2014-03-26 08:55:28 +0000
committer Olivier Galibert <galibert@pobox.com>2014-03-26 08:55:28 +0000
commitff8a1bfe4ca920286a9a1e748137ac738bc998ca (patch)
treef79fdc3c5a70c3d244eb6c4b1f76a910b76b570c /src/emu/cpu/h8
parent878beeaa4d90e24948f181c1640d824054528f95 (diff)
h8: dec16/inc16 fix [Fabio Priuli]
Diffstat (limited to 'src/emu/cpu/h8')
-rw-r--r--src/emu/cpu/h8/h8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/cpu/h8/h8.c b/src/emu/cpu/h8/h8.c
index edcdaa9ee7d..53dd45effb5 100644
--- a/src/emu/cpu/h8/h8.c
+++ b/src/emu/cpu/h8/h8.c
@@ -617,7 +617,7 @@ UINT16 h8_device::do_inc16(UINT16 v1, UINT16 v2)
CCR &= ~(F_N|F_V|F_Z);
if(!res)
CCR |= F_Z;
- else if(INT32(res) < 0)
+ else if(INT16(res) < 0)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x8000)
CCR |= F_V;
@@ -709,7 +709,7 @@ UINT16 h8_device::do_dec16(UINT16 v1, UINT16 v2)
CCR &= ~(F_N|F_V|F_Z);
if(!res)
CCR |= F_Z;
- else if(INT32(res) < 0)
+ else if(INT16(res) < 0)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x8000)
CCR |= F_V;