Files
Xenia-Canary/src/xenia/cpu/jit.h
Ben Vanik b7ffd46319 Massive refactoring of all code + audio skeleton.
This should make it easier to find files and (in the future) split things
up into separate libraries.
It also changes around emulator initialization to make it a little more
difficult to do things out of order and a little more sensible as to when
real init work happens.
Also adding a skeleton audio system/driver and reworking CPU register
access to be more extensible.
2013-10-23 20:42:24 -07:00

59 lines
1.4 KiB
C++

/**
******************************************************************************
* 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_JIT_H_
#define XENIA_CPU_JIT_H_
#include <xenia/core.h>
#include <xenia/cpu/ppc.h>
#include <xenia/cpu/sdb.h>
namespace xe {
namespace cpu {
class ExecModule;
class JIT {
public:
virtual ~JIT() {
xe_memory_release(memory_);
}
virtual int Setup() = 0;
virtual void AddRegisterAccessCallbacks(
ppc::RegisterAccessCallbacks callbacks) = 0;
virtual int InitModule(ExecModule* module) = 0;
virtual int UninitModule(ExecModule* module) = 0;
virtual void* GetFunctionPointer(sdb::FunctionSymbol* fn_symbol) = 0;
virtual int Execute(xe_ppc_state_t* ppc_state,
sdb::FunctionSymbol* fn_symbol) = 0;
protected:
JIT(xe_memory_ref memory, sdb::SymbolTable* sym_table) {
memory_ = xe_memory_retain(memory);
sym_table_ = sym_table;
}
xe_memory_ref memory_;
sdb::SymbolTable* sym_table_;
};
} // namespace cpu
} // namespace xe
#endif // XENIA_CPU_JIT_H_