Commit a50f5b9186c1bf76899365ab61b11d8ef487f4a8

Authored by pbrook
1 parent d26968ec

Suppress bogus compiler warnings.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4803 c046a42c-6fe2-441c-8c8c-71466251a162
target-arm/translate.c
... ... @@ -3757,6 +3757,7 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn)
3757 3757 }
3758 3758 } else /* size == 0 */ {
3759 3759 if (load) {
  3760 + TCGV_UNUSED(tmp2);
3760 3761 for (n = 0; n < 4; n++) {
3761 3762 tmp = gen_ld8u(cpu_T[1], IS_USER(s));
3762 3763 gen_op_addl_T1_im(stride);
... ... @@ -3812,6 +3813,8 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn)
3812 3813 break;
3813 3814 case 3:
3814 3815 return 1;
  3816 + default: /* Avoid compiler warnings. */
  3817 + abort();
3815 3818 }
3816 3819 gen_op_addl_T1_im(1 << size);
3817 3820 tmp2 = new_tmp();
... ... @@ -3854,6 +3857,8 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn)
3854 3857 case 2:
3855 3858 tmp = gen_ld32(cpu_T[1], IS_USER(s));
3856 3859 break;
  3860 + default: /* Avoid compiler warnings. */
  3861 + abort();
3857 3862 }
3858 3863 if (size != 2) {
3859 3864 tmp2 = neon_load_reg(rd, pass);
... ... @@ -4856,9 +4861,11 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
4856 4861 NEON_GET_REG(T0, rn, 1);
4857 4862 gen_neon_movl_scratch_T0(2);
4858 4863 }
  4864 + TCGV_UNUSED(tmp3);
4859 4865 for (pass = 0; pass < 2; pass++) {
4860 4866 if (src1_wide) {
4861 4867 neon_load_reg64(cpu_V0, rn + pass);
  4868 + TCGV_UNUSED(tmp);
4862 4869 } else {
4863 4870 if (pass == 1 && rd == rn) {
4864 4871 gen_neon_movl_T0_scratch(2);
... ... @@ -4873,6 +4880,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
4873 4880 }
4874 4881 if (src2_wide) {
4875 4882 neon_load_reg64(cpu_V1, rm + pass);
  4883 + TCGV_UNUSED(tmp2);
4876 4884 } else {
4877 4885 if (pass == 1 && rd == rm) {
4878 4886 gen_neon_movl_T0_scratch(2);
... ... @@ -5284,6 +5292,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
5284 5292 case 36: case 37: /* VMOVN, VQMOVUN, VQMOVN */
5285 5293 if (size == 3)
5286 5294 return 1;
  5295 + TCGV_UNUSED(tmp2);
5287 5296 for (pass = 0; pass < 2; pass++) {
5288 5297 neon_load_reg64(cpu_V0, rm + pass);
5289 5298 tmp = new_tmp();
... ... @@ -6642,6 +6651,7 @@ static void disas_arm_insn(CPUState * env, DisasContext *s)
6642 6651  
6643 6652 /* compute total size */
6644 6653 loaded_base = 0;
  6654 + TCGV_UNUSED(loaded_var);
6645 6655 n = 0;
6646 6656 for(i=0;i<16;i++) {
6647 6657 if (insn & (1 << i))
... ... @@ -8339,6 +8349,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s)
8339 8349 tcg_gen_addi_i32(addr, addr, 4);
8340 8350 }
8341 8351 }
  8352 + TCGV_UNUSED(tmp);
8342 8353 if (insn & (1 << 8)) {
8343 8354 if (insn & (1 << 11)) {
8344 8355 /* pop pc */
... ...
tcg/tcg.h
... ... @@ -143,6 +143,9 @@ typedef int TCGv;
143 143  
144 144 #endif /* DEBUG_TCGV */
145 145  
  146 +/* Dummy definition to avoid compiler warnings. */
  147 +#define TCGV_UNUSED(x) x = MAKE_TCGV(-1)
  148 +
146 149 /* call flags */
147 150 #define TCG_CALL_TYPE_MASK 0x000f
148 151 #define TCG_CALL_TYPE_STD 0x0000 /* standard C call */
... ...