cce8345121f61a9f2fe554d0f284b810977236f5
1 #ifndef _RISCV_COPROCESSOR_H
2 #define _RISCV_COPROCESSOR_H
14 virtual std::vector
<insn_desc_t
> get_instructions() = 0;
15 virtual std::vector
<disasm_insn_t
*> get_disasms() = 0;
16 virtual const char* name() = 0;
17 virtual void reset() {};
18 virtual void set_debug(bool value
) {};
19 virtual ~extension_t();
21 void set_processor(processor_t
* _p
) { p
= _p
; }
25 void illegal_instruction();
26 void raise_interrupt();
27 void clear_interrupt();
30 std::map
<std::string
, std::function
<extension_t
*()>>& extensions();
32 #define REGISTER_EXTENSION(name, constructor) \
33 class register_##name { \
34 public: register_##name() { extensions()[#name] = constructor; } \
35 }; static register_##name dummy_##name;