dolphin/Source/Core
Lioncash 09271f365a PowerPC/ConditionRegister: Mark PPCToInternal() as constexpr
This allows the compiler to eliminate a static constructor that
initializes the table, and instead precompute all of the data ahead of
time.

e.g. We get something like so on GCC without constexpr:

_GLOBAL__sub_I_PowerPC::ConditionRegister::s_crTable:
        movdqa  xmm0, XMMWORD PTR .LC0[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip], xmm0
        movdqa  xmm0, XMMWORD PTR .LC1[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+16], xmm0
        movdqa  xmm0, XMMWORD PTR .LC2[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+32], xmm0
        movdqa  xmm0, XMMWORD PTR .LC3[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+48], xmm0
        movdqa  xmm0, XMMWORD PTR .LC4[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+64], xmm0
        movdqa  xmm0, XMMWORD PTR .LC5[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+80], xmm0
        movdqa  xmm0, XMMWORD PTR .LC6[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+96], xmm0
        movdqa  xmm0, XMMWORD PTR .LC7[rip]
        movaps  XMMWORD PTR PowerPC::ConditionRegister::s_crTable[rip+112], xmm0
        ret
PowerPC::ConditionRegister::s_crTable:
        .zero   128
.LC0:
        .quad   -9223372032559808511
        .quad   -8646911280256385023
.LC1:
        .quad   -9223372032559808512
        .quad   -8646911280256385024
.LC2:
        .quad   4294967297
        .quad   576460756598390785
.LC3:
        .quad   4294967296
        .quad   576460756598390784
.LC4:
        .quad   -4611686014132420607
        .quad   -4035225261828997119
.LC5:
        .quad   -4611686014132420608
        .quad   -4035225261828997120
.LC6:
        .quad   4611686022722355201
        .quad   5188146775025778689
.LC7:
        .quad   4611686022722355200
        .quad   5188146775025778688

and with constexpr, this all get collapsed into:

PowerPC::ConditionRegister::s_crTable:
        .quad   -9223372032559808511
        .quad   -8646911280256385023
        .quad   -9223372032559808512
        .quad   -8646911280256385024
        .quad   4294967297
        .quad   576460756598390785
        .quad   4294967296
        .quad   576460756598390784
        .quad   -4611686014132420607
        .quad   -4035225261828997119
        .quad   -4611686014132420608
        .quad   -4035225261828997120
        .quad   4611686022722355201
        .quad   5188146775025778689
        .quad   4611686022722355200
        .quad   5188146775025778688

completely eliminating the static constructor. MSVC also exhibits this,
whereas clang is a little better and does this anyway, even without
constexpr.
2023-06-08 14:33:13 -04:00
..
AudioCommon Common: Move FixedSizeQueue into Common namespace 2023-03-22 01:23:15 -04:00
Common Merge pull request #11901 from Filoppi/add_texture_types 2023-06-08 15:28:15 +02:00
Core PowerPC/ConditionRegister: Mark PPCToInternal() as constexpr 2023-06-08 14:33:13 -04:00
DiscIO Merge pull request #11829 from lioncash/strutil 2023-05-17 09:13:36 +02:00
DolphinNoGUI Merge pull request #11873 from AdmiralCurtiss/pause-and-lock-host 2023-06-06 13:50:20 +02:00
DolphinQt Merge pull request #11694 from jnaidu360/skylanders-portal-window 2023-06-06 19:20:39 +02:00
DolphinTool Core: Assert that only the Host thread may call PauseAndLock(). 2023-06-02 18:51:43 +02:00
InputCommon InputCommon: Don't treat two analog inputs as a spurious trigger combo 2023-06-06 22:07:14 +02:00
MacUpdater CMake: Fix storyboard copying 2023-04-29 16:10:38 -05:00
UICommon Fix s_using_custom_client warning with DiscordPresence 2023-05-23 00:07:06 -04:00
UpdaterCommon Common/CommonFuncs: Move interface into Common namespace 2023-04-18 19:23:04 -04:00
VideoBackends Merge pull request #11901 from Filoppi/add_texture_types 2023-06-08 15:28:15 +02:00
VideoCommon Merge pull request #11899 from Filoppi/patch-20 2023-06-08 16:12:49 +02:00
WinUpdater StringUtil: Move CommandLineToUtf8Argv() into Common namespace 2023-05-16 14:23:21 -04:00
CMakeLists.txt
DolphinLib.ARM64.props
DolphinLib.props VideoCommon: add multithreaded asset loader and define a texture asset 2023-06-02 17:31:31 -05:00
DolphinLib.vcxproj Added rcheevos to Externals 2023-04-02 08:28:23 -04:00
DolphinLib.vcxproj.user
DolphinLib.x64.props Move x64 DSP JIT into DolphinLib.x64.props 2023-01-06 22:42:21 -08:00