fixes tohost behavior of SC wrapper and cycle-estimate plugin

This commit is contained in:
2023-10-25 20:37:10 +02:00
parent b86d7a517d
commit 980c8031c3
3 changed files with 45 additions and 12 deletions

View File

@ -101,7 +101,7 @@ bool iss::plugin::cycle_estimate::registration(const char* const version, vm_if&
void iss::plugin::cycle_estimate::callback(instr_info_t instr_info) {
size_t instr_id = instr_info.instr_id;
auto entry = delays[instr_id];
auto& entry = instr_id<delays.size()?delays[instr_id]:illegal_desc;
if(instr_info.phase_id==PRE_SYNC) {
if(entry.f)
current_delay = entry.f(instr_if->get_instr_word());
@ -110,5 +110,6 @@ void iss::plugin::cycle_estimate::callback(instr_info_t instr_info) {
current_delay = instr_if->is_branch_taken()? entry.taken: entry.not_taken;
if(current_delay>1)
instr_if->update_last_instr_cycles(current_delay);
current_delay = 1;
}
}