From 63c9fdd0746f1ad85d60e3c0b4a5f460ffb0457d Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 12 Sep 2015 01:24:47 +0200 Subject: [PATCH] VertexLoaderX64: fix 2GB warnings Unlike the CPU JIT, the vertex loader JIT already emits position-independent code, so all we need to do is disable the warning. --- Source/Core/Common/CodeBlock.h | 4 ++-- Source/Core/VideoCommon/VertexLoaderX64.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/CodeBlock.h b/Source/Core/Common/CodeBlock.h index 865c4513ca..5a7df9b87f 100644 --- a/Source/Core/Common/CodeBlock.h +++ b/Source/Core/Common/CodeBlock.h @@ -38,10 +38,10 @@ public: virtual ~CodeBlock() { if (region) FreeCodeSpace(); } // Call this before you generate any code. - void AllocCodeSpace(int size) + void AllocCodeSpace(int size, bool need_low = true) { region_size = size; - region = (u8*)AllocateExecutableMemory(region_size); + region = (u8*)AllocateExecutableMemory(region_size, need_low); T::SetCodePtr(region); } diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp index dd9cd0528d..d55ec17fef 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.cpp +++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp @@ -38,7 +38,7 @@ VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att) : if (!IsInitialized()) return; - AllocCodeSpace(4096); + AllocCodeSpace(4096, false); ClearCodeSpace(); GenerateVertexLoader(); WriteProtect();