Broken, incomplete, but need to move forward with rewrite.
This commit is contained in:
@@ -14,36 +14,33 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <xenia/cpu/backend.h>
|
||||
#include <xenia/cpu/exec_module.h>
|
||||
#include <xenia/cpu/function_table.h>
|
||||
#include <xenia/cpu/thread_state.h>
|
||||
#include <xenia/kernel/export.h>
|
||||
#include <xenia/kernel/xex2.h>
|
||||
|
||||
|
||||
namespace llvm {
|
||||
class ExecutionEngine;
|
||||
class Function;
|
||||
}
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace cpu {
|
||||
|
||||
class JIT;
|
||||
|
||||
|
||||
class Processor {
|
||||
public:
|
||||
Processor(xe_memory_ref memory);
|
||||
Processor(xe_memory_ref memory, shared_ptr<Backend> backend);
|
||||
~Processor();
|
||||
|
||||
xe_memory_ref memory();
|
||||
shared_ptr<kernel::ExportResolver> export_resolver();
|
||||
void set_export_resolver(shared_ptr<kernel::ExportResolver> export_resolver);
|
||||
|
||||
int Setup();
|
||||
|
||||
int LoadBinary(const xechar_t* path, uint32_t start_address,
|
||||
shared_ptr<kernel::ExportResolver> export_resolver);
|
||||
|
||||
int PrepareModule(const char* name, const char* path, xe_xex2_ref xex,
|
||||
shared_ptr<kernel::ExportResolver> export_resolver);
|
||||
int LoadRawBinary(const xechar_t* path, uint32_t start_address);
|
||||
int LoadXexModule(const char* name, const char* path, xe_xex2_ref xex);
|
||||
|
||||
uint32_t CreateCallback(void (*callback)(void* data), void* data);
|
||||
|
||||
@@ -53,16 +50,15 @@ public:
|
||||
uint64_t Execute(ThreadState* thread_state, uint32_t address, uint64_t arg0);
|
||||
|
||||
private:
|
||||
llvm::Function* GetFunction(uint32_t address);
|
||||
FunctionPointer GenerateFunction(uint32_t address);
|
||||
|
||||
xe_memory_ref memory_;
|
||||
shared_ptr<llvm::ExecutionEngine> engine_;
|
||||
|
||||
auto_ptr<llvm::LLVMContext> dummy_context_;
|
||||
xe_memory_ref memory_;
|
||||
shared_ptr<Backend> backend_;
|
||||
shared_ptr<kernel::ExportResolver> export_resolver_;
|
||||
|
||||
FunctionTable* fn_table_;
|
||||
JIT* jit_;
|
||||
std::vector<ExecModule*> modules_;
|
||||
|
||||
FunctionMap all_fns_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user