diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-12-30 20:45:42 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-12-30 20:45:43 +0000 |
commit | 65a3c5984074313602fb5f61cc5f464abfb020c7 (patch) | |
tree | 010b69e520c68e5efc7c8b152f2da412dd5383df /target | |
parent | a05f8ecd88f15273d033b6f044b850a8af84a5b8 (diff) | |
parent | 0a2ebce92a3f10a89843e4a7a8e2f2eba4f7b109 (diff) |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-12-18' into staging
* Compile QEMU with -Wimplicit-fallthrough=2 to avoid bugs in
switch-case statements
# gpg: Signature made Fri 18 Dec 2020 08:19:04 GMT
# gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/huth-gitlab/tags/pull-request-2020-12-18:
configure: Compile with -Wimplicit-fallthrough=2
hw/rtc/twl92230: Add missing 'break'
bsd-user: Silence warnings about missing fallthrough statement
tests/fp: Do not emit implicit-fallthrough warnings in the softfloat tests
tcg/optimize: Add fallthrough annotations
target/sparc/win_helper: silence the compiler warnings
target/sparc/translate: silence the compiler warnings
accel/tcg/user-exec: silence the compiler warnings
hw/intc/arm_gicv3_kvm: silence the compiler warnings
target/i386: silence the compiler warnings in gen_shiftd_rm_T1
hw/timer/renesas_tmr: silence the compiler warnings
hw/rtc/twl92230: Silence warnings about missing fallthrough statements
target/unicore32/translate: Add missing fallthrough annotations
disas/libvixl: Fix fall-through annotation for GCC >= 7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/tcg/translate.c | 7 | ||||
-rw-r--r-- | target/sparc/translate.c | 2 | ||||
-rw-r--r-- | target/sparc/win_helper.c | 2 | ||||
-rw-r--r-- | target/unicore32/translate.c | 2 |
4 files changed, 9 insertions, 4 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) { diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 30c73f8d2e..4bfa3179f8 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2324,8 +2324,8 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TCGv addr, } /* in OpenSPARC T1+ CPUs TWINX ASIs in store instructions * are ST_BLKINIT_ ASIs */ - /* fall through */ #endif + /* fall through */ case GET_ASI_DIRECT: gen_address_mask(dc, addr); tcg_gen_qemu_st_tl(src, addr, da.mem_idx, da.memop); diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 5b57892a10..3a7c0ff943 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -302,7 +302,7 @@ static inline uint64_t *get_gregset(CPUSPARCState *env, uint32_t pstate) switch (pstate) { default: trace_win_helper_gregset_error(pstate); - /* pass through to normal set of global registers */ + /* fall through to normal set of global registers */ case 0: return env->bgregs; case PS_AG: diff --git a/target/unicore32/translate.c b/target/unicore32/translate.c index d4b06df672..962f9877a0 100644 --- a/target/unicore32/translate.c +++ b/target/unicore32/translate.c @@ -1801,6 +1801,7 @@ static void disas_uc32_insn(CPUUniCore32State *env, DisasContext *s) do_misc(env, s, insn); break; } + /* fallthrough */ case 0x1: if (((UCOP_OPCODES >> 2) == 2) && !UCOP_SET_S) { do_misc(env, s, insn); @@ -1817,6 +1818,7 @@ static void disas_uc32_insn(CPUUniCore32State *env, DisasContext *s) if (UCOP_SET(8) || UCOP_SET(5)) { ILLEGAL; } + /* fallthrough */ case 0x3: do_ldst_ir(env, s, insn); break; |