From e761114740c0c7e0aa8091d3141c0e449c6cac54 Mon Sep 17 00:00:00 2001 From: TomW Date: Sun, 8 Dec 2013 19:43:54 +0000 Subject: [PATCH] Fixed zero flag on byte & word SHL - Windows 98 setup works again. --- src/x86_ops_shift.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x86_ops_shift.h b/src/x86_ops_shift.h index 6f1eed6..d4a7c4a 100644 --- a/src/x86_ops_shift.h +++ b/src/x86_ops_shift.h @@ -66,7 +66,7 @@ break; \ case 0x20: case 0x30: /*SHL b,CL*/ \ seteab(temp << c); if (abrt) return 0; \ - set_flags_shift(FLAGS_SHL8, temp_orig, c, temp << c); \ + set_flags_shift(FLAGS_SHL8, temp_orig, c, (temp << c) & 0xff); \ if ((temp << (c - 1)) & 0x80) flags |= C_FLAG; \ cycles -= ((mod == 3) ? 3 : 7); \ break; \ @@ -160,7 +160,7 @@ break; \ case 0x20: case 0x30: /*SHL w, c*/ \ seteaw(temp << c); if (abrt) return 0; \ - set_flags_shift(FLAGS_SHL16, temp_orig, c, temp << c); \ + set_flags_shift(FLAGS_SHL16, temp_orig, c, (temp << c) & 0xffff); \ if ((temp << (c - 1)) & 0x8000) flags |= C_FLAG; \ cycles -= ((mod == 3) ? 3 : 7); \ break; \