summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2014-09-17 19:38:28 -0700
committershuffle2 <godisgovernment@gmail.com>2014-09-17 19:38:28 -0700
commit8b151d6a61593a86dedd55b9ece34d89f8a458ab (patch)
treeff0dcf597371d6a6c305791520719d3a71bc5da5 /Source/Core
parent49a48a6057ad2fd189dd85ba0b38d541e8bac17d (diff)
parent217758b607ff270582af31a88c86052d0656444c (diff)
Merge pull request #1104 from comex/its-like-the-bad-old-days-where-i-broke-master-over-and-over
Fix BLR optimization (sorry)
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp
index 92595f6acd..f191f2efa5 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp
@@ -116,8 +116,7 @@ using namespace PowerPC;
// accessed, immediately turn into regular pages but cause a trap... but
// putting them in the path of RSP just leads to something (in the kernel?)
// thinking a regular stack extension is required. So this protection is not
-// supported on Windows yet... We still use a separate stack for the sake of
-// simplicity.
+// supported on Windows yet...
enum
{
@@ -129,7 +128,7 @@ enum
void Jit64::AllocStack()
{
-#if defined(_WIN32)
+#ifndef _WIN32
m_stack = (u8*)AllocateMemoryPages(STACK_SIZE);
ReadProtectMemory(m_stack, GUARD_SIZE);
ReadProtectMemory(m_stack + GUARD_OFFSET, GUARD_SIZE);
@@ -138,7 +137,7 @@ void Jit64::AllocStack()
void Jit64::FreeStack()
{
-#if defined(_WIN32)
+#ifndef _WIN32
if (m_stack)
{
FreeMemoryPages(m_stack, STACK_SIZE);
@@ -330,7 +329,9 @@ bool Jit64::Cleanup()
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
if (MMCR0.Hex || MMCR1.Hex)
{
+ ABI_PushRegistersAndAdjustStack(0, 0);
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
+ ABI_PopRegistersAndAdjustStack(0, 0);
did_something = true;
}