@@ -3189,7 +3189,7 @@ static void do_nonatomic_op_i32(TCGv_i32 ret, TCGv addr, TCGv_i32 val,
memop = tcg_canonicalize_memop(memop, 0, 0);
- tcg_gen_qemu_ld_i32(t1, addr, idx, memop & ~MO_SIGN);
+ tcg_gen_qemu_ld_i32(t1, addr, idx, memop);
gen(t2, t1, val);
tcg_gen_qemu_st_i32(t2, addr, idx, memop);
@@ -3232,7 +3232,7 @@ static void do_nonatomic_op_i64(TCGv_i64 ret, TCGv addr, TCGv_i64 val,
memop = tcg_canonicalize_memop(memop, 1, 0);
- tcg_gen_qemu_ld_i64(t1, addr, idx, memop & ~MO_SIGN);
+ tcg_gen_qemu_ld_i64(t1, addr, idx, memop);
gen(t2, t1, val);
tcg_gen_qemu_st_i64(t2, addr, idx, memop);
As an op follows load, MO_SIGN should not be cleared. Thus, we can call tcg_gen_atomic_*_i64 with a smaller Memop than MO_Q. Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> --- tcg/tcg-op.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)