[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/9] target/i386: silence the compiler warnings in gen_shiftd
From: |
Richard Henderson |
Subject: |
Re: [PATCH 1/9] target/i386: silence the compiler warnings in gen_shiftd_rm_T1 |
Date: |
Wed, 28 Oct 2020 08:31:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 10/27/20 9:18 PM, Chen Qun wrote:
> The current "#ifdef TARGET_X86_64" statement affects
> the compiler's determination of fall through.
>
> When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
> target/i386/translate.c: In function ‘gen_shiftd_rm_T1’:
> target/i386/translate.c:1773:12: warning: this statement may fall through
> [-Wimplicit-fallthrough=]
> if (is_right) {
> ^
> target/i386/translate.c:1782:5: note: here
> case MO_32:
> ^~~~
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> ---
> target/i386/translate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/i386/translate.c b/target/i386/translate.c
> index caea6f5fb1..4c353427d7 100644
> --- a/target/i386/translate.c
> +++ b/target/i386/translate.c
> @@ -1777,9 +1777,9 @@ static void gen_shiftd_rm_T1(DisasContext *s, MemOp ot,
> int op1,
> } else {
> tcg_gen_deposit_tl(s->T1, s->T0, s->T1, 16, 16);
> }
> - /* FALLTHRU */
> -#ifdef TARGET_X86_64
> + /* fall through */
> case MO_32:
> +#ifdef TARGET_X86_64
> /* Concatenate the two 32-bit values and use a 64-bit shift. *
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
[PATCH 6/9] target/sparc/win_helper: silence the compiler warnings, Chen Qun, 2020/10/28
[PATCH 5/9] target/sparc/translate: silence the compiler warnings, Chen Qun, 2020/10/28
[PATCH 9/9] hw/timer/renesas_tmr: silence the compiler warnings, Chen Qun, 2020/10/28