Refer to LICENSE in some newer source files
[riscv-isa-sim.git] / riscv / trap.cc
1 // See LICENSE for license details.
2
3 #include "trap.h"
4 #include "processor.h"
5 #include <cstdio>
6
7 const char* trap_t::name()
8 {
9 const char* fmt = uint8_t(which) == which ? "trap #%u" : "interrupt #%u";
10 sprintf(_name, fmt, uint8_t(which));
11 return _name;
12 }
13
14 void mem_trap_t::side_effects(state_t* state)
15 {
16 state->mbadaddr = badvaddr;
17 }