From ce01268885c4fb64942946bbd20150b1b7ca1a33 Mon Sep 17 00:00:00 2001 From: magumagu9 Date: Thu, 25 Dec 2008 22:18:39 +0000 Subject: [PATCH] Use ABI_CallFunction instead of CALL where appropriate. Hopefully, this will help with the reported crash problems on OSX. I can't really test properly, though, since I'm on Linux; please give me feedback on whether this helps. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1664 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp | 6 +++--- Source/Core/Core/Src/PowerPC/Jit64/JitAsm.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index cde7b990dd..a276e6b728 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -293,7 +293,7 @@ namespace CPUCompare void Jit64::Cleanup() { if (jo.optimizeGatherPipe && js.fifoBytesThisBlock > 0) - CALL((void *)&GPFifo::CheckGatherPipe); + ABI_CallFunction((void *)&GPFifo::CheckGatherPipe); } void Jit64::WriteExit(u32 destination, int exit_num) @@ -412,7 +412,7 @@ namespace CPUCompare const u8 *normalEntry = GetCodePtr(); if (ImHereDebug) - CALL((void *)&ImHere); //Used to get a trace of the last few blocks before a crash, sometimes VERY useful + ABI_CallFunction((void *)&ImHere); //Used to get a trace of the last few blocks before a crash, sometimes VERY useful if (js.fpa.any) { @@ -489,7 +489,7 @@ namespace CPUCompare if (jo.optimizeGatherPipe && js.fifoBytesThisBlock >= 32) { js.fifoBytesThisBlock -= 32; - CALL(thunks.ProtectFunction((void *)&GPFifo::CheckGatherPipe, 0)); + ABI_CallFunction(thunks.ProtectFunction((void *)&GPFifo::CheckGatherPipe, 0)); } // If starting from the breakpointed instruction, we don't break. diff --git a/Source/Core/Core/Src/PowerPC/Jit64/JitAsm.cpp b/Source/Core/Core/Src/PowerPC/Jit64/JitAsm.cpp index 856829de98..32eb42b0ef 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/JitAsm.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/JitAsm.cpp @@ -75,7 +75,7 @@ void AsmRoutineManager::Generate() #endif const u8 *outerLoop = GetCodePtr(); - CALL(reinterpret_cast(&CoreTiming::Advance)); + ABI_CallFunction(reinterpret_cast(&CoreTiming::Advance)); FixupBranch skipToRealDispatch = J(); //skip the sync and compare first time dispatcher = GetCodePtr(); @@ -134,7 +134,7 @@ void AsmRoutineManager::Generate() MOV(32, R(EAX), M(&PC)); MOV(32, M(&NPC), R(EAX)); OR(32, M(&PowerPC::ppcState.Exceptions), Imm32(EXCEPTION_FPU_UNAVAILABLE)); - CALL(reinterpret_cast(&PowerPC::CheckExceptions)); + ABI_CallFunction(reinterpret_cast(&PowerPC::CheckExceptions)); MOV(32, R(EAX), M(&NPC)); MOV(32, M(&PC), R(EAX)); JMP(dispatcher); @@ -142,14 +142,14 @@ void AsmRoutineManager::Generate() SetJumpTarget(bail); doTiming = GetCodePtr(); - CALL(reinterpret_cast(&CoreTiming::Advance)); + ABI_CallFunction(reinterpret_cast(&CoreTiming::Advance)); testExceptions = GetCodePtr(); TEST(32, M(&PowerPC::ppcState.Exceptions), Imm32(0xFFFFFFFF)); FixupBranch skipExceptions = J_CC(CC_Z); MOV(32, R(EAX), M(&PC)); MOV(32, M(&NPC), R(EAX)); - CALL(reinterpret_cast(&PowerPC::CheckExceptions)); + ABI_CallFunction(reinterpret_cast(&PowerPC::CheckExceptions)); MOV(32, R(EAX), M(&NPC)); MOV(32, M(&PC), R(EAX)); SetJumpTarget(skipExceptions);