From 42358fbb245a51036eecd8b6124496b67f23c0b2 Mon Sep 17 00:00:00 2001 From: Scott Beamer Date: Mon, 13 Jul 2015 16:17:13 -0700 Subject: [PATCH] simplified default case and added comments --- riscv/interactive.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/riscv/interactive.cc b/riscv/interactive.cc index 6ae1892..07b2801 100644 --- a/riscv/interactive.cc +++ b/riscv/interactive.cc @@ -183,9 +183,8 @@ reg_t sim_t::get_reg(const std::vector& args) r = strtoul(args[1].c_str(), &ptr, 10); if (*ptr) { #define DECLARE_CSR(name, number) if (args[1] == #name) return p->get_csr(number); - if (0) ; - #include "encoding.h" - else r = NXPR; + #include "encoding.h" // generates if's for all csrs + r = NXPR; // else case (csr name not found) #undef DECLARE_CSR } } -- 2.30.2