diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-06-04 22:20:34 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 15:25:14 -0700 |
commit | c0080f1bdbb409b12aa07c2a18caf3ff6a7c1f65 (patch) | |
tree | 7c774f7c66099fc4d2a3053cc63a12cb231ffcb8 | |
parent | c21b610f58f0334aa7f3ddca86efb488d4a92085 (diff) | |
download | qemu-c0080f1bdbb409b12aa07c2a18caf3ff6a7c1f65.zip |
target/s390x: check alignment in CDSG in the !CONFIG_ATOMIC128 case
The CDSG instruction requires a 16-byte alignement, as expressed in
the MO_ALIGN_16 passed to helper_atomic_cmpxchgo_be_mmu. In the non
parallel case, use check_alignment to enforce this.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170604202034.16615-4-aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
-rw-r--r-- | target/s390x/mem_helper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index a8988e0293..80caab9c9d 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -1262,6 +1262,8 @@ void HELPER(cdsg)(CPUS390XState *env, uint64_t addr, } else { uint64_t oldh, oldl; + check_alignment(env, addr, 16, ra); + oldh = cpu_ldq_data_ra(env, addr + 0, ra); oldl = cpu_ldq_data_ra(env, addr + 8, ra); |