Also show hex values in registerfile dump
MODIFY
test/tst_riscv.cpp
test/tst_riscv.cpp
@@ -90,8 +90,9 @@ QString tst_RISCV::dumpRegs() {
QString str = "\n" + m_currentTest + "\nRegister dump:";
str += "\t PC:" + QString::number(ProcessorHandler::getProcessor()->getPcForStage(0), 16) + "\n";
for (unsigned i = 0; i < ProcessorHandler::currentISA()->regCnt(); i++) {
+ const auto value = ProcessorHandler::getProcessor()->getRegister(RegisterFileType::GPR, i);
str += "\t" + ProcessorHandler::currentISA()->regName(i) + ":" + ProcessorHandler::currentISA()->regAlias(i) +
- ":\t" + QString::number(ProcessorHandler::getProcessor()->getRegister(RegisterFileType::GPR, i)) + "\n";
+ ":\t" + QString::number(value) + " (0x" + QString::number(value, 16) + ")\n";
}
return str;
}

Also show hex values in registerfile dump