* [Qemu-devel] [PULL] tcg queued patch @ 2017-04-26 17:30 Richard Henderson 2017-04-26 17:30 ` [Qemu-devel] [PULL] tcg: Initialize return value after exit_atomic Richard Henderson 2017-04-26 20:28 ` [Qemu-devel] [PULL] tcg queued patch Peter Maydell 0 siblings, 2 replies; 3+ messages in thread From: Richard Henderson @ 2017-04-26 17:30 UTC (permalink / raw) To: qemu-devel; +Cc: peter.maydell, stefanha Fixes a tcg_error when building with clang on some hosts. r~ The following changes since commit 51b9d495f2a99c65c9e524c8f6fe283ebfabae1d: Revert "COLO-compare: Optimize tcp compare trace event" (2017-04-26 16:19:27 +0100) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-tcg-20170426 for you to fetch changes up to 79b1af906245558c30e0a5faf26cb52b63f83cce: tcg: Initialize return value after exit_atomic (2017-04-26 19:26:11 +0200) ---------------------------------------------------------------- Fix for exit_atomic tcg opcode paths ---------------------------------------------------------------- Richard Henderson (1): tcg: Initialize return value after exit_atomic tcg/tcg-op.c | 6 ++++++ 1 file changed, 6 insertions(+) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL] tcg: Initialize return value after exit_atomic 2017-04-26 17:30 [Qemu-devel] [PULL] tcg queued patch Richard Henderson @ 2017-04-26 17:30 ` Richard Henderson 2017-04-26 20:28 ` [Qemu-devel] [PULL] tcg queued patch Peter Maydell 1 sibling, 0 replies; 3+ messages in thread From: Richard Henderson @ 2017-04-26 17:30 UTC (permalink / raw) To: qemu-devel; +Cc: peter.maydell, stefanha 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. Reported-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Tested-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Tested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net> --- tcg/tcg-op.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 95a39b7..6b1f415 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -2861,6 +2861,9 @@ void tcg_gen_atomic_cmpxchg_i64(TCGv_i64 retv, TCGv addr, TCGv_i64 cmpv, #endif #else gen_helper_exit_atomic(tcg_ctx.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(retv, 0); #endif /* CONFIG_ATOMIC64 */ } else { TCGv_i32 c32 = tcg_temp_new_i32(); @@ -2966,6 +2969,9 @@ static void do_atomic_op_i64(TCGv_i64 ret, TCGv addr, TCGv_i64 val, #endif #else gen_helper_exit_atomic(tcg_ctx.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(ret, 0); #endif /* CONFIG_ATOMIC64 */ } else { TCGv_i32 v32 = tcg_temp_new_i32(); -- 2.9.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL] tcg queued patch 2017-04-26 17:30 [Qemu-devel] [PULL] tcg queued patch Richard Henderson 2017-04-26 17:30 ` [Qemu-devel] [PULL] tcg: Initialize return value after exit_atomic Richard Henderson @ 2017-04-26 20:28 ` Peter Maydell 1 sibling, 0 replies; 3+ messages in thread From: Peter Maydell @ 2017-04-26 20:28 UTC (permalink / raw) To: Richard Henderson; +Cc: QEMU Developers, Stefan Hajnoczi On 26 April 2017 at 18:30, Richard Henderson <rth@twiddle.net> wrote: > Fixes a tcg_error when building with clang on some hosts. > > > r~ > > > The following changes since commit 51b9d495f2a99c65c9e524c8f6fe283ebfabae1d: > > Revert "COLO-compare: Optimize tcp compare trace event" (2017-04-26 16:19:27 +0100) > > are available in the git repository at: > > git://github.com/rth7680/qemu.git tags/pull-tcg-20170426 > > for you to fetch changes up to 79b1af906245558c30e0a5faf26cb52b63f83cce: > > tcg: Initialize return value after exit_atomic (2017-04-26 19:26:11 +0200) > > ---------------------------------------------------------------- > Fix for exit_atomic tcg opcode paths > > ---------------------------------------------------------------- > Richard Henderson (1): > tcg: Initialize return value after exit_atomic > > tcg/tcg-op.c | 6 ++++++ > 1 file changed, 6 insertions(+) Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-26 20:29 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-26 17:30 [Qemu-devel] [PULL] tcg queued patch Richard Henderson 2017-04-26 17:30 ` [Qemu-devel] [PULL] tcg: Initialize return value after exit_atomic Richard Henderson 2017-04-26 20:28 ` [Qemu-devel] [PULL] tcg queued patch Peter Maydell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).