mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-09 17:47:33 +00:00
tcg: Initialize return value after exit_atomic
Users of tcg_gen_atomic_cmpxchg and do_atomic_op rightfully utilize the output. Even though this code is dead, it gets translated, and without the initialization we encounter a tcg_error. Backports commit 79b1af906245558c30e0a5faf26cb52b63f83cce from qemu
This commit is contained in:
parent
108354cc4a
commit
69116abafc
|
@ -2924,6 +2924,9 @@ void tcg_gen_atomic_cmpxchg_i64(TCGContext *s,
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
gen_helper_exit_atomic(s, s->tcg_env);
|
gen_helper_exit_atomic(s, s->tcg_env);
|
||||||
|
/* Produce a result, so that we have a well-formed opcode stream
|
||||||
|
with respect to uses of the result in the (dead) code following. */
|
||||||
|
tcg_gen_movi_i64(s, retv, 0);
|
||||||
#endif /* CONFIG_ATOMIC64 */
|
#endif /* CONFIG_ATOMIC64 */
|
||||||
} else {
|
} else {
|
||||||
TCGv_i32 c32 = tcg_temp_new_i32(s);
|
TCGv_i32 c32 = tcg_temp_new_i32(s);
|
||||||
|
@ -3033,6 +3036,9 @@ static void do_atomic_op_i64(TCGContext *s,
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
gen_helper_exit_atomic(s, s->tcg_env);
|
gen_helper_exit_atomic(s, s->tcg_env);
|
||||||
|
/* Produce a result, so that we have a well-formed opcode stream
|
||||||
|
with respect to uses of the result in the (dead) code following. */
|
||||||
|
tcg_gen_movi_i64(s, ret, 0);
|
||||||
#endif /* CONFIG_ATOMIC64 */
|
#endif /* CONFIG_ATOMIC64 */
|
||||||
} else {
|
} else {
|
||||||
TCGv_i32 v32 = tcg_temp_new_i32(s);
|
TCGv_i32 v32 = tcg_temp_new_i32(s);
|
||||||
|
|
Loading…
Reference in a new issue