qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Build broken for i386-softmmu with --enable-debug


From: Dunrong Huang
Subject: Re: [Qemu-devel] Build broken for i386-softmmu with --enable-debug
Date: Fri, 29 Jun 2012 14:51:35 +0800

I also met this problem, I fix it by casting incompatible function
type to correct function type.

@@ -2950,20 +2950,20 @@ static const SSEFunc_0_pp sse_op_table2[3 * 8][2] = {
 static const SSEFunc_0_pi sse_op_table3a[4] = {
     gen_helper_cvtsi2ss,
     gen_helper_cvtsi2sd,
-    X86_64_ONLY(gen_helper_cvtsq2ss),
-    X86_64_ONLY(gen_helper_cvtsq2sd),
+    X86_64_ONLY((SSEFunc_0_pi)gen_helper_cvtsq2ss),
+    X86_64_ONLY((SSEFunc_0_pi)gen_helper_cvtsq2sd),
 };

 static const SSEFunc_i_p sse_op_table3b[4 * 2] = {
     gen_helper_cvttss2si,
     gen_helper_cvttsd2si,
-    X86_64_ONLY(gen_helper_cvttss2sq),
-    X86_64_ONLY(gen_helper_cvttsd2sq),
+    X86_64_ONLY((SSEFunc_i_p)gen_helper_cvttss2sq),
+    X86_64_ONLY((SSEFunc_i_p)gen_helper_cvttsd2sq),

     gen_helper_cvtss2si,
     gen_helper_cvtsd2si,
-    X86_64_ONLY(gen_helper_cvtss2sq),
-    X86_64_ONLY(gen_helper_cvtsd2sq),
+    X86_64_ONLY((SSEFunc_i_p)gen_helper_cvtss2sq),
+    X86_64_ONLY((SSEFunc_i_p)gen_helper_cvtsd2sq),
 };

@@ -3568,8 +3568,8 @@ static void gen_sse(DisasContext *s, int b,
target_ulong pc_start, int rex_r)
                 tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
                 sse_fn_pi(cpu_ptr0, cpu_tmp2_i32);
             } else {
-                sse_fn_pl = sse_op_table3a[(s->dflag == 2) * 2 +
-                                           ((b >> 8) - 2)];
+                sse_fn_pl = (SSEFunc_0_pl)sse_op_table3a[(s->dflag == 2) * 2 +
+                                                         ((b >> 8) - 2)];
                 sse_fn_pl(cpu_ptr0, cpu_T[0]);
             }
             break;
@@ -3630,9 +3630,9 @@ static void gen_sse(DisasContext *s, int b,
target_ulong pc_start, int rex_r)
                 sse_fn_i_p(cpu_tmp2_i32, cpu_ptr0);
                 tcg_gen_extu_i32_tl(cpu_T[0], cpu_tmp2_i32);
             } else {
-                sse_fn_l_p = sse_op_table3b[(s->dflag == 2) * 2 +
-                                            ((b >> 8) - 2) +
-                                            (b & 1) * 4];
+                sse_fn_l_p = (SSEFunc_l_p)sse_op_table3b[(s->dflag == 2) * 2 +
+                                                         ((b >> 8) - 2) +
+                                                         (b & 1) * 4];


I have send this patch to mailing list.

2012/6/29 Stefan Weil <address@hidden>:
> Hi Blue,
>
> commit c4baa0503d9623f1ce891f525ccd140c598bc29a
> improved SSE table type safety which now raises compiler
> errors when latest QEMU was configured with --enable-debug.
>
> CC i386-softmmu/target-i386/translate.o
> cc1: warnings being treated as errors
> /qemu/target-i386/translate.c: In function ‘gen_sse’:
> /qemu/target-i386/translate.c:3572: error: assignment from incompatible
> pointer type
> /qemu/target-i386/translate.c:3573: error: incompatible type for argument 2
> of ‘sse_fn_pl’
> /qemu/target-i386/translate.c:3573: note: expected ‘TCGv_i64’ but argument
> is of type ‘TCGv_i32’
> /qemu/target-i386/translate.c:3635: error: assignment from incompatible
> pointer type
> /qemu/target-i386/translate.c:3636: error: incompatible type for argument 1
> of ‘sse_fn_l_p’
> /qemu/target-i386/translate.c:3636: note: expected ‘TCGv_i64’ but argument
> is of type ‘TCGv_i32’
>
> Regards,
>
> Stefan
>
>



-- 
Best Regards,

Dunrong Huang



reply via email to

[Prev in Thread] Current Thread [Next in Thread]