fix left-over from layout refactoring

This commit is contained in:
2022-06-02 08:30:02 +02:00
parent e8fd5143bc
commit f40ab41899
2 changed files with 5 additions and 184 deletions

View File

@ -1,5 +1,5 @@
#include <iss/arch_if.h>
#include "pctrace.h"
#include <iss/plugin/pctrace.h>
#include <util/logging.h>
#include <util/ities.h>
#include <rapidjson/document.h>
@ -157,8 +157,9 @@ void cov::callback(instr_info_t iinfo, const exec_info& einfo) {
size_t id = iinfo.instr_id;
auto entry = delays[id];
auto instr = instr_if->get_instr_word();
auto call = (id==2 || id==3) && bit_sub<7,5>(instr)!=0;
auto call = id==65 || id ==86 || ((id==2 || id==3) && bit_sub<7,5>(instr)!=0) ;//not taking care of tail calls (jalr with loading x6)
bool taken = einfo.branch_taken;
bool compressed = (instr&0x3)!=0x3;
if (einfo.branch_taken) {
delay = entry.taken;
if(entry.taken > 1)
@ -169,10 +170,10 @@ void cov::callback(instr_info_t iinfo, const exec_info& einfo) {
instr_if->set_curr_instr_cycles(entry.not_taken);
}
#ifndef WITH_LZ4
output<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay <<"," << call<< "\n";
output<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay <<"," << call<<","<<(compressed?2:4) <<"\n";
#else
auto rdbuf=ostr.rdbuf();
ostr<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay <<"," << call<< "\n";
ostr<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay <<"," << call<<","<<(compressed?2:4) <<"\n";
#endif
}
}