* [Qemu-devel] [PATCH] target/xtensa: fix s32c1i TCGMemOp flags
@ 2018-09-11 1:32 Max Filippov
2018-09-12 16:42 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2018-09-11 1:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Max Filippov, qemu-stable
s32c1i must load and store value with target endianness, not host.
This results in an infinite loop in atomic cmpxchg sequences when target
endianness doesn't match host endianness.
Fixes: 9fb40342d4b3 ("target/xtensa: support MTTCG")
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
target/xtensa/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 25399058a0db..c626583cd952 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -2288,7 +2288,7 @@ static void translate_s32c1i(DisasContext *dc, const uint32_t arg[],
gen_load_store_alignment(dc, 2, addr, true);
gen_check_atomctl(dc, addr);
tcg_gen_atomic_cmpxchg_i32(cpu_R[arg[0]], addr, cpu_SR[SCOMPARE1],
- tmp, dc->cring, MO_32);
+ tmp, dc->cring, MO_TEUL);
tcg_temp_free(addr);
tcg_temp_free(tmp);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target/xtensa: fix s32c1i TCGMemOp flags
2018-09-11 1:32 [Qemu-devel] [PATCH] target/xtensa: fix s32c1i TCGMemOp flags Max Filippov
@ 2018-09-12 16:42 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2018-09-12 16:42 UTC (permalink / raw)
To: Max Filippov, qemu-devel; +Cc: qemu-stable
On 09/10/2018 06:32 PM, Max Filippov wrote:
> s32c1i must load and store value with target endianness, not host.
> This results in an infinite loop in atomic cmpxchg sequences when target
> endianness doesn't match host endianness.
>
> Fixes: 9fb40342d4b3 ("target/xtensa: support MTTCG")
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> target/xtensa/translate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-12 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 1:32 [Qemu-devel] [PATCH] target/xtensa: fix s32c1i TCGMemOp flags Max Filippov
2018-09-12 16:42 ` Richard Henderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.