From c93aaae1d8b622d69d6e6ab1be1d66c394ff3cce Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Fri, 19 Nov 2010 17:35:01 +0000 Subject: [PATCH] Linux build fix. When I have time later I will implement nodchip's JitIL profiling on linux. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6445 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp index 123f2a93a0..62ddb15ffb 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp @@ -219,7 +219,15 @@ namespace JitILProfiler { #else namespace JitILProfiler { // FIXME: Dummy functions for linux. Please implement them. - static Block& Add(u64 codeHash) { } + struct Block { + u32 index; + u64 codeHash; + u64 toalElapsed; + u64 numberOfCalls; + Block() : index(0), codeHash(0), toalElapsed(0), numberOfCalls(0) { } + }; + static Block dummyBlock; + static Block& Add(u64 codeHash) { return dummyBlock; } static void Begin(u32 index) { } static void End() { } static void Init() { } @@ -376,7 +384,7 @@ void JitIL::WriteExit(u32 destination, int exit_num) { Cleanup(); if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling) { - ABI_CallFunction(JitILProfiler::End); + ABI_CallFunction((void *)JitILProfiler::End); } SUB(32, M(&CoreTiming::downcount), js.downcountAmount > 127 ? Imm32(js.downcountAmount) : Imm8(js.downcountAmount)); @@ -405,7 +413,7 @@ void JitIL::WriteExitDestInOpArg(const Gen::OpArg& arg) MOV(32, M(&PC), arg); Cleanup(); if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling) { - ABI_CallFunction(JitILProfiler::End); + ABI_CallFunction((void *)JitILProfiler::End); } SUB(32, M(&CoreTiming::downcount), js.downcountAmount > 127 ? Imm32(js.downcountAmount) : Imm8(js.downcountAmount)); JMP(asm_routines.dispatcher, true); @@ -416,7 +424,7 @@ void JitIL::WriteRfiExitDestInOpArg(const Gen::OpArg& arg) MOV(32, M(&PC), arg); Cleanup(); if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling) { - ABI_CallFunction(JitILProfiler::End); + ABI_CallFunction((void *)JitILProfiler::End); } SUB(32, M(&CoreTiming::downcount), js.downcountAmount > 127 ? Imm32(js.downcountAmount) : Imm8(js.downcountAmount)); JMP(asm_routines.testExceptions, true); @@ -426,7 +434,7 @@ void JitIL::WriteExceptionExit() { Cleanup(); if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITILTimeProfiling) { - ABI_CallFunction(JitILProfiler::End); + ABI_CallFunction((void *)JitILProfiler::End); } SUB(32, M(&CoreTiming::downcount), js.downcountAmount > 127 ? Imm32(js.downcountAmount) : Imm8(js.downcountAmount)); JMP(asm_routines.testExceptions, true); @@ -572,7 +580,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc codeHash ^= inst + (codeHash << 6) + (codeHash >> 2); } JitILProfiler::Block& block = JitILProfiler::Add(codeHash); - ABI_CallFunctionC(JitILProfiler::Begin, block.index); + ABI_CallFunctionC((void *)JitILProfiler::Begin, block.index); } // Start up IR builder (structure that collects the