Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[ARM] Implement psq_l for 2x float loads. Couldn't find a game using …
…quantized loads. Huge speed boost to Ikaruga and THP movies with this one.
- Loading branch information
1 parent
614a7c2
commit 31b69c5
Showing
6 changed files
with
131 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
Source/Core/Core/Src/PowerPC/JitArm32/JitArm_LoadStorePaired.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| // Copyright 2013 Dolphin Emulator Project | ||
| // Licensed under GPLv2 | ||
| // Refer to the license.txt file included. | ||
| #include "Common.h" | ||
| #include "Thunk.h" | ||
|
|
||
| #include "../../Core.h" | ||
| #include "../PowerPC.h" | ||
| #include "../../CoreTiming.h" | ||
| #include "../PPCTables.h" | ||
| #include "ArmEmitter.h" | ||
|
|
||
| #include "Jit.h" | ||
| #include "JitRegCache.h" | ||
| #include "JitAsm.h" | ||
|
|
||
| void JitArm::psq_l(UGeckoInstruction inst) | ||
| { | ||
| INSTRUCTION_START | ||
| JITDISABLE(bJITLoadStorePairedOff) | ||
|
|
||
| bool update = inst.OPCD == 57; | ||
| s32 offset = inst.SIMM_12; | ||
|
|
||
| // R12 contains scale | ||
| // R11 contains type | ||
| // R10 is the ADDR | ||
|
|
||
| if (js.memcheck) { Default(inst); return; } | ||
|
|
||
| if (inst.W) { | ||
| // Enable when supporting single loads | ||
| Default(inst); | ||
| return; | ||
| } | ||
|
|
||
| LDR(R11, R9, PPCSTATE_OFF(spr[SPR_GQR0 + inst.I])); | ||
| //UBFX(R12, R11, 2, 6); // Scale | ||
| UBFX(R11, R11, 13, 3); // Type | ||
|
|
||
| MOVI2R(R10, (u32)offset); | ||
| if (inst.RA) | ||
| ADD(R10, R10, gpr.R(inst.RA)); | ||
| if (update) | ||
| MOV(gpr.R(inst.RA), R10); | ||
| if (inst.W) | ||
| ADD(R11, R11, 8); | ||
| MOVI2R(R14, (u32)asm_routines.pairedLoadQuantized); | ||
| ADD(R14, R14, R11); | ||
| LDR(R14, R14); | ||
|
|
||
| // Values returned in S0, S1 | ||
| BL(R14); // Jump to the quantizer Load | ||
|
|
||
| ARMReg vD0 = fpr.R0(inst.RS, false); | ||
| ARMReg vD1 = fpr.R1(inst.RS, false); | ||
| VCVT(vD0, S0, 0); | ||
| VCVT(vD1, S1, 0); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters