Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/iss/arch/riscv_hart_m_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,13 @@ template <typename BASE, features_e FEAT> uint64_t riscv_hart_m_p<BASE, FEAT>::e
#endif
if((flags & 0xffffffff) != 0xffffffff) {
if(trap_id) {
auto irq_str = cause < this->irq_str.size() ? this->irq_str.at(cause) : "Unknown";
ILOG(disasslogger, logging::DEBUG,
fmt::format("Interrupt with cause '{}' ({}) occurred at address {}", this->irq_str[cause], cause, buffer.data()));
fmt::format("Interrupt with cause '{}' ({}) occurred at address {}", irq_str, cause, buffer.data()));
} else {
auto irq_str = cause < this->trap_str.size() ? this->trap_str.at(cause) : "Unknown";
ILOG(disasslogger, logging::DEBUG,
fmt::format("Trap with cause '{}' ({}) occurred at address {}", this->trap_str[cause], cause, buffer.data()));
fmt::format("Trap with cause '{}' ({}) occurred at address {}", irq_str, cause, buffer.data()));
}
}
// reset trap state
Expand Down
6 changes: 4 additions & 2 deletions src/iss/arch/riscv_hart_msu_vp.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,13 @@ uint64_t riscv_hart_msu_vp<BASE, FEAT>::enter_trap(uint64_t flags, uint64_t addr
#endif
if((flags & 0xffffffff) != 0xffffffff) {
if(trap_id) {
auto irq_str = cause < this->irq_str.size() ? this->irq_str.at(cause) : "Unknown";
ILOG(disasslogger, logging::DEBUG,
fmt::format("Interrupt with cause '{}' ({}) occurred at address {}", this->irq_str[cause], cause, buffer.data()));
fmt::format("Interrupt with cause '{}' ({}) occurred at address {}", irq_str, cause, buffer.data()));
} else {
auto irq_str = cause < this->trap_str.size() ? this->trap_str.at(cause) : "Unknown";
ILOG(disasslogger, logging::DEBUG,
fmt::format("Trap with cause '{}' ({}) occurred at address {}", this->trap_str[cause], cause, buffer.data()));
fmt::format("Trap with cause '{}' ({}) occurred at address {}", irq_str, cause, buffer.data()));
}
}
// reset trap this->state
Expand Down
6 changes: 4 additions & 2 deletions src/iss/arch/riscv_hart_mu_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,13 @@ template <typename BASE, features_e FEAT> uint64_t riscv_hart_mu_p<BASE, FEAT>::
#endif
if((flags & 0xffffffff) != 0xffffffff) {
if(trap_id) {
auto irq_str = cause < this->irq_str.size() ? this->irq_str.at(cause) : "Unknown";
ILOG(disasslogger, logging::DEBUG,
fmt::format("Interrupt with cause '{}' ({}) occurred at address {}", this->irq_str[cause], cause, buffer.data()));
fmt::format("Interrupt with cause '{}' ({}) occurred at address {}", irq_str, cause, buffer.data()));
} else {
auto irq_str = cause < this->trap_str.size() ? this->trap_str.at(cause) : "Unknown";
ILOG(disasslogger, logging::DEBUG,
fmt::format("Trap with cause '{}' ({}) occurred at address {}", this->trap_str[cause], cause, buffer.data()));
fmt::format("Trap with cause '{}' ({}) occurred at address {}", irq_str, cause, buffer.data()));
}
}
// reset trap state
Expand Down