Two quick tcg-ish fixes
cover Two quick tcg-ish fixes
One found by Coverity and one found while working on some code destined for 2.11.
r~
Richard Henderson (2):
tcg/arm: Fix runtime overalignment test
target/s390x: Fix CSST for 16-byte store
target/s390x/mem_helper.c | 1 + tcg/arm/tcg-target.inc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.13.3
PATCH 1/2 tcg/arm: Fix runtime overalignment test
Patch 85aa80813dd changed the IF emitting the TST instruction, but failed to change the ?: converting CMP to CMPEQ, so the result of the TST is ignored.
Signed-off-by Richard Henderson <[email protected]>
--- tcg/arm/tcg-target.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tcg/arm/tcg-target.inc.c +1 -1
@@ -1223,7 +1223,7 @@ static TCGReg tcg_out_tlb_read(TCGContext *s, TCGReg addrlo, TCGReg addrhi,/* Load the tlb addend. */ tcg_out_ld32_12 (s,COND_AL ,TCG_REG_R2 ,TCG_REG_R2 , add_off); -tcg_out_dat_reg (s, (s_bits ?COND_EQ :COND_AL ),ARITH_CMP ,0 , +tcg_out_dat_reg (s, (a_bits ?COND_EQ :COND_AL ),ARITH_CMP ,0 ,TCG_REG_R0 ,TCG_REG_TMP ,SHIFT_IMM_LSL (TARGET_PAGE_BITS ));if (TARGET_LONG_BITS ==64 ) {
Signature · 1 line
2.13.3
PATCH 2/2 target/s390x: Fix CSST for 16-byte store
In reply to Richard HendersonFound by Coverity.
Reported-by Paolo Bonzini <[email protected]>
Signed-off-by Richard Henderson <[email protected]>
--- target/s390x/mem_helper.c | 1 + 1 file changed, 1 insertion(+)
target/s390x/mem_helper.c +1 -0
@@ -1580,6 +1580,7 @@ uint32_t HELPER(csst)(CPUS390XState *env, uint32_t r3, uint64_t a1, uint64_t a2)cpu_stq_data_ra (env, a2 +0 , svh, ra);cpu_stq_data_ra (env, a2 +8 , svl, ra); } +break ;default :g_assert_not_reached (); }
Signature · 1 line
2.13.3
Re: [Qemu-devel] [PATCH for-2.10 2/2] target/s390x: Fix CSST for 16-byte store
Quoted 1 line · Richard Henderson
Found by Coverity.
"Found by Coverity (CID 1378273)."
Quoted 2 lines
Reported-by Paolo Bonzini <[email protected]>Signed-off-by Richard Henderson <[email protected]>
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 17 lines
--- target/s390x/mem_helper.c | 1 + 1 file changed, 1 insertion(+)target/s390x/mem_helper.c +1
-0@@ -1580,6 +1580,7 @@ uint32_t HELPER(csst)(CPUS390XState *env, uint32_t r3, uint64_t a1, uint64_t a2)cpu_stq_data_ra (env, a2 +0 , svh, ra);cpu_stq_data_ra (env, a2 +8 , svl, ra); } +break ;default :g_assert_not_reached (); }