]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/m68k: Fix coding style in m68k_interrupt_all
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 2 Jun 2022 01:33:47 +0000 (18:33 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 2 Jun 2022 07:35:02 +0000 (09:35 +0200)
Add parenthesis around & vs &&.

Remove assignment to sr in function call argument -- note that
sr is unused after the call, so the assignment was never needed,
only the result of the & expression.

Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220602013401.303699-4-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
target/m68k/op_helper.c

index 2b94a6ec84de55e9b3189bea598ce65462187999..0f41c2dce3cca5dbcd098c5fa1f831b1bbf45cdc 100644 (file)
@@ -408,11 +408,11 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
         break;
 
     case EXCP_SPURIOUS ... EXCP_INT_LEVEL_7:
-        if (is_hw && oldsr & SR_M) {
+        if (is_hw && (oldsr & SR_M)) {
             do_stack_frame(env, &sp, 0, oldsr, 0, retaddr);
             oldsr = sr;
             env->aregs[7] = sp;
-            cpu_m68k_set_sr(env, sr &= ~SR_M);
+            cpu_m68k_set_sr(env, sr & ~SR_M);
             sp = env->aregs[7];
             if (!m68k_feature(env, M68K_FEATURE_UNALIGNED_DATA)) {
                 sp &= ~1;