From d342e0309531788424777a4de52ba11069857475 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Mon, 25 May 2020 14:24:34 -0700 Subject: [PATCH] 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 --- src/arch/riscv/isa.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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", -- 2.30.2