about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-11 18:09:08 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-11 18:09:08 +0100
commit70e4bd417426ff75f98d4e2112d433110310db8c (patch)
tree52457bc6c5f578f810294e48800533bd589d8ece /src
parent7e0e61822271d88f1bd7c8eb8e1fd3d8a08c0249 (diff)
downloadbox64-70e4bd417426ff75f98d4e2112d433110310db8c.tar.gz
box64-70e4bd417426ff75f98d4e2112d433110310db8c.zip
[INTERPRETER] Small adjustment on shl flag computation
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run_private.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/emu/x64run_private.c b/src/emu/x64run_private.c
index a85495a9..4e8ec879 100644
--- a/src/emu/x64run_private.c
+++ b/src/emu/x64run_private.c
@@ -480,11 +480,11 @@ void UpdateFlags(x64emu_t *emu)
                     CONDITIONAL_SET_FLAG((emu->res.u16 & 0xffff) == 0, F_ZF);
                     CONDITIONAL_SET_FLAG(emu->res.u16 & 0x8000, F_SF);
                     CONDITIONAL_SET_FLAG(PARITY(emu->res.u16 & 0xff), F_PF);
-                }
-                if (cnt == 1) {
-                    CONDITIONAL_SET_FLAG(((!!(emu->res.u16 & 0x8000)) ^(ACCESS_FLAG(F_CF) != 0)), F_OF);
-                } else {
-                    CLEAR_FLAG(F_OF);
+                    if (cnt == 1) {
+                        CONDITIONAL_SET_FLAG(((!!(emu->res.u16 & 0x8000)) ^(ACCESS_FLAG(F_CF) != 0)), F_OF);
+                    } else {
+                        CLEAR_FLAG(F_OF);
+                    }
                 }
             } else {
                 CONDITIONAL_SET_FLAG((emu->op1.u16 << (emu->op2.u16-1)) & 0x8000, F_CF);
@@ -503,12 +503,12 @@ void UpdateFlags(x64emu_t *emu)
                     CONDITIONAL_SET_FLAG(!emu->res.u32, F_ZF);
                     CONDITIONAL_SET_FLAG(emu->res.u32 & 0x80000000, F_SF);
                     CONDITIONAL_SET_FLAG(PARITY(emu->res.u32 & 0xff), F_PF);
-                }
-                if (cnt == 1) {
-                    CONDITIONAL_SET_FLAG(((!!(emu->res.u32 & 0x80000000)) ^
-                                            (ACCESS_FLAG(F_CF) != 0)), F_OF);
-                } else {
-                    CLEAR_FLAG(F_OF);
+                    if (cnt == 1) {
+                        CONDITIONAL_SET_FLAG(((!!(emu->res.u32 & 0x80000000)) ^
+                                                (ACCESS_FLAG(F_CF) != 0)), F_OF);
+                    } else {
+                        CLEAR_FLAG(F_OF);
+                    }
                 }
             } else {
                 CONDITIONAL_SET_FLAG((emu->op1.u32 << (emu->op2.u32-1)) & 0x80000000, F_CF);
@@ -525,12 +525,12 @@ void UpdateFlags(x64emu_t *emu)
                 CONDITIONAL_SET_FLAG(!emu->res.u64, F_ZF);
                 CONDITIONAL_SET_FLAG(emu->res.u64 & 0x8000000000000000LL, F_SF);
                 CONDITIONAL_SET_FLAG(PARITY(emu->res.u64 & 0xff), F_PF);
-            }
-            if (emu->op2.u64 == 1) {
-                CONDITIONAL_SET_FLAG(((!!(emu->res.u64 & 0x8000000000000000LL)) ^
-                                        (ACCESS_FLAG(F_CF) != 0)), F_OF);
-            } else {
-                CLEAR_FLAG(F_OF);
+                if (emu->op2.u64 == 1) {
+                    CONDITIONAL_SET_FLAG(((!!(emu->res.u64 & 0x8000000000000000LL)) ^
+                                            (ACCESS_FLAG(F_CF) != 0)), F_OF);
+                } else {
+                    CLEAR_FLAG(F_OF);
+                }
             }
             break;
         case d_sar8: