From f3d353a85d53f9e3f606634c94fc45085fd3db3d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 26 Dec 2016 19:19:36 -0500 Subject: [PATCH] DSPEmitter: Move typedefs into DSPEmitter Keeps them associated with the emitter itself, rather than just letting them sit in global scope. --- Source/Core/Core/DSP/DSPCore.cpp | 4 ++-- Source/Core/Core/DSP/Jit/DSPEmitter.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp index d6d0e0fe6b..f3ff8d6642 100644 --- a/Source/Core/Core/DSP/DSPCore.cpp +++ b/Source/Core/Core/DSP/DSPCore.cpp @@ -251,8 +251,8 @@ int DSPCore_RunCycles(int cycles) } g_cycles_left = cycles; - DSPCompiledCode pExecAddr = (DSPCompiledCode)g_dsp_jit->enterDispatcher; - pExecAddr(); + auto exec_addr = (DSPEmitter::DSPCompiledCode)g_dsp_jit->enterDispatcher; + exec_addr(); if (g_dsp.reset_dspjit_codespace) g_dsp_jit->ClearIRAMandDSPJITCodespaceReset(); diff --git a/Source/Core/Core/DSP/Jit/DSPEmitter.h b/Source/Core/Core/DSP/Jit/DSPEmitter.h index 9ddcfa3980..0c4bea5422 100644 --- a/Source/Core/Core/DSP/Jit/DSPEmitter.h +++ b/Source/Core/Core/DSP/Jit/DSPEmitter.h @@ -15,12 +15,12 @@ #include "Core/DSP/DSPCommon.h" #include "Core/DSP/Jit/DSPJitRegCache.h" -typedef u32 (*DSPCompiledCode)(); -typedef const u8* Block; - class DSPEmitter : public Gen::X64CodeBlock { public: + using DSPCompiledCode = u32 (*)(); + using Block = const u8*; + static constexpr size_t MAX_BLOCKS = 0x10000; DSPEmitter();