vertexjit: Save S16-S31 registers in ARM.

This commit is contained in:
Unknown W. Brackets 2014-03-21 02:23:09 -07:00
parent b04553b983
commit 009c3ee3f7
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -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();