dolphin/Source/Core
Sintendo c081e3f2b3 Jit64: divwx - Optimize constant dividend
When the dividend is known at compile time, we can eliminate some of the
branching and precompute the result for the overflow case.

Before:
B8 54 D3 E6 02       mov         eax,2E6D354h
85 FF                test        edi,edi
74 0C                je          overflow
3D 00 00 00 80       cmp         eax,80000000h
75 0C                jne         normal_path
83 FF FF             cmp         edi,0FFFFFFFFh
75 07                jne         normal_path
overflow:
C1 F8 1F             sar         eax,1Fh
8B F8                mov         edi,eax
EB 05                jmp         done
normal_path:
99                   cdq
F7 FF                idiv        eax,edi
8B F8                mov         edi,eax
done:

After:
85 FF                test        edi,edi
75 04                jne         normal_path
33 FF                xor         edi,edi
EB 0A                jmp         done
normal_path:
B8 54 D3 E6 02       mov         eax,2E6D354h
99                   cdq
F7 FF                idiv        eax,edi
8B F8                mov         edi,eax
done:

Fairly common with constant dividend of zero. Non-zero values occur
frequently in Ocarina of Time Master Quest.
2021-03-07 18:25:08 +01:00
..
AudioCommon msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
Common Merge pull request #9559 from iwubcode/gdb-stub-raii 2021-03-05 05:28:31 -05:00
Core Jit64: divwx - Optimize constant dividend 2021-03-07 18:25:08 +01:00
DiscIO IOS: Use less ambiguous names for classes 2021-02-12 21:40:31 +01:00
DolphinNoGUI Merge pull request #9492 from nolange/fix_norandr_build 2021-03-01 11:36:39 +01:00
DolphinQt BreakpointWidget: Use QSignalBlocker 2021-03-05 13:35:33 +04:00
InputCommon Merge pull request #9539 from iwubcode/dynamic_input_tex_more_optimizations 2021-03-02 02:53:22 +01:00
MacUpdater Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
UICommon Merge pull request #9492 from nolange/fix_norandr_build 2021-03-01 11:36:39 +01:00
UpdaterCommon msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
VideoBackends Software: Implement points 2021-02-13 15:59:40 -08:00
VideoCommon VideoCommon: Join the prefetch thread before clearing to avoid a potential crash that can occur by multiple threads touching a single resource 2021-02-11 19:18:38 -06:00
WinUpdater msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00
DolphinLib.ARM64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.props Common: Add RAII object that initializes and cleans up winsock 2021-03-04 13:44:12 -06:00
DolphinLib.vcxproj msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.vcxproj.user msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.x64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00