add code word access for ISS plugins

This commit is contained in:
2022-04-25 14:18:19 +02:00
parent 477c530847
commit a92b84bef4
9 changed files with 42 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
#include <iss/arch_if.h>
#include <iss/plugin/pctrace.h>
#include <util/logging.h>
#include <util/ities.h>
#include <rapidjson/document.h>
#include <rapidjson/istreamwrapper.h>
#include "rapidjson/writer.h"
@@ -123,7 +124,9 @@ void iss::plugin::cov::callback(instr_info_t iinfo, const exec_info& einfo) {
//source code for the full output
auto delay = 0;
auto entry = delays[iinfo.instr_id];
size_t id = iinfo.instr_id;
auto entry = delays[id];
auto call = (id==2 || id==3) && bit_sub<7,5>(instr_if->get_instr_word())!=0;
bool taken = einfo.branch_taken;
if (einfo.branch_taken)
delay = entry.taken;