arch-riscv: Fix invalid std::map access
The CSRData map uses a RISC-V CSR number as the key rather than one of the MISCREG_* enumerators. Use MiscRegNames[] instead to stringify the argument for the debug message. Change-Id: I2533bc29d148d3b34c01022eeaeedf64c39a99b9 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68759 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -510,7 +510,7 @@ ISA::setMiscReg(RegIndex idx, RegVal val)
|
||||
{
|
||||
if (idx >= MISCREG_CYCLE && idx <= MISCREG_HPMCOUNTER31) {
|
||||
// Ignore writes to HPM counters for now
|
||||
warn("Ignoring write to %s.\n", CSRData.at(idx).name);
|
||||
warn("Ignoring write to miscreg %s.\n", MiscRegNames[idx]);
|
||||
} else {
|
||||
switch (idx) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user