diff --git a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp index a8733b91b60..e8cde761d8a 100644 --- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp +++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp @@ -68,12 +68,12 @@ void CachedInterpreter::ExecuteOneBlock() const auto callback = *reinterpret_cast(normal_entry); const u8* payload = normal_entry + sizeof(callback); // Direct dispatch to the most commonly used callbacks for better performance - if (callback == reinterpret_cast(CallbackCast(Interpret))) [[likely]] + if (callback == AnyCallbackCast(Interpret)) [[likely]] { Interpret(ppc_state, *reinterpret_cast(payload)); normal_entry = payload + sizeof(InterpretOperands); } - else if (callback == reinterpret_cast(CallbackCast(Interpret))) + else if (callback == AnyCallbackCast(Interpret)) { Interpret(ppc_state, *reinterpret_cast(payload)); normal_entry = payload + sizeof(InterpretOperands); diff --git a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreterEmitter.h b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreterEmitter.h index 7b1554ffc10..9a07cc61d59 100644 --- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreterEmitter.h +++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreterEmitter.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include #include @@ -33,7 +34,7 @@ protected: template static AnyCallback AnyCallbackCast(Callback callback) { - return reinterpret_cast(callback); + return std::bit_cast(callback); } static consteval AnyCallback AnyCallbackCast(AnyCallback callback) { return callback; } @@ -45,7 +46,7 @@ protected: template static AnyDisassemble AnyDisassembleCast(Disassemble disassemble) { - return reinterpret_cast(disassemble); + return std::bit_cast(disassemble); } static consteval AnyDisassemble AnyDisassembleCast(AnyDisassemble disassemble) {