From eb057d49a089cd1091e695f6e6baaf272a7b1476 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 31 May 2015 08:32:31 +0200 Subject: [PATCH] x64Emitter: drop duplicate enum & unused wrappers Keep the more explicit version of the two SSECompare enums. And the unused CMP* wrappers wouldn't exactly make the code more readable anyway. --- Source/Core/Common/x64Emitter.h | 22 +------------------ .../Core/PowerPC/Jit64/Jit_FloatingPoint.cpp | 4 ++-- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index 8823a23f9b..dec41f6927 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -102,7 +102,7 @@ enum NormalOp { nrmXCHG, }; -enum { +enum SSECompare { CMP_EQ = 0, CMP_LT = 1, CMP_LE = 2, @@ -279,18 +279,6 @@ struct FixupBranch int type; //0 = 8bit 1 = 32bit }; -enum SSECompare -{ - EQ = 0, - LT, - LE, - UNORD, - NEQ, - NLT, - NLE, - ORD, -}; - typedef const u8* JumpTarget; class XEmitter @@ -567,14 +555,6 @@ public: void CMPSS(X64Reg regOp, const OpArg& arg, u8 compare); void CMPSD(X64Reg regOp, const OpArg& arg, u8 compare); - inline void CMPEQSS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_EQ); } - inline void CMPLTSS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_LT); } - inline void CMPLESS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_LE); } - inline void CMPUNORDSS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_UNORD); } - inline void CMPNEQSS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_NEQ); } - inline void CMPNLTSS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_NLT); } - inline void CMPORDSS(X64Reg regOp, const OpArg& arg) { CMPSS(regOp, arg, CMP_ORD); } - // SSE/SSE2: Floating point packed arithmetic (x4 for float, x2 for double) void ADDPS(X64Reg regOp, const OpArg& arg); void ADDPD(X64Reg regOp, const OpArg& arg); diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp index 5b1756cf4f..1376ce68ba 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -282,9 +282,9 @@ void Jit64::fselx(UGeckoInstruction inst) // negative/positive zero and NaN properly. // (a >= -0.0 ? c : b) transforms into (0 > a ? b : c), hence the NLE. if (packed) - CMPPD(XMM0, fpr.R(a), NLE); + CMPPD(XMM0, fpr.R(a), CMP_NLE); else - CMPSD(XMM0, fpr.R(a), NLE); + CMPSD(XMM0, fpr.R(a), CMP_NLE); if (cpu_info.bSSE4_1) {