| 67 | friend class LiveGenerator; |
| 68 | }; |
| 69 | struct LiveGeneratorInputs { |
| 70 | uint32_t base_event_index; |
| 71 | void (*cop0_status_write)(recomp_context* ctx, gpr value); |
| 72 | gpr (*cop0_status_read)(recomp_context* ctx); |
| 73 | void (*switch_error)(const char* func, uint32_t vram, uint32_t jtbl); |
| 74 | void (*do_break)(uint32_t vram); |
| 75 | recomp_func_t* (*get_function)(int32_t vram); |
| 76 | void (*syscall_handler)(uint8_t* rdram, recomp_context* ctx, int32_t instruction_vram); |
| 77 | void (*pause_self)(uint8_t* rdram); |
| 78 | void (*trigger_event)(uint8_t* rdram, recomp_context* ctx, uint32_t event_index); |
| 79 | int32_t *reference_section_addresses; |
| 80 | int32_t *local_section_addresses; |
| 81 | void (*run_hook)(uint8_t* rdram, recomp_context* ctx, size_t hook_table_index); |
| 82 | // Maps function index in recompiler context to function's entry hook slot. |
| 83 | std::unordered_map<size_t, size_t> entry_func_hooks; |
| 84 | // Maps function index in recompiler context to function's return hook slot. |
| 85 | std::unordered_map<size_t, size_t> return_func_hooks; |
| 86 | // Maps section index in the generated code to original section index. Used by regenerated |
| 87 | // code to relocate using the corresponding original section's address. |
| 88 | std::vector<size_t> original_section_indices; |
| 89 | }; |
| 90 | class LiveGenerator final : public Generator { |
| 91 | public: |
| 92 | LiveGenerator(size_t num_funcs, const LiveGeneratorInputs& inputs); |
nothing calls this directly
no outgoing calls
no test coverage detected