Commit 56763352e7 for qemu.org

commit 56763352e76a97fb982a9fef850173b36601a4c4
Author: Richard Henderson <richard.henderson@linaro.org>
Date:   Tue Jan 13 11:46:51 2026 +1100

    target/s390x: Simplify atomicity check in do_csst

    We should have used MO_{32,64} from the start, rather than
    raw integer constants.  However, now that the CONFIG_ATOMIC64
    test has been removed, we can remove the 'max' variable and
    simplify the two blocks.

    Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 0b8b6d3bbb..2a79a789f6 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -1813,13 +1813,10 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
      * restart early if we can't support either operation that is supposed
      * to be atomic.
      */
-    if (parallel) {
-        uint32_t max = 2;
-        max = 3;
-        if ((HAVE_CMPXCHG128 ? 0 : fc + 2 > max) ||
-            (HAVE_ATOMIC128_RW ? 0 : sc > max)) {
-            cpu_loop_exit_atomic(env_cpu(env), ra);
-        }
+    if (parallel &&
+        ((!HAVE_CMPXCHG128 && fc + 2 > MO_64) ||
+         (!HAVE_ATOMIC128_RW && sc > MO_64))) {
+        cpu_loop_exit_atomic(env_cpu(env), ra);
     }

     /*