diff options
author | Chen Qun | 2020-12-11 16:24:19 +0100 |
---|---|---|
committer | Thomas Huth | 2020-12-18 09:14:23 +0100 |
commit | bdddc1c425e8e39031bf726b54a6e7388337a7f0 (patch) | |
tree | 4ccaf1c149cbd5e60c2194fa5f0c7c89fdec80a7 /target/i386/tcg | |
parent | hw/timer/renesas_tmr: silence the compiler warnings (diff) | |
download | qemu-bdddc1c425e8e39031bf726b54a6e7388337a7f0.tar.gz qemu-bdddc1c425e8e39031bf726b54a6e7388337a7f0.tar.xz qemu-bdddc1c425e8e39031bf726b54a6e7388337a7f0.zip |
target/i386: silence the compiler warnings in gen_shiftd_rm_T1
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>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201211152426.350966-6-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/i386/tcg')
-rw-r--r-- | target/i386/tcg/translate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 750f75c257..11db2f3c8d 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -1778,9 +1778,12 @@ 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 + /* + * If TARGET_X86_64 defined then fall through into MO_32 case, + * otherwise fall through default case. + */ case MO_32: +#ifdef TARGET_X86_64 /* Concatenate the two 32-bit values and use a 64-bit shift. */ tcg_gen_subi_tl(s->tmp0, count, 1); if (is_right) { |