dolphin/Source
Sintendo b805223108 Jit64: subfx - Optimize more constant a cases
Consider the case where d and a refer to the same PowerPC register,
which is known to hold an immediate value by the RegCache. We place a
ReadWrite constraint on this register and bind it to an x86 register.
The RegCache then allocates a new register, initializes it with the
immediate, and returns a RCX64Reg for both d and a.

At this point information about the immediate value becomes unreachable.
In the case of subfx, this generates suboptimal code:

Before 1:
BF 1E 00 00 00       mov         edi,1Eh       <- done by RegCache
8B C7                mov         eax,edi
8B FE                mov         edi,esi
2B F8                sub         edi,eax

Before 2:
BE 00 AC 3F 80       mov         esi,803FAC00h <- done by RegCache
8B C6                mov         eax,esi
8B 75 EC             mov         esi,dword ptr [rbp-14h]
2B F0                sub         esi,eax

The solution is to explicitly handle the constant a case before having
the RegCache allocate registers for us.

After 1:
8D 7E E2             lea         edi,[rsi-1Eh]

After 2:
8B 75 EC             mov         esi,dword ptr [rbp-14h]
81 EE 00 AC 3F 80    sub         esi,803FAC00h
2021-01-04 23:02:22 +01:00
..
Android Merge pull request #9318 from JosJuice/android-saf-games 2020-12-30 11:10:35 +01:00
Core Jit64: subfx - Optimize more constant a cases 2021-01-04 23:02:22 +01:00
DSPSpy DSPSpy: sync Makefile with current devkitPro template 2020-06-08 04:21:41 +01:00
DSPTool DSP: Eliminate most global state 2020-12-27 06:38:02 -05:00
PCH Merge pull request #9091 from shuffle2/pch 2020-10-29 21:29:28 +01:00
UnitTests Merge pull request #9307 from Dentomologist/add-deleted-file-missing-warning-flag 2020-12-11 02:06:28 +01:00
VSProps DolphinQt: Stop using qtmain 2020-09-21 17:27:10 +02:00
.clang-format
CMakeLists.txt Turn format string issues into compile-time errors 2020-12-04 18:06:02 +01:00
dolphin-emu.sln Externals: Add zstd 2020-05-13 20:53:10 +02:00