PCem

changeset 47:2bee94e6b42f

Fixed zero flag on byte & word SHL - Windows 98 setup works again.
author TomW
date Sun Dec 08 19:43:54 2013 +0000
parents f9ec91752d3e
children b61adb8876e6
files src/x86_ops_shift.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/x86_ops_shift.h	Sat Dec 07 14:02:03 2013 +0000
     1.2 +++ b/src/x86_ops_shift.h	Sun Dec 08 19:43:54 2013 +0000
     1.3 @@ -66,7 +66,7 @@
     1.4                          break;                                                          \
     1.5                          case 0x20: case 0x30: /*SHL b,CL*/                              \
     1.6                          seteab(temp << c);      if (abrt) return 0;                     \
     1.7 -                        set_flags_shift(FLAGS_SHL8, temp_orig, c, temp << c);           \
     1.8 +                        set_flags_shift(FLAGS_SHL8, temp_orig, c, (temp << c) & 0xff);  \
     1.9                          if ((temp << (c - 1)) & 0x80) flags |= C_FLAG;                  \
    1.10                          cycles -= ((mod == 3) ? 3 : 7);                                 \
    1.11                          break;                                                          \
    1.12 @@ -160,7 +160,7 @@
    1.13                          break;                                                          \
    1.14                          case 0x20: case 0x30: /*SHL w, c*/                              \
    1.15                          seteaw(temp << c);      if (abrt) return 0;                     \
    1.16 -                        set_flags_shift(FLAGS_SHL16, temp_orig, c, temp << c);          \
    1.17 +                        set_flags_shift(FLAGS_SHL16, temp_orig, c, (temp << c) & 0xffff); \
    1.18                          if ((temp << (c - 1)) & 0x8000) flags |= C_FLAG;                \
    1.19                          cycles -= ((mod == 3) ? 3 : 7);                                 \
    1.20                          break;                                                          \