From 009c3ee3f74d6babfaae56f80bbac3f95a2d4cb1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 21 Mar 2014 02:23:09 -0700 Subject: [PATCH] vertexjit: Save S16-S31 registers in ARM. --- Common/ArmEmitter.h | 6 ++++++ GPU/GLES/VertexDecoderArm.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Common/ArmEmitter.h b/Common/ArmEmitter.h index 4b8f73169e..c2910aee73 100644 --- a/Common/ArmEmitter.h +++ b/Common/ArmEmitter.h @@ -591,6 +591,12 @@ public: void VSTMIA(ARMReg dest, bool WriteBack, ARMReg firstreg, int numregs); void VLDMDB(ARMReg dest, bool WriteBack, ARMReg firstreg, int numregs); void VSTMDB(ARMReg dest, bool WriteBack, ARMReg firstreg, int numregs); + void VPUSH(ARMReg firstvreg, int numvregs) { + VSTMDB(R_SP, true, firstvreg, numvregs); + } + void VPOP(ARMReg firstvreg, int numvregs) { + VLDMIA(R_SP, true, firstvreg, numvregs); + } void VLDR(ARMReg Dest, ARMReg Base, s16 offset); void VSTR(ARMReg Src, ARMReg Base, s16 offset); void VCMP(ARMReg Vd, ARMReg Vm); diff --git a/GPU/GLES/VertexDecoderArm.cpp b/GPU/GLES/VertexDecoderArm.cpp index e0c4b79f17..633cdfd436 100644 --- a/GPU/GLES/VertexDecoderArm.cpp +++ b/GPU/GLES/VertexDecoderArm.cpp @@ -157,6 +157,9 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec) { SetCC(CC_AL); PUSH(6, R4, R5, R6, R7, R8, R_LR); + if (cpu_info.bNEON) { + VPUSH(D8, 8); + } // Keep the scale/offset in a few fp registers if we need it. // This step can be NEON-ized but the savings would be miniscule. @@ -244,6 +247,9 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec) { SUBS(counterReg, counterReg, 1); B_CC(CC_NEQ, loopStart); + if (cpu_info.bNEON) { + VPOP(D8, 8); + } POP(6, R4, R5, R6, R7, R8, R_PC); FlushLitPool();