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 <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
---
 target/s390x/tcg/mem_helper.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

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);
     }
 
     /*
-- 
2.43.0


Reply via email to