mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #4264 from lioncash/type
SystemRegisters: Get rid of pointer casting
This commit is contained in:
@ -3,6 +3,9 @@
|
|||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "Core/PowerPC/Interpreter/Interpreter.h"
|
#include "Core/PowerPC/Interpreter/Interpreter.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "Common/Assert.h"
|
#include "Common/Assert.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FPURoundMode.h"
|
#include "Common/FPURoundMode.h"
|
||||||
@ -216,9 +219,12 @@ void Interpreter::mfspr(UGeckoInstruction _inst)
|
|||||||
|
|
||||||
case SPR_TL:
|
case SPR_TL:
|
||||||
case SPR_TU:
|
case SPR_TU:
|
||||||
*((u64*)&TL) =
|
{
|
||||||
SystemTimers::GetFakeTimeBase(); // works since we are little endian and TL comes first :)
|
// works since we are little endian and TL comes first :)
|
||||||
break;
|
const u64 time_base = SystemTimers::GetFakeTimeBase();
|
||||||
|
std::memcpy(&TL, &time_base, sizeof(u64));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SPR_WPAR:
|
case SPR_WPAR:
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user