diff mbox series

[for-6.2,30/43] target/s390x: Use MO_128 for 16 byte atomics

Message ID 20210729004647.282017-31-richard.henderson@linaro.org
State Superseded
Headers show
Series Unaligned accesses for user-only | expand

Commit Message

Richard Henderson July 29, 2021, 12:46 a.m. UTC
Cc: qemu-s390x@nongnu.org
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/s390x/tcg/mem_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.25.1

Comments

Philippe Mathieu-Daudé July 29, 2021, 6:33 a.m. UTC | #1
On 7/29/21 2:46 AM, Richard Henderson wrote:
> Cc: qemu-s390x@nongnu.org

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  target/s390x/tcg/mem_helper.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
David Hildenbrand July 29, 2021, 8:04 a.m. UTC | #2
On 29.07.21 02:46, Richard Henderson wrote:
> Cc: qemu-s390x@nongnu.org

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>   target/s390x/tcg/mem_helper.c | 4 ++--

>   1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c

> index ec88f5dbb0..3782c1c098 100644

> --- a/target/s390x/tcg/mem_helper.c

> +++ b/target/s390x/tcg/mem_helper.c

> @@ -1810,7 +1810,7 @@ void HELPER(cdsg_parallel)(CPUS390XState *env, uint64_t addr,

>       assert(HAVE_CMPXCHG128);

>   

>       mem_idx = cpu_mmu_index(env, false);

> -    oi = make_memop_idx(MO_TEQ | MO_ALIGN_16, mem_idx);

> +    oi = make_memop_idx(MO_TE | MO_128 | MO_ALIGN, mem_idx);

>       oldv = cpu_atomic_cmpxchgo_be_mmu(env, addr, cmpv, newv, oi, ra);

>       fail = !int128_eq(oldv, cmpv);

>   

> @@ -1939,7 +1939,7 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,

>                   cpu_stq_data_ra(env, a1 + 0, int128_gethi(nv), ra);

>                   cpu_stq_data_ra(env, a1 + 8, int128_getlo(nv), ra);

>               } else if (HAVE_CMPXCHG128) {

> -                MemOpIdx oi = make_memop_idx(MO_TEQ | MO_ALIGN_16, mem_idx);

> +                MemOpIdx oi = make_memop_idx(MO_TE | MO_128 | MO_ALIGN, mem_idx);

>                   ov = cpu_atomic_cmpxchgo_be_mmu(env, a1, cv, nv, oi, ra);

>                   cc = !int128_eq(ov, cv);

>               } else {

> 


Reviewed-by: David Hildenbrand <david@redhat.com>


-- 
Thanks,

David / dhildenb
diff mbox series

Patch

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index ec88f5dbb0..3782c1c098 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -1810,7 +1810,7 @@  void HELPER(cdsg_parallel)(CPUS390XState *env, uint64_t addr,
     assert(HAVE_CMPXCHG128);
 
     mem_idx = cpu_mmu_index(env, false);
-    oi = make_memop_idx(MO_TEQ | MO_ALIGN_16, mem_idx);
+    oi = make_memop_idx(MO_TE | MO_128 | MO_ALIGN, mem_idx);
     oldv = cpu_atomic_cmpxchgo_be_mmu(env, addr, cmpv, newv, oi, ra);
     fail = !int128_eq(oldv, cmpv);
 
@@ -1939,7 +1939,7 @@  static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
                 cpu_stq_data_ra(env, a1 + 0, int128_gethi(nv), ra);
                 cpu_stq_data_ra(env, a1 + 8, int128_getlo(nv), ra);
             } else if (HAVE_CMPXCHG128) {
-                MemOpIdx oi = make_memop_idx(MO_TEQ | MO_ALIGN_16, mem_idx);
+                MemOpIdx oi = make_memop_idx(MO_TE | MO_128 | MO_ALIGN, mem_idx);
                 ov = cpu_atomic_cmpxchgo_be_mmu(env, a1, cv, nv, oi, ra);
                 cc = !int128_eq(ov, cv);
             } else {