mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge 190291ec6c
into 80ea68b13c
This commit is contained in:
commit
ec7e8865d5
@ -17,6 +17,9 @@ struct PowerPCState;
|
|||||||
|
|
||||||
class CachedInterpreterEmitter
|
class CachedInterpreterEmitter
|
||||||
{
|
{
|
||||||
|
// Note: Turning the constexpr `CallbackCast` functions consteval causes error C7595 "call
|
||||||
|
// to immediate function is not a constant expression" on MSVC... and only for some people.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// The return value of most callbacks is the distance in memory to the next callback.
|
// The return value of most callbacks is the distance in memory to the next callback.
|
||||||
// If a callback returns 0, the block will be exited. The return value is signed to
|
// If a callback returns 0, the block will be exited. The return value is signed to
|
||||||
@ -26,7 +29,7 @@ protected:
|
|||||||
using AnyCallback = s32 (*)(PowerPC::PowerPCState& ppc_state, const void* operands);
|
using AnyCallback = s32 (*)(PowerPC::PowerPCState& ppc_state, const void* operands);
|
||||||
|
|
||||||
template <class Operands>
|
template <class Operands>
|
||||||
static consteval Callback<Operands> CallbackCast(Callback<Operands> callback)
|
static constexpr Callback<Operands> CallbackCast(Callback<Operands> callback)
|
||||||
{
|
{
|
||||||
return callback;
|
return callback;
|
||||||
}
|
}
|
||||||
@ -35,7 +38,7 @@ protected:
|
|||||||
{
|
{
|
||||||
return reinterpret_cast<AnyCallback>(callback);
|
return reinterpret_cast<AnyCallback>(callback);
|
||||||
}
|
}
|
||||||
static consteval AnyCallback AnyCallbackCast(AnyCallback callback) { return callback; }
|
static constexpr AnyCallback AnyCallbackCast(AnyCallback callback) { return callback; }
|
||||||
|
|
||||||
// Disassemble callbacks will always return the distance to the next callback.
|
// Disassemble callbacks will always return the distance to the next callback.
|
||||||
template <class Operands>
|
template <class Operands>
|
||||||
@ -47,7 +50,7 @@ protected:
|
|||||||
{
|
{
|
||||||
return reinterpret_cast<AnyDisassemble>(disassemble);
|
return reinterpret_cast<AnyDisassemble>(disassemble);
|
||||||
}
|
}
|
||||||
static consteval AnyDisassemble AnyDisassembleCast(AnyDisassemble disassemble)
|
static constexpr AnyDisassemble AnyDisassembleCast(AnyDisassemble disassemble)
|
||||||
{
|
{
|
||||||
return disassemble;
|
return disassemble;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user