Added PC histogram option.
[riscv-isa-sim.git] / spike / extensions.cc
1 #include "extension.h"
2 #include "hwacha.h"
3 #include "dummy-rocc.h"
4
5 REGISTER_EXTENSION(dummy, []() { return new dummy_rocc_t; })
6 REGISTER_EXTENSION(hwacha, []() { return new hwacha_t; })
7
8 // Static constructors want to make use of the extensions map, so we
9 // access it through a function call to guarantee initialization order.
10 std::map<std::string, std::function<extension_t*()>>& extensions()
11 {
12 static std::map<std::string, std::function<extension_t*()>> v;
13 return v;
14 }