From 75f5fcdfee4cd643aa347ea69db05c595ed39caf Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 16 Mar 2018 12:57:36 -0400 Subject: Assert: Remove unused parameter from DEBUG_ASSERT This brings the macro in line with the regular ASSERT macro, which only has one macro parameter. --- Source/Core/Common/Arm64Emitter.cpp | 3 +-- Source/Core/Common/Assert.h | 2 +- Source/Core/Common/x64Emitter.cpp | 8 ++++---- Source/Core/Common/x64Emitter.h | 24 ++++++++++++------------ 4 files changed, 18 insertions(+), 19 deletions(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index db48d5c16f..a4dbf75242 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -210,8 +210,7 @@ bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned int multiplier_idx = CountLeadingZeros(d, kXRegSizeInBits) - 57; // Ensure that the index to the multipliers array is within bounds. - DEBUG_ASSERT(DYNA_REC, - (multiplier_idx >= 0) && (static_cast(multiplier_idx) < multipliers.size())); + DEBUG_ASSERT((multiplier_idx >= 0) && (static_cast(multiplier_idx) < multipliers.size())); uint64_t multiplier = multipliers[multiplier_idx]; uint64_t candidate = (b - a) * multiplier; diff --git a/Source/Core/Common/Assert.h b/Source/Core/Common/Assert.h index d1215a51f7..5be700f338 100644 --- a/Source/Core/Common/Assert.h +++ b/Source/Core/Common/Assert.h @@ -61,7 +61,7 @@ __LINE__, __FILE__); \ } while (0) -#define DEBUG_ASSERT(_t_, _a_) \ +#define DEBUG_ASSERT(_a_) \ do \ { \ if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG) \ diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp index 2654ca0cdc..0b2ca9c4a6 100644 --- a/Source/Core/Common/x64Emitter.cpp +++ b/Source/Core/Common/x64Emitter.cpp @@ -187,8 +187,8 @@ void OpArg::WriteREX(XEmitter* emit, int opBits, int bits, int customOp) const { emit->Write8(op); // Check the operation doesn't access AH, BH, CH, or DH. - DEBUG_ASSERT(DYNA_REC, (offsetOrBaseReg & 0x100) == 0); - DEBUG_ASSERT(DYNA_REC, (customOp & 0x100) == 0); + DEBUG_ASSERT((offsetOrBaseReg & 0x100) == 0); + DEBUG_ASSERT((customOp & 0x100) == 0); } } @@ -553,7 +553,7 @@ void XEmitter::RET_FAST() // The first sign of decadence: optimized NOPs. void XEmitter::NOP(size_t size) { - DEBUG_ASSERT(DYNA_REC, (int)size > 0); + DEBUG_ASSERT((int)size > 0); while (true) { switch (size) @@ -1587,7 +1587,7 @@ void XEmitter::CMP_or_TEST(int bits, const OpArg& a1, const OpArg& a2) void XEmitter::MOV_sum(int bits, X64Reg dest, const OpArg& a1, const OpArg& a2) { // This stomps on flags, so ensure they aren't locked - DEBUG_ASSERT(DYNA_REC, !flags_locked); + DEBUG_ASSERT(!flags_locked); // Zero shortcuts (note that this can generate no code in the case where a1 == dest && a2 == zero // or a2 == dest && a1 == zero) diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index bfaac81e17..e7c1408a1b 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -156,64 +156,64 @@ struct OpArg u64 Imm64() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM64); + DEBUG_ASSERT(scale == SCALE_IMM64); return (u64)offset; } u32 Imm32() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM32); + DEBUG_ASSERT(scale == SCALE_IMM32); return (u32)offset; } u16 Imm16() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM16); + DEBUG_ASSERT(scale == SCALE_IMM16); return (u16)offset; } u8 Imm8() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM8); + DEBUG_ASSERT(scale == SCALE_IMM8); return (u8)offset; } s64 SImm64() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM64); + DEBUG_ASSERT(scale == SCALE_IMM64); return (s64)offset; } s32 SImm32() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM32); + DEBUG_ASSERT(scale == SCALE_IMM32); return (s32)offset; } s16 SImm16() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM16); + DEBUG_ASSERT(scale == SCALE_IMM16); return (s16)offset; } s8 SImm8() const { - DEBUG_ASSERT(DYNA_REC, scale == SCALE_IMM8); + DEBUG_ASSERT(scale == SCALE_IMM8); return (s8)offset; } OpArg AsImm64() const { - DEBUG_ASSERT(DYNA_REC, IsImm()); + DEBUG_ASSERT(IsImm()); return OpArg((u64)offset, SCALE_IMM64); } OpArg AsImm32() const { - DEBUG_ASSERT(DYNA_REC, IsImm()); + DEBUG_ASSERT(IsImm()); return OpArg((u32)offset, SCALE_IMM32); } OpArg AsImm16() const { - DEBUG_ASSERT(DYNA_REC, IsImm()); + DEBUG_ASSERT(IsImm()); return OpArg((u16)offset, SCALE_IMM16); } OpArg AsImm8() const { - DEBUG_ASSERT(DYNA_REC, IsImm()); + DEBUG_ASSERT(IsImm()); return OpArg((u8)offset, SCALE_IMM8); } -- cgit v1.2.3