Browse Source

Refactor switch statement for DRY and readability

pull/958/head
Andrew Waterman 4 years ago
parent
commit
3bbaab0176
  1. 10
      riscv/processor.cc

10
riscv/processor.cc

@ -551,15 +551,13 @@ void processor_t::set_mmu_capability(int cap)
{
switch (cap) {
case IMPL_MMU_SV32:
set_impl(cap, true);
set_impl(IMPL_MMU, true);
break;
case IMPL_MMU_SV39:
set_impl(cap, true);
set_impl(IMPL_MMU_SV32, true);
set_impl(IMPL_MMU, true);
break;
case IMPL_MMU_SV48:
set_impl(cap, true);
set_impl(IMPL_MMU_SV48, true);
// Fall through
case IMPL_MMU_SV39:
set_impl(IMPL_MMU_SV39, true);
set_impl(IMPL_MMU, true);
break;

Loading…
Cancel
Save