diff options
| author | Sintendo <bram.speeckaert@gmail.com> | 2021-03-04 22:29:15 +0100 |
|---|---|---|
| committer | Sintendo <bram.speeckaert@gmail.com> | 2021-03-07 18:29:12 +0100 |
| commit | 18650357988c54727bb9eb9f8de864b6b2e528a2 (patch) | |
| tree | ca6203a442405f6f27c9d51d1e3b5b756d218f9e /Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | |
| parent | 0637a7ec597d6b96ac9b6274f390bf2ee22807fd (diff) | |
Jit64: divwx - Optimize division by 2
...and let's optimize a divisor of 2 ever so slightly for good measure.
I wouldn't have bothered, but most GameCube games seem to hit this on
launch.
- Division by 2
Before:
41 BE 02 00 00 00 mov r14d,2
41 8B C2 mov eax,r10d
45 85 F6 test r14d,r14d
74 0D je overflow
3D 00 00 00 80 cmp eax,80000000h
75 0E jne normal_path
41 83 FE FF cmp r14d,0FFFFFFFFh
75 08 jne normal_path
overflow:
C1 F8 1F sar eax,1Fh
44 8B F0 mov r14d,eax
EB 07 jmp done
normal_path:
99 cdq
41 F7 FE idiv eax,r14d
44 8B F0 mov r14d,eax
done:
After:
45 8B F2 mov r14d,r10d
41 C1 EE 1F shr r14d,1Fh
45 03 F2 add r14d,r10d
41 D1 FE sar r14d,1
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp')
0 files changed, 0 insertions, 0 deletions
