misc: Replace GEM5_FALLTHROUGH with [[fallthrough]].

Now that the [[fallthrough]] attribute is standard (as of c++-17), we
can use it directly instead of hiding it behind a macro.

Change-Id: I4d11e35b619532b1a3fd8d042265e18c80d86f9b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48505
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-07-23 22:08:43 -07:00
committed by Gabe Black
parent 5412b20b47
commit cb266a099f
21 changed files with 38 additions and 38 deletions

View File

@@ -337,7 +337,7 @@ BaseKvmCPU::drain()
deschedule(tickEvent);
_status = Idle;
GEM5_FALLTHROUGH;
[[fallthrough]];
case Idle:
// Idle, no need to drain
assert(!tickEvent.scheduled());

View File

@@ -403,7 +403,7 @@ checkSeg(const char *name, const int idx, const struct kvm_segment &seg,
case MISCREG_ES:
if (seg.unusable)
break;
GEM5_FALLTHROUGH;
[[fallthrough]];
case MISCREG_CS:
if (seg.base & 0xffffffff00000000ULL)
warn("Illegal %s base: 0x%x\n", name, seg.base);
@@ -441,7 +441,7 @@ checkSeg(const char *name, const int idx, const struct kvm_segment &seg,
case 3:
if (sregs.cs.type == 3 && seg.dpl != 0)
warn("CS type is 3, but SS DPL is != 0.\n");
GEM5_FALLTHROUGH;
[[fallthrough]];
case 7:
if (!(sregs.cr0 & 1) && seg.dpl != 0)
warn("SS DPL is %i, but CR0 PE is 0\n", seg.dpl);
@@ -485,7 +485,7 @@ checkSeg(const char *name, const int idx, const struct kvm_segment &seg,
case MISCREG_GS:
if (seg.unusable)
break;
GEM5_FALLTHROUGH;
[[fallthrough]];
case MISCREG_CS:
if (!seg.s)
warn("%s: S flag not set\n", name);
@@ -494,7 +494,7 @@ checkSeg(const char *name, const int idx, const struct kvm_segment &seg,
case MISCREG_TSL:
if (seg.unusable)
break;
GEM5_FALLTHROUGH;
[[fallthrough]];
case MISCREG_TR:
if (seg.s)
warn("%s: S flag is set\n", name);
@@ -510,7 +510,7 @@ checkSeg(const char *name, const int idx, const struct kvm_segment &seg,
case MISCREG_TSL:
if (seg.unusable)
break;
GEM5_FALLTHROUGH;
[[fallthrough]];
case MISCREG_TR:
case MISCREG_CS:
if (!seg.present)