From ee4a12ffe2cccb41c1cfc136e55903dc03a3e17c Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 21 Aug 2015 21:49:09 +0200 Subject: Jit64: some byte-swapping changes --- Source/Core/VideoCommon/VertexLoaderX64.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'Source/Core/VideoCommon/VertexLoaderX64.cpp') diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp index a298d7e1dd..dd9cd0528d 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.cpp +++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp @@ -53,21 +53,12 @@ OpArg VertexLoaderX64::GetVertexAddr(int array, u64 attribute) OpArg data = MDisp(src_reg, m_src_ofs); if (attribute & MASK_INDEXED) { - if (attribute == INDEX8) - { - MOVZX(64, 8, scratch1, data); - m_src_ofs += 1; - } - else - { - MOV(16, R(scratch1), data); - m_src_ofs += 2; - BSWAP(16, scratch1); - MOVZX(64, 16, scratch1, R(scratch1)); - } + int bits = attribute == INDEX8 ? 8 : 16; + LoadAndSwap(bits, scratch1, data); + m_src_ofs += bits / 8; if (array == ARRAY_POSITION) { - CMP(attribute == INDEX8 ? 8 : 16, R(scratch1), Imm8(-1)); + CMP(bits, R(scratch1), Imm8(-1)); m_skip_vertex = J_CC(CC_E, true); } IMUL(32, scratch1, MPIC(&g_main_cp_state.array_strides[array])); -- cgit v1.2.3 From 63c9fdd0746f1ad85d60e3c0b4a5f460ffb0457d Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 12 Sep 2015 01:24:47 +0200 Subject: 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/VideoCommon/VertexLoaderX64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/VertexLoaderX64.cpp') 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(); -- cgit v1.2.3