Skip to content

Commit c21751f

Browse files
committed
target/arm: Use MO_128 for 16 byte atomics
Cc: [email protected] Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
1 parent 7a7142f commit c21751f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

target/arm/helper-a64.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ uint64_t HELPER(paired_cmpxchg64_le_parallel)(CPUARMState *env, uint64_t addr,
560560
assert(HAVE_CMPXCHG128);
561561

562562
mem_idx = cpu_mmu_index(env, false);
563-
oi = make_memop_idx(MO_LEQ | MO_ALIGN_16, mem_idx);
563+
oi = make_memop_idx(MO_LE | MO_128 | MO_ALIGN, mem_idx);
564564

565565
cmpv = int128_make128(env->exclusive_val, env->exclusive_high);
566566
newv = int128_make128(new_lo, new_hi);
@@ -630,7 +630,7 @@ uint64_t HELPER(paired_cmpxchg64_be_parallel)(CPUARMState *env, uint64_t addr,
630630
assert(HAVE_CMPXCHG128);
631631

632632
mem_idx = cpu_mmu_index(env, false);
633-
oi = make_memop_idx(MO_BEQ | MO_ALIGN_16, mem_idx);
633+
oi = make_memop_idx(MO_BE | MO_128 | MO_ALIGN, mem_idx);
634634

635635
/*
636636
* High and low need to be switched here because this is not actually a
@@ -656,7 +656,7 @@ void HELPER(casp_le_parallel)(CPUARMState *env, uint32_t rs, uint64_t addr,
656656
assert(HAVE_CMPXCHG128);
657657

658658
mem_idx = cpu_mmu_index(env, false);
659-
oi = make_memop_idx(MO_LEQ | MO_ALIGN_16, mem_idx);
659+
oi = make_memop_idx(MO_LE | MO_128 | MO_ALIGN, mem_idx);
660660

661661
cmpv = int128_make128(env->xregs[rs], env->xregs[rs + 1]);
662662
newv = int128_make128(new_lo, new_hi);
@@ -677,7 +677,7 @@ void HELPER(casp_be_parallel)(CPUARMState *env, uint32_t rs, uint64_t addr,
677677
assert(HAVE_CMPXCHG128);
678678

679679
mem_idx = cpu_mmu_index(env, false);
680-
oi = make_memop_idx(MO_LEQ | MO_ALIGN_16, mem_idx);
680+
oi = make_memop_idx(MO_LE | MO_128 | MO_ALIGN, mem_idx);
681681

682682
cmpv = int128_make128(env->xregs[rs + 1], env->xregs[rs]);
683683
newv = int128_make128(new_lo, new_hi);

0 commit comments

Comments
 (0)