diff --git a/include/PICA/dynapica/shader_rec_emitter_x64.hpp b/include/PICA/dynapica/shader_rec_emitter_x64.hpp index a43bd2dc..85c85bf8 100644 --- a/include/PICA/dynapica/shader_rec_emitter_x64.hpp +++ b/include/PICA/dynapica/shader_rec_emitter_x64.hpp @@ -29,11 +29,11 @@ class ShaderEmitter : public Xbyak::CodeGenerator { std::vector returnPCs; // Vector value of (-0.0, -0.0, -0.0, -0.0) for negating vectors via pxor - Label negateVector; + Xbyak::Label negateVector; // Vector value of (1.0, 1.0, 1.0, 1.0) for SLT(i)/SGE(i) - Label onesVector; + Xbyak::Label onesVector; // Vector value of (0xFF, 0xFF, 0xFF, 0) for setting the w component to 0 in DP3 - Label dp3Vector; + Xbyak::Label dp3Vector; u32 recompilerPC = 0; // PC the recompiler is currently recompiling @ u32 loopLevel = 0; // The current loop nesting level (0 = not in a loop) @@ -47,7 +47,7 @@ class ShaderEmitter : public Xbyak::CodeGenerator { bool codeHasExp2 = false; // Whether to compile this shader using accurate, safe, non-IEEE multiplication (slow) or faster but less accurate mul bool useSafeMUL = false; - + Xbyak::Label log2Func, exp2Func; Xbyak::Label emitLog2Func(); Xbyak::Label emitExp2Func(); @@ -72,8 +72,8 @@ class ShaderEmitter : public Xbyak::CodeGenerator { // Load register with number "srcReg" indexed by index "idx" into the xmm register "reg" template - void loadRegister(Xmm dest, const PICAShader& shader, u32 src, u32 idx, u32 operandDescriptor); - void storeRegister(Xmm source, const PICAShader& shader, u32 dest, u32 operandDescriptor); + void loadRegister(Xbyak::Xmm dest, const PICAShader& shader, u32 src, u32 idx, u32 operandDescriptor); + void storeRegister(Xbyak::Xmm source, const PICAShader& shader, u32 dest, u32 operandDescriptor); const vec4f& getSourceRef(const PICAShader& shader, u32 src); const vec4f& getDestRef(const PICAShader& shader, u32 dest); diff --git a/include/PICA/dynapica/x64_regs.hpp b/include/PICA/dynapica/x64_regs.hpp index 16bc7ca3..e4450870 100644 --- a/include/PICA/dynapica/x64_regs.hpp +++ b/include/PICA/dynapica/x64_regs.hpp @@ -2,39 +2,37 @@ #ifdef PANDA3DS_X64_HOST #include "xbyak/xbyak.h" -using namespace Xbyak; -using namespace Xbyak::util; #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) #define PANDA3DS_MS_ABI -constexpr Reg32 arg1 = ecx; // register where first arg is stored -constexpr Reg32 arg2 = edx; // register where second arg is stored -constexpr Reg32 arg3 = r8d; // register where third arg is stored -constexpr Reg32 arg4 = r9d; // register where fourth arg is stored +constexpr Xbyak::Reg32 arg1 = Xbyak::util::ecx; // register where first arg is stored +constexpr Xbyak::Reg32 arg2 = Xbyak::util::edx; // register where second arg is stored +constexpr Xbyak::Reg32 arg3 = Xbyak::util::r8d; // register where third arg is stored +constexpr Xbyak::Reg32 arg4 = Xbyak::util::r9d; // register where fourth arg is stored // Similar for floating point and vector arguemnts. -constexpr Xmm arg1f = xmm0; -constexpr Xmm arg2f = xmm1; -constexpr Xmm arg3f = xmm2; -constexpr Xmm arg4f = xmm3; +constexpr Xbyak::Xmm arg1f = Xbyak::util::xmm0; +constexpr Xbyak::Xmm arg2f = Xbyak::util::xmm1; +constexpr Xbyak::Xmm arg3f = Xbyak::util::xmm2; +constexpr Xbyak::Xmm arg4f = Xbyak::util::xmm3; constexpr bool isWindows() { return true; } #else // System V calling convention #define PANDA3DS_SYSV_ABI -constexpr Reg32 arg1 = edi; -constexpr Reg32 arg2 = esi; -constexpr Reg32 arg3 = edx; -constexpr Reg32 arg4 = ecx; +constexpr Xbyak::Reg32 arg1 = Xbyak::util::edi; +constexpr Xbyak::Reg32 arg2 = Xbyak::util::esi; +constexpr Xbyak::Reg32 arg3 = Xbyak::util::edx; +constexpr Xbyak::Reg32 arg4 = Xbyak::util::ecx; -constexpr Xmm arg1f = xmm0; -constexpr Xmm arg2f = xmm1; -constexpr Xmm arg3f = xmm2; -constexpr Xmm arg4f = xmm3; -constexpr Xmm arg5f = xmm4; -constexpr Xmm arg6f = xmm5; -constexpr Xmm arg7f = xmm6; -constexpr Xmm arg8f = xmm7; +constexpr Xbyak::Xmm arg1f = Xbyak::util::xmm0; +constexpr Xbyak::Xmm arg2f = Xbyak::util::xmm1; +constexpr Xbyak::Xmm arg3f = Xbyak::util::xmm2; +constexpr Xbyak::Xmm arg4f = Xbyak::util::xmm3; +constexpr Xbyak::Xmm arg5f = Xbyak::util::xmm4; +constexpr Xbyak::Xmm arg6f = Xbyak::util::xmm5; +constexpr Xbyak::Xmm arg7f = Xbyak::util::xmm6; +constexpr Xbyak::Xmm arg8f = Xbyak::util::xmm7; constexpr bool isWindows() { return false; } #endif diff --git a/include/audio/dsp_core.hpp b/include/audio/dsp_core.hpp index b15a64da..c2016569 100644 --- a/include/audio/dsp_core.hpp +++ b/include/audio/dsp_core.hpp @@ -1,8 +1,5 @@ #pragma once -#include -#include #include -#include #include #include