Commit d2e9fd8f703203c2eeeed120b1ef6c3a6574e0ab

Authored by malc
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,6 +772,8 @@ static always_inline void gen_op_arith_add(DisasContext *ctx, TCGv ret, TCGv arg
772 t1 = tcg_temp_local_new(); 772 t1 = tcg_temp_local_new();
773 tcg_gen_andi_tl(t1, cpu_xer, (1 << XER_CA)); 773 tcg_gen_andi_tl(t1, cpu_xer, (1 << XER_CA));
774 tcg_gen_shri_tl(t1, t1, XER_CA); 774 tcg_gen_shri_tl(t1, t1, XER_CA);
  775 + } else {
  776 + TCGV_UNUSED(t1);
775 } 777 }
776 778
777 if (compute_ca && compute_ov) { 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,6 +1191,8 @@ static always_inline void gen_op_arith_subf(DisasContext *ctx, TCGv ret, TCGv ar
1189 t1 = tcg_temp_local_new(); 1191 t1 = tcg_temp_local_new();
1190 tcg_gen_andi_tl(t1, cpu_xer, (1 << XER_CA)); 1192 tcg_gen_andi_tl(t1, cpu_xer, (1 << XER_CA));
1191 tcg_gen_shri_tl(t1, t1, XER_CA); 1193 tcg_gen_shri_tl(t1, t1, XER_CA);
  1194 + } else {
  1195 + TCGV_UNUSED(t1);
1192 } 1196 }
1193 1197
1194 if (compute_ca && compute_ov) { 1198 if (compute_ca && compute_ov) {
@@ -3364,6 +3368,8 @@ static always_inline void gen_bcond (DisasContext *ctx, int type) @@ -3364,6 +3368,8 @@ static always_inline void gen_bcond (DisasContext *ctx, int type)
3364 tcg_gen_mov_tl(target, cpu_ctr); 3368 tcg_gen_mov_tl(target, cpu_ctr);
3365 else 3369 else
3366 tcg_gen_mov_tl(target, cpu_lr); 3370 tcg_gen_mov_tl(target, cpu_lr);
  3371 + } else {
  3372 + TCGV_UNUSED(target);
3367 } 3373 }
3368 if (LK(ctx->opcode)) 3374 if (LK(ctx->opcode))
3369 gen_setlr(ctx, ctx->nip); 3375 gen_setlr(ctx, ctx->nip);