Commit d2e9fd8f703203c2eeeed120b1ef6c3a6574e0ab
1 parent
d999f7e0
Apply TCGV_UNUSED on variables that GCC mistakenly thinks can be used
uninitialized
Showing
1 changed file
with
6 additions
and
0 deletions
target-ppc/translate.c
| ... | ... | @@ -772,6 +772,8 @@ static always_inline void gen_op_arith_add(DisasContext *ctx, TCGv ret, TCGv arg |
| 772 | 772 | t1 = tcg_temp_local_new(); |
| 773 | 773 | tcg_gen_andi_tl(t1, cpu_xer, (1 << XER_CA)); |
| 774 | 774 | tcg_gen_shri_tl(t1, t1, XER_CA); |
| 775 | + } else { | |
| 776 | + TCGV_UNUSED(t1); | |
| 775 | 777 | } |
| 776 | 778 | |
| 777 | 779 | if (compute_ca && compute_ov) { |
| ... | ... | @@ -1189,6 +1191,8 @@ static always_inline void gen_op_arith_subf(DisasContext *ctx, TCGv ret, TCGv ar |
| 1189 | 1191 | t1 = tcg_temp_local_new(); |
| 1190 | 1192 | tcg_gen_andi_tl(t1, cpu_xer, (1 << XER_CA)); |
| 1191 | 1193 | tcg_gen_shri_tl(t1, t1, XER_CA); |
| 1194 | + } else { | |
| 1195 | + TCGV_UNUSED(t1); | |
| 1192 | 1196 | } |
| 1193 | 1197 | |
| 1194 | 1198 | if (compute_ca && compute_ov) { |
| ... | ... | @@ -3364,6 +3368,8 @@ static always_inline void gen_bcond (DisasContext *ctx, int type) |
| 3364 | 3368 | tcg_gen_mov_tl(target, cpu_ctr); |
| 3365 | 3369 | else |
| 3366 | 3370 | tcg_gen_mov_tl(target, cpu_lr); |
| 3371 | + } else { | |
| 3372 | + TCGV_UNUSED(target); | |
| 3367 | 3373 | } |
| 3368 | 3374 | if (LK(ctx->opcode)) |
| 3369 | 3375 | gen_setlr(ctx, ctx->nip); | ... | ... |