From: Bobby R. Bruce Date: Mon, 25 May 2020 21:24:34 +0000 (-0700) Subject: arch-riscv,misc: Added M5_VAR_USED to MiscRegNames X-Git-Tag: v20.0.0.0~9 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d342e0309531788424777a4de52ba11069857475;p=gem5.git arch-riscv,misc: Added M5_VAR_USED to MiscRegNames Clang compilers return an error about MiscRegNames being unused. M5_VAR_USED fixes this. Change-Id: I515c5d1e8837020b674de49039c0525f896b7e37 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29452 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/arch/riscv/isa.cc b/src/arch/riscv/isa.cc index ac26230a1..055c95b35 100644 --- a/src/arch/riscv/isa.cc +++ b/src/arch/riscv/isa.cc @@ -38,6 +38,7 @@ #include "arch/riscv/pagetable.hh" #include "arch/riscv/registers.hh" #include "base/bitfield.hh" +#include "base/compiler.hh" #include "cpu/base.hh" #include "debug/Checkpoint.hh" #include "debug/RiscvMisc.hh" @@ -48,7 +49,7 @@ namespace RiscvISA { -const std::array MiscRegNames = {{ +const std::array M5_VAR_USED MiscRegNames = {{ [MISCREG_PRV] = "PRV", [MISCREG_ISA] = "ISA", [MISCREG_VENDORID] = "VENDORID",