Changing calls/jmps to use the indirection table. Most games seem faster.

This commit is contained in:
Ben Vanik
2015-05-21 00:12:28 -07:00
parent ad72c193a6
commit fc4727c339
7 changed files with 144 additions and 178 deletions

View File

@@ -23,15 +23,21 @@ class X64CodeCache;
typedef void* (*HostToGuestThunk)(void* target, void* arg0, void* arg1);
typedef void* (*GuestToHostThunk)(void* target, void* arg0, void* arg1);
typedef void (*ResolveFunctionThunk)();
class X64Backend : public Backend {
public:
const static uint32_t kForceReturnAddress = 0x9FFF0000u;
X64Backend(Processor* processor);
~X64Backend() override;
X64CodeCache* code_cache() const { return code_cache_; }
HostToGuestThunk host_to_guest_thunk() const { return host_to_guest_thunk_; }
GuestToHostThunk guest_to_host_thunk() const { return guest_to_host_thunk_; }
ResolveFunctionThunk resolve_function_thunk() const {
return resolve_function_thunk_;
}
bool Initialize() override;
@@ -41,8 +47,10 @@ class X64Backend : public Backend {
private:
X64CodeCache* code_cache_;
HostToGuestThunk host_to_guest_thunk_;
GuestToHostThunk guest_to_host_thunk_;
ResolveFunctionThunk resolve_function_thunk_;
};
} // namespace x64