/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2013 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XENIA_CPU_USERMODULE_H_ #define XENIA_CPU_USERMODULE_H_ #include #include #include #include #include namespace llvm { class LLVMContext; class Module; class ExecutionEngine; } namespace xe { namespace cpu { namespace codegen { class ModuleGenerator; } } } namespace xe { namespace cpu { class ExecModule { public: ExecModule( xe_memory_ref memory, shared_ptr export_resolver, kernel::UserModule* user_module, shared_ptr& engine); ~ExecModule(); int Prepare(); void Dump(); private: int InjectGlobals(); int Init(); int Uninit(); xe_memory_ref memory_; shared_ptr export_resolver_; kernel::UserModule* module_; shared_ptr engine_; shared_ptr sdb_; shared_ptr context_; shared_ptr gen_module_; auto_ptr codegen_; }; } // namespace cpu } // namespace xe #endif // XENIA_CPU_USERMODULE_H_