Generate trampoline functions for GetProcAddressByOrdinal on kernel modules.
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
#include "xenia/kernel/xmodule.h"
|
||||
|
||||
namespace xe {
|
||||
namespace cpu {
|
||||
class RawModule;
|
||||
} // namespace cpu
|
||||
|
||||
namespace kernel {
|
||||
|
||||
class KernelState;
|
||||
@@ -30,6 +34,16 @@ class KernelModule : public XModule {
|
||||
Emulator* emulator_;
|
||||
Memory* memory_;
|
||||
xe::cpu::ExportResolver* export_resolver_;
|
||||
|
||||
// Guest trampoline for GetProcAddress
|
||||
static const uint32_t kTrampolineSize = 400 * 8;
|
||||
uint32_t guest_trampoline_ = 0;
|
||||
uint32_t guest_trampoline_next_ = 0; // Next free entry to be generated.
|
||||
uint32_t guest_trampoline_size_ = 0;
|
||||
cpu::RawModule* guest_trampoline_module_ = nullptr;
|
||||
std::map<uint16_t, uint32_t> guest_trampoline_map_;
|
||||
|
||||
xe::global_critical_region global_critical_region_;
|
||||
};
|
||||
|
||||
} // namespace kernel
|
||||
|
||||
Reference in New Issue
Block a user