keep a few separate thunkmanagers so they don't all share the same register backup area. seems to fix the single-core-paired-single-x64 issue in mario kart wii, please test the other games that were problematic.
this is probably not the best way to fix it but it'll do for now. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5062 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
14bb1b5f01
commit
b245c398a3
|
@ -23,8 +23,6 @@
|
|||
#include "ABI.h"
|
||||
#include "Thunk.h"
|
||||
|
||||
ThunkManager thunks;
|
||||
|
||||
#define THUNK_ARENA_SIZE 1024*1024*1
|
||||
|
||||
namespace
|
||||
|
|
|
@ -43,13 +43,17 @@ class ThunkManager : public Gen::XCodeBlock
|
|||
const u8 *load_regs;
|
||||
|
||||
public:
|
||||
void Init();
|
||||
void Reset();
|
||||
void Shutdown();
|
||||
|
||||
ThunkManager() {
|
||||
Init();
|
||||
}
|
||||
~ThunkManager() {
|
||||
Shutdown();
|
||||
}
|
||||
void *ProtectFunction(void *function, int num_params);
|
||||
private:
|
||||
void Init();
|
||||
void Shutdown();
|
||||
void Reset();
|
||||
};
|
||||
|
||||
extern ThunkManager thunks;
|
||||
|
||||
#endif // _THUNK_H_
|
||||
|
|
|
@ -45,7 +45,6 @@ namespace HW
|
|||
{
|
||||
CoreTiming::Init();
|
||||
|
||||
thunks.Init(); // not really hw, but this way we know it's inited early :P
|
||||
State_Init();
|
||||
|
||||
// Init the whole Hardware
|
||||
|
@ -85,7 +84,6 @@ namespace HW
|
|||
}
|
||||
|
||||
State_Shutdown();
|
||||
thunks.Shutdown();
|
||||
CoreTiming::Shutdown();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,8 @@ The register allocation is just a simple forward greedy allocator.
|
|||
#include "../../ConfigManager.h"
|
||||
#include "x64Emitter.h"
|
||||
|
||||
static ThunkManager thunks;
|
||||
|
||||
using namespace IREmitter;
|
||||
using namespace Gen;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define _JITASMCOMMON_H
|
||||
|
||||
#include "../JitCommon/Jit_Util.h"
|
||||
#include "Thunk.h"
|
||||
|
||||
class CommonAsmRoutines : public EmuCodeBlock {
|
||||
protected:
|
||||
|
@ -69,6 +70,9 @@ public:
|
|||
// In: ECX: Address to write to.
|
||||
// In: XMM0: Bottom 32-bit slot holds the float to be written.
|
||||
const u8 GC_ALIGNED16(*singleStoreQuantized[8]);
|
||||
|
||||
private:
|
||||
ThunkManager thunks;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "Common.h"
|
||||
#include "x64Emitter.h"
|
||||
#include "x64Analyzer.h"
|
||||
#include "Thunk.h"
|
||||
|
||||
// Declarations and definitions
|
||||
// ----------
|
||||
|
@ -53,6 +54,8 @@ public:
|
|||
|
||||
const u8 *GetReadTrampoline(const InstructionInfo &info);
|
||||
const u8 *GetWriteTrampoline(const InstructionInfo &info);
|
||||
private:
|
||||
ThunkManager thunks;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define _JITUTIL_H
|
||||
|
||||
#include "x64Emitter.h"
|
||||
#include "Thunk.h"
|
||||
|
||||
// Like XCodeBlock but has some utilities for memory access.
|
||||
class EmuCodeBlock : public Gen::XCodeBlock {
|
||||
|
@ -39,6 +40,8 @@ public:
|
|||
|
||||
void ForceSinglePrecisionS(Gen::X64Reg xmm);
|
||||
void ForceSinglePrecisionP(Gen::X64Reg xmm);
|
||||
protected:
|
||||
ThunkManager thunks;
|
||||
};
|
||||
|
||||
#endif // _JITUTIL_H
|
||||
|
|
Loading…
Reference in New Issue