XK patch for adding jit config to audiocommon/c16 function to x64emitter
and Skidu's fix for 64bit git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5230 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ea90996852
commit
47239ce0f4
|
@ -102,4 +102,8 @@ namespace AudioCommon
|
|||
|
||||
return backends;
|
||||
}
|
||||
|
||||
bool UseJIT() {
|
||||
return ac_Config.m_EnableJIT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ namespace AudioCommon
|
|||
SoundStream *InitSoundStream(CMixer *mixer = NULL);
|
||||
void ShutdownSoundStream();
|
||||
std::vector<std::string> GetSoundBackends();
|
||||
bool UseJIT();
|
||||
}
|
||||
|
||||
#endif // _AUDIO_COMMON_H_
|
||||
|
|
|
@ -22,6 +22,7 @@ AudioCommonConfig ac_Config;
|
|||
void AudioCommonConfig::Load(IniFile &file) {
|
||||
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
|
||||
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
|
||||
file.Get("Config", "EnableJIT", &m_EnableJIT, true);
|
||||
file.Get("Config", "Volume", &m_Volume, 75);
|
||||
#ifdef _WIN32
|
||||
file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND);
|
||||
|
@ -38,6 +39,7 @@ void AudioCommonConfig::Load(IniFile &file) {
|
|||
void AudioCommonConfig::Set(IniFile &file) {
|
||||
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
|
||||
file.Set("Config", "EnableThrottle", m_EnableThrottle);
|
||||
file.Set("Config", "EnableJIT", m_EnableJIT);
|
||||
file.Set("Config", "Backend", sBackend);
|
||||
file.Set("Config", "Volume", m_Volume);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ struct AudioCommonConfig
|
|||
{
|
||||
bool m_EnableDTKMusic;
|
||||
bool m_EnableThrottle;
|
||||
bool m_EnableJIT;
|
||||
int m_Volume;
|
||||
#ifdef __APPLE__
|
||||
char sBackend[128];
|
||||
|
|
|
@ -66,6 +66,13 @@ void XEmitter::ABI_CallFunction(void *func) {
|
|||
ABI_RestoreStack(0);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC16(void *func, u16 param1) {
|
||||
ABI_AlignStack(1 * 2);
|
||||
PUSH(16, Imm16(param1));
|
||||
CALL(func);
|
||||
ABI_RestoreStack(1 * 2);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC(void *func, u32 param1) {
|
||||
ABI_AlignStack(1 * 4);
|
||||
PUSH(32, Imm32(param1));
|
||||
|
@ -182,7 +189,16 @@ void XEmitter::ABI_RestoreStack(unsigned int frameSize) {
|
|||
|
||||
// Common functions
|
||||
void XEmitter::ABI_CallFunction(void *func) {
|
||||
CALL(func);
|
||||
// Far call
|
||||
MOV(64, R(RAX), Imm64((u64)func));CALLptr(R(RAX));
|
||||
//CALL(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC16(void *func, u16 param1) {
|
||||
MOV(16, R(ABI_PARAM1), Imm16(param1));
|
||||
// Far call
|
||||
MOV(64, R(RAX), Imm64((u64)func));CALLptr(R(RAX));
|
||||
//CALL(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC(void *func, u32 param1) {
|
||||
|
|
|
@ -590,6 +590,9 @@ public:
|
|||
// The difference between this and CALL is that this aligns the stack
|
||||
// where appropriate.
|
||||
void ABI_CallFunction(void *func);
|
||||
|
||||
void ABI_CallFunctionC16(void *func, u16 param1);
|
||||
|
||||
// These only support u32 parameters, but that's enough for a lot of uses.
|
||||
// These will destroy the 1 or 2 first "parameter regs".
|
||||
void ABI_CallFunctionC(void *func, u32 param1);
|
||||
|
|
Loading…
Reference in New Issue