diff options
author | Chun-Chen Hsu <chunchenhsu@google.com> | 2018-03-13 17:44:52 +0800 |
---|---|---|
committer | Chun-Chen TK Hsu <chunchenhsu@google.com> | 2018-03-20 20:17:00 +0000 |
commit | fe187de9bd1aa479ab6cd198522bfd118d0d50ec (patch) | |
tree | beb10d2550241e5f88e1bd7e153fc7b54da6ef1f /src/arch/arm | |
parent | 212649b01e90b28df6e1a66c1b98a944af5b05a9 (diff) | |
download | gem5-fe187de9bd1aa479ab6cd198522bfd118d0d50ec.tar.xz |
arch, arm: Fix implicit-fallthrough GCC warnings
GCC 7 generates spurious fallthrough warnings in nested switch blocks
where the inner switch block return. There is already a GCC fix [1]
submitted for review but, until it is merged into GCC trunk, GEM5 will
not build with GCC 7 due to these fallthrough warnings. This patch
silences the spurious fallthrough warnings by appending a M5_UNREACHABLE
statement in the outer switch cases.
Note there is another GEM5 patch [2] to fix other fallthrough warnings.
[1] https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01105.html
[2] https://gem5-review.googlesource.com/c/public/gem5/+/8541
Change-Id: I97cd8bfa90a88e93cee60cf27a8c93611d11a242
Signed-off-by: Chun-Chen Hsu <chunchenhsu@google.com>
Reviewed-on: https://gem5-review.googlesource.com/9101
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/arch/arm')
-rw-r--r-- | src/arch/arm/isa/formats/aarch64.isa | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/arm/isa/formats/aarch64.isa b/src/arch/arm/isa/formats/aarch64.isa index 1b9a86cad..7752ba08f 100644 --- a/src/arch/arm/isa/formats/aarch64.isa +++ b/src/arch/arm/isa/formats/aarch64.isa @@ -1897,6 +1897,7 @@ namespace Aarch64 return new Unknown64(machInst); } } + M5_UNREACHABLE; case 0x1: { if (bits(machInst, 31) || @@ -2005,7 +2006,7 @@ namespace Aarch64 M5_UNREACHABLE; } } - return new FailUnimplemented("Unhandled Case4", machInst); + M5_UNREACHABLE; } } }}; |