Spike, a RISC-V ISA Simulator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
303 B

#include "trap.h"
#include "processor.h"
#include <cstdio>
const char* trap_t::name()
{
const char* fmt = uint8_t(which) == which ? "trap #%u" : "interrupt #%u";
sprintf(_name, fmt, uint8_t(which));
return _name;
}
void mem_trap_t::side_effects(state_t* state)
{
state->badvaddr = badvaddr;
}