target/arm: Fix non-parallel expansion of CASP

The second word has been loaded from the unincremented
address since the first commit.

Backports commit a036f5302c13634f3d375615b2949fd1fa1657b6 from qemu
This commit is contained in:
Richard Henderson 2019-03-26 20:30:49 -04:00 committed by Lioncash
parent df51e8bbb3
commit 2427ace0c0
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -2576,7 +2576,7 @@ static void gen_compare_and_swap_pair(DisasContext *s, int rs, int rt,
tcg_gen_qemu_ld_i64(s->uc, d1, clean_addr, memidx, tcg_gen_qemu_ld_i64(s->uc, d1, clean_addr, memidx,
MO_64 | MO_ALIGN_16 | s->be_data); MO_64 | MO_ALIGN_16 | s->be_data);
tcg_gen_addi_i64(tcg_ctx, a2, clean_addr, 8); tcg_gen_addi_i64(tcg_ctx, a2, clean_addr, 8);
tcg_gen_qemu_ld_i64(s->uc, d2, clean_addr, memidx, MO_64 | s->be_data); tcg_gen_qemu_ld_i64(s->uc, d2, a2, memidx, MO_64 | s->be_data);
/* Compare the two words, also in memory order. */ /* Compare the two words, also in memory order. */
tcg_gen_setcond_i64(tcg_ctx, TCG_COND_EQ, c1, d1, s1); tcg_gen_setcond_i64(tcg_ctx, TCG_COND_EQ, c1, d1, s1);