From aaa744654bf3e93c842df1bee36ae8ba17318a10 Mon Sep 17 00:00:00 2001 From: redcode Date: Wed, 17 Oct 2018 03:31:12 +0200 Subject: [PATCH] VF computation bug fix. --- sources/Z80.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Z80.c b/sources/Z80.c index f0a4966..6963c7a 100644 --- a/sources/Z80.c +++ b/sources/Z80.c @@ -178,7 +178,7 @@ static zuint8 const pf_parity_table[256] = { #define PF_PARITY(value) pf_parity_table[value] #define VF(function, operand) \ -static Z_INLINE zuint8 pf_overflow_##function##8(zuint8 a, zuint8 b) \ +static Z_INLINE zuint8 pf_overflow_##function##8(zsint8 a, zsint8 b) \ { \ zsint total = ((zsint)a) operand ((zsint)b); \ \ @@ -190,7 +190,7 @@ VF(sub, -) #undef VF #define VF(function, bits, type, operand, minimum, maximum) \ -static Z_INLINE zuint8 pf_overflow_##function##bits(zuint##bits a, zuint##bits b, zuint8 carry) \ +static Z_INLINE zuint8 pf_overflow_##function##bits(zsint##bits a, zsint##bits b, zuint8 carry) \ { \ type total = ((type)a) operand ((type)b) operand carry; \ \