summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2015-01-15 05:32:14 +0100
committerTillmann Karras <tilkax@gmail.com>2015-01-18 13:30:21 +0100
commitdc01e261d1c12e748d59344fbbdd7e89457a58ae (patch)
tree5ab690ae7092181a6969cab4ea230a102bcb8d8b /Source/Core
parentf5545477e3d45d575f6656ded9f251676588a11c (diff)
VertexLoaderX64: fix duplicate register allocation
Thanks to @shuffle2 for noticing this.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderX64.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp
index b59de2c71d..c1f96eb99d 100644
--- a/Source/Core/VideoCommon/VertexLoaderX64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp
@@ -12,11 +12,11 @@ using namespace Gen;
static const X64Reg src_reg = ABI_PARAM1;
static const X64Reg dst_reg = ABI_PARAM2;
-static const X64Reg count_reg = ABI_PARAM3;
static const X64Reg scratch1 = RAX;
-static const X64Reg scratch2 = R8;
-static const X64Reg scratch3 = R9;
-static const X64Reg skipped_reg = R10;
+static const X64Reg scratch2 = ABI_PARAM3;
+static const X64Reg scratch3 = ABI_PARAM4;
+static const X64Reg count_reg = R10;
+static const X64Reg skipped_reg = R11;
VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att): VertexLoaderBase(vtx_desc, vtx_att)
{
@@ -284,7 +284,10 @@ void VertexLoaderX64::ReadColor(OpArg data, u64 attribute, int format, int eleme
void VertexLoaderX64::GenerateVertexLoader()
{
// Backup count since we're going to count it down.
- PUSH(32, R(count_reg));
+ PUSH(32, R(ABI_PARAM3));
+
+ // We use ABI_PARAM3 for scratch2.
+ MOV(32, R(count_reg), R(ABI_PARAM3));
if (m_VtxDesc.Position & MASK_INDEXED)
XOR(32, R(skipped_reg), R(skipped_reg));