Assert: Remove unused parameter from DEBUG_ASSERT

This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
This commit is contained in:
Lioncash 2018-03-16 12:57:36 -04:00
commit 75f5fcdfee
28 changed files with 86 additions and 91 deletions

View file

@ -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<size_t>(multiplier_idx) < multipliers.size()));
DEBUG_ASSERT((multiplier_idx >= 0) && (static_cast<size_t>(multiplier_idx) < multipliers.size()));
uint64_t multiplier = multipliers[multiplier_idx];
uint64_t candidate = (b - a) * multiplier;

View file

@ -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) \

View file

@ -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)

View file

@ -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);
}