aboutsummaryrefslogtreecommitdiff
path: root/riscv/trap.cc
blob: 5add05d75d3f1be86c57f668d278ed0f8b5c4d48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// See LICENSE for license details.

#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->mbadaddr = badvaddr;
}