dolphin/Source/Core/Core/HLE
Lioncash 244d083f0e PowerPC: Remove separate macros for paired singles
Previously, PowerPC.h had four macros in it like so:

\#define rPS0(i) (*(double*)(&PowerPC::ppcState.ps[i][0]))
\#define rPS1(i) (*(double*)(&PowerPC::ppcState.ps[i][1]))

\#define riPS0(i) (*(u64*)(&PowerPC::ppcState.ps[i][0]))
\#define riPS1(i) (*(u64*)(&PowerPC::ppcState.ps[i][1]))

Casting between object representations like this is undefined behavior.
Given this is used heavily with the interpreter (that is, the most
accurate, but slowest CPU backend), we don't exactly want to allow
undefined behavior to creep into it.

Instead, this adds a helper struct for operating with the paired singles,
and replaces the four macros with a single macro for accessing the
paired-singles/floating-point registers.

This way, it's left up to the caller to explicitly decide how it wants to interpret
the data (and makes it more obvious where different interpretations of
the same data are occurring at, as there'll be a call to one of the
[x]AsDouble() functions).
2018-12-25 10:35:09 -05:00
..
HLE_Misc.cpp PowerPC: Remove separate macros for paired singles 2018-12-25 10:35:09 -05:00
HLE_Misc.h HLE: Remove an unused function 2018-02-04 14:41:55 +01:00
HLE_OS.cpp PowerPC: Move MMU-specifics from PowerPC.h to MMU.h 2018-05-17 19:18:55 -04:00
HLE_OS.h HLE: Log (v)fprintf messages 2017-06-03 21:05:14 +01:00
HLE_VarArgs.cpp PowerPC: Remove separate macros for paired singles 2018-12-25 10:35:09 -05:00
HLE_VarArgs.h PowerPC: Move MMU-specifics from PowerPC.h to MMU.h 2018-05-17 19:18:55 -04:00
HLE.cpp Assert: Uppercase assertion macros 2018-03-14 22:03:12 -04:00
HLE.h CachedInterpreter: Factor function hooking code out of Jit() 2018-05-16 18:55:49 -04:00