summaryrefslogtreecommitdiff
path: root/src/arch/riscv/insts
diff options
context:
space:
mode:
authorAlec Roelke <ar4jc@virginia.edu>2017-12-10 14:15:51 -0500
committerAlec Roelke <ar4jc@virginia.edu>2018-05-12 19:13:05 +0000
commitce00e6042d996a9255960917f99009d9826b3885 (patch)
tree3edaebe9648e7083a6e8e68c008147b476cefd5b /src/arch/riscv/insts
parente89e83529ad17bc1ae7ae23d337fd4067db01708 (diff)
downloadgem5-ce00e6042d996a9255960917f99009d9826b3885.tar.xz
arch-riscv: Update CSR implementations
This patch updates the CSRs to match the RISC-V privileged specification version 1.10. As interrupts, faults, and privilege levels are not yet supported, there are no meaninful side effects that are implemented. Performance counters are also not yet implemented, as they do not have specifications. Currently they act as cycle counters. Note that this implementation trusts software to use the registers properly. Access protection, readability, and writeability of registers based on privilege will come in a future patch. Change-Id: I1de89bdbe369b5027911b2e6bc0425d3acaa708a Reviewed-on: https://gem5-review.googlesource.com/7441 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Alec Roelke <ar4jc@virginia.edu>
Diffstat (limited to 'src/arch/riscv/insts')
-rw-r--r--src/arch/riscv/insts/standard.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/riscv/insts/standard.cc b/src/arch/riscv/insts/standard.cc
index 60cf4fc2b..9354a542f 100644
--- a/src/arch/riscv/insts/standard.cc
+++ b/src/arch/riscv/insts/standard.cc
@@ -60,12 +60,12 @@ CSROp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
ss << mnemonic << ' ' << registerName(_destRegIdx[0]) << ", ";
if (_numSrcRegs > 0)
ss << registerName(_srcRegIdx[0]) << ", ";
- auto name = MiscRegNames.find(csr);
- if (name != MiscRegNames.end())
- ss << name->second;
+ auto data = CSRData.find(csr);
+ if (data != CSRData.end())
+ ss << data->second.name;
else
ss << "?? (" << hex << "0x" << csr << ")";
return ss.str();
}
-} \ No newline at end of file
+}