In that commit the env->llval value is loaded as an unsigned value (instead of sign-extended as before and therefore the CMPXCHG in gen_st_cond() in translate.c fails.
An alternative solution would be to change the cmpxchg line to perform a non-sign-extended compare, i.e. replace
tcg_gen_atomic_cmpxchg_tl(t0, addr, cpu_llval, val, eva ? MIPS_HFLAG_UM : ctx->mem_idx, tcg_mo);
with
tcg_gen_atomic_cmpxchg_tl(t0, addr, cpu_llval, val, eva ? MIPS_HFLAG_UM : ctx->mem_idx, tcg_mo & ~MO_SIGN);
I cannot send this patch to the QEMU mailing list as I am not able to setup git-send-email.
Feel free to apply this commit or the alternative solution.
In that commit the env->llval value is loaded as an unsigned value (instead of sign-extended as before and therefore the CMPXCHG in gen_st_cond() in translate.c fails.
I have committed a fix for this issue as https:/ /github. com/CTSRD- CHERI/qemu/ commit/ a18d80c629989d0 02794f558968e15 61edaf3dfd
An alternative solution would be to change the cmpxchg line to perform a non-sign-extended compare, i.e. replace gen_atomic_ cmpxchg_ tl(t0, addr, cpu_llval, val,
eva ? MIPS_HFLAG_UM : ctx->mem_idx, tcg_mo); gen_atomic_ cmpxchg_ tl(t0, addr, cpu_llval, val,
eva ? MIPS_HFLAG_UM : ctx->mem_idx, tcg_mo & ~MO_SIGN);
tcg_
with
tcg_
I cannot send this patch to the QEMU mailing list as I am not able to setup git-send-email.
Feel free to apply this commit or the alternative solution.