From 690ed8580c959716c02aeb476d09c0fd5720f712 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 21 Aug 2014 20:11:52 -0400 Subject: [PATCH 1/2] Common: Kill off duplicate log warning definitions Also embed the log checks rather than using macros --- .../Core/Common/Logging/ConsoleListener.cpp | 16 ++--- Source/Core/Common/Logging/Log.h | 61 ++++++++++--------- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h | 5 +- .../Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp | 11 ++-- Source/Core/DiscIO/WiiWad.cpp | 7 +-- Source/Core/DolphinWX/LogWindow.cpp | 10 +-- 6 files changed, 53 insertions(+), 57 deletions(-) diff --git a/Source/Core/Common/Logging/ConsoleListener.cpp b/Source/Core/Common/Logging/ConsoleListener.cpp index 0b3a212126..bdf87bc722 100644 --- a/Source/Core/Common/Logging/ConsoleListener.cpp +++ b/Source/Core/Common/Logging/ConsoleListener.cpp @@ -257,19 +257,19 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS Level, const char *Text) switch (Level) { - case NOTICE_LEVEL: // light green + case LogTypes::LOG_LEVELS::LNOTICE: // light green Color = FOREGROUND_GREEN | FOREGROUND_INTENSITY; break; - case ERROR_LEVEL: // light red + case LogTypes::LOG_LEVELS::LERROR: // light red Color = FOREGROUND_RED | FOREGROUND_INTENSITY; break; - case WARNING_LEVEL: // light yellow + case LogTypes::LOG_LEVELS::LWARNING: // light yellow Color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY; break; - case INFO_LEVEL: // cyan + case LogTypes::LOG_LEVELS::LINFO: // cyan Color = FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY; break; - case DEBUG_LEVEL: // gray + case LogTypes::LOG_LEVELS::LDEBUG: // gray Color = FOREGROUND_INTENSITY; break; default: // off-white @@ -294,13 +294,13 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS Level, const char *Text) strcpy(ResetAttr, "\033[0m"); switch (Level) { - case NOTICE_LEVEL: // light green + case LogTypes::LOG_LEVELS::LNOTICE: // light green strcpy(ColorAttr, "\033[92m"); break; - case ERROR_LEVEL: // light red + case LogTypes::LOG_LEVELS::LERROR: // light red strcpy(ColorAttr, "\033[91m"); break; - case WARNING_LEVEL: // light yellow + case LogTypes::LOG_LEVELS::LWARNING: // light yellow strcpy(ColorAttr, "\033[93m"); break; default: diff --git a/Source/Core/Common/Logging/Log.h b/Source/Core/Common/Logging/Log.h index c7675a9a07..eeba27d9d0 100644 --- a/Source/Core/Common/Logging/Log.h +++ b/Source/Core/Common/Logging/Log.h @@ -4,12 +4,6 @@ #pragma once -#define NOTICE_LEVEL 1 // VERY important information that is NOT errors. Like startup and OSReports. -#define ERROR_LEVEL 2 // Critical errors -#define WARNING_LEVEL 3 // Something is suspicious. -#define INFO_LEVEL 4 // General information. -#define DEBUG_LEVEL 5 // Detailed debugging - might make things slow. - namespace LogTypes { @@ -65,14 +59,13 @@ enum LOG_TYPE NUMBER_OF_LOGS // Must be last }; -// FIXME: should this be removed? enum LOG_LEVELS { - LNOTICE = NOTICE_LEVEL, - LERROR = ERROR_LEVEL, - LWARNING = WARNING_LEVEL, - LINFO = INFO_LEVEL, - LDEBUG = DEBUG_LEVEL, + LNOTICE = 1, // VERY important information that is NOT errors. Like startup and OSReports. + LERROR = 2, // Critical errors + LWARNING = 3, // Something is suspicious. + LINFO = 4, // General information. + LDEBUG = 5, // Detailed debugging - might make things slow. }; static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID"; @@ -87,10 +80,10 @@ void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, ; #if defined LOGGING || defined _DEBUG || defined DEBUGFAST -#define MAX_LOGLEVEL DEBUG_LEVEL +#define MAX_LOGLEVEL LogTypes::LOG_LEVELS::LDEBUG #else #ifndef MAX_LOGLEVEL -#define MAX_LOGLEVEL WARNING_LEVEL +#define MAX_LOGLEVEL LogTypes::LOG_LEVELS::LWARNING #endif // loglevel #endif // logging @@ -110,24 +103,30 @@ void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, #define INFO_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LINFO, __VA_ARGS__) } while (0) #define DEBUG_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, __VA_ARGS__) } while (0) -#if MAX_LOGLEVEL >= DEBUG_LEVEL #define _dbg_assert_(_t_, _a_) \ - if (!(_a_)) {\ + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) {\ ERROR_LOG(_t_, "Error...\n\n Line: %d\n File: %s\n Time: %s\n\nIgnore and continue?", \ - __LINE__, __FILE__, __TIME__); \ - if (!PanicYesNo("*** Assertion (see log)***\n")) {Crash();} \ + __LINE__, __FILE__, __TIME__); \ + if (!PanicYesNo("*** Assertion (see log)***\n")) \ + Crash(); \ } -#define _dbg_assert_msg_(_t_, _a_, ...)\ - if (!(_a_)) {\ - ERROR_LOG(_t_, __VA_ARGS__); \ - if (!PanicYesNo(__VA_ARGS__)) {Crash();} \ + +#ifdef _WIN32 +#define _dbg_assert_msg_(_t_, _a_, _msg_, ...)\ + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) {\ + ERROR_LOG(_t_, _msg_, __VA_ARGS__); \ + if (!PanicYesNo(_msg_, __VA_ARGS__)) \ + Crash(); \ } -#else // not debug -#ifndef _dbg_assert_ -#define _dbg_assert_(_t_, _a_) {} -#define _dbg_assert_msg_(_t_, _a_, _desc_, ...) {} -#endif // dbg_assert -#endif // MAX_LOGLEVEL DEBUG +#else +#define _dbg_assert_msg_(_t_, _a_, _msg_, ...)\ + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG && !(_a_)) {\ + ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \ + if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \ + Crash(); \ + } +#endif + #define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_) @@ -135,12 +134,14 @@ void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, #ifdef _WIN32 #define _assert_msg_(_t_, _a_, _fmt_, ...) \ if (!(_a_)) {\ - if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \ + if (!PanicYesNo(_fmt_, __VA_ARGS__)) \ + Crash(); \ } #else // not win32 #define _assert_msg_(_t_, _a_, _fmt_, ...) \ if (!(_a_)) {\ - if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) {Crash();} \ + if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) \ + Crash(); \ } #endif // WIN32 #else // GEKKO diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h index 26f8224375..86b268853d 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h @@ -209,9 +209,8 @@ protected: GENERIC_LOG(LogType, LogTypes::LINFO, " OutBuffer: 0x%08x (0x%x):", OutBuffer, OutBufferSize); - #if defined(MAX_LOGLEVEL) && MAX_LOGLEVEL >= INFO_LEVEL - DumpCommands(OutBuffer, OutBufferSize, LogType, Verbosity); - #endif + if (Verbosity >= LogTypes::LOG_LEVELS::LINFO) + DumpCommands(OutBuffer, OutBufferSize, LogType, Verbosity); } } }; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp index 52edbec328..c1e95c6a6a 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp @@ -710,12 +710,11 @@ static int ParseAttribList(u8* pAttribIDList, u16& _startID, u16& _endID) u8 seqSize = attribList.Read8(attribOffset); attribOffset++; u8 typeID = attribList.Read8(attribOffset); attribOffset++; -#if MAX_LOGLEVEL >= DEBUG_LEVEL - _dbg_assert_(WII_IPC_WIIMOTE, sequence == SDP_SEQ8); - (void)seqSize; -#else - (void)sequence, (void)seqSize; -#endif + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG) + { + _dbg_assert_(WII_IPC_WIIMOTE, sequence == SDP_SEQ8); + (void)seqSize; + } if (typeID == SDP_UINT32) { diff --git a/Source/Core/DiscIO/WiiWad.cpp b/Source/Core/DiscIO/WiiWad.cpp index 341cadfcca..2b8703b5bd 100644 --- a/Source/Core/DiscIO/WiiWad.cpp +++ b/Source/Core/DiscIO/WiiWad.cpp @@ -102,11 +102,8 @@ bool WiiWAD::ParseWAD(DiscIO::IBlobReader& _rReader) m_DataAppSize = ReaderBig.Read32(0x18); m_FooterSize = ReaderBig.Read32(0x1C); -#if MAX_LOGLEVEL >= DEBUG_LEVEL - _dbg_assert_msg_(BOOT, Reserved==0x00, "WiiWAD: Reserved must be 0x00"); -#else - (void)Reserved; -#endif + if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG) + _dbg_assert_msg_(BOOT, Reserved==0x00, "WiiWAD: Reserved must be 0x00"); u32 Offset = 0x40; m_pCertificateChain = CreateWADEntry(_rReader, m_CertificateChainSize, Offset); Offset += ROUND_UP(m_CertificateChainSize, 0x40); diff --git a/Source/Core/DolphinWX/LogWindow.cpp b/Source/Core/DolphinWX/LogWindow.cpp index a28d455b1e..24a0aef2a9 100644 --- a/Source/Core/DolphinWX/LogWindow.cpp +++ b/Source/Core/DolphinWX/LogWindow.cpp @@ -314,23 +314,23 @@ void CLogWindow::UpdateLog() { switch (msgQueue.front().first) { - case ERROR_LEVEL: + case LogTypes::LOG_LEVELS::LERROR: m_Log->SetDefaultStyle(wxTextAttr(*wxRED)); break; - case WARNING_LEVEL: + case LogTypes::LOG_LEVELS::LWARNING: m_Log->SetDefaultStyle(wxTextAttr(*wxYELLOW)); break; - case NOTICE_LEVEL: + case LogTypes::LOG_LEVELS::LNOTICE: m_Log->SetDefaultStyle(wxTextAttr(*wxGREEN)); break; - case INFO_LEVEL: + case LogTypes::LOG_LEVELS::LINFO: m_Log->SetDefaultStyle(wxTextAttr(*wxCYAN)); break; - case DEBUG_LEVEL: + case LogTypes::LOG_LEVELS::LDEBUG: m_Log->SetDefaultStyle(wxTextAttr(*wxLIGHT_GREY)); break; From 01b90c1007aa14daf6d1d500a9e733ca76d05fa0 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 6 Sep 2014 03:33:21 -0500 Subject: [PATCH 2/2] Fix ArmEmitter's asserts from failing to compile. Changed them all from debug asserts to regular asserts, since they shouldn't only be run at debug time. --- Source/Core/Common/ArmEmitter.cpp | 473 +++++++++++++++--------------- 1 file changed, 238 insertions(+), 235 deletions(-) diff --git a/Source/Core/Common/ArmEmitter.cpp b/Source/Core/Common/ArmEmitter.cpp index c5b2224d3a..424661be3b 100644 --- a/Source/Core/Common/ArmEmitter.cpp +++ b/Source/Core/Common/ArmEmitter.cpp @@ -74,7 +74,7 @@ Operand2 AssumeMakeOperand2(u32 imm) { Operand2 op2; bool result = TryMakeOperand2(imm, op2); (void) result; - _dbg_assert_msg_(DYNA_REC, result, "Could not make assumed Operand2."); + _assert_msg_(DYNA_REC, result, "Could not make assumed Operand2."); return op2; } @@ -380,7 +380,7 @@ FixupBranch ARMXEmitter::B_CC(CCFlags Cond) void ARMXEmitter::B_CC(CCFlags Cond, const void *fnptr) { s32 distance = (s32)fnptr - (s32(code) + 8); - _dbg_assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, + _assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, "B_CC out of range (%p calls %p)", code, fnptr); Write32((Cond << 28) | 0x0A000000 | ((distance >> 2) & 0x00FFFFFF)); @@ -398,7 +398,7 @@ FixupBranch ARMXEmitter::BL_CC(CCFlags Cond) void ARMXEmitter::SetJumpTarget(FixupBranch const &branch) { s32 distance = (s32(code) - 8) - (s32)branch.ptr; - _dbg_assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, + _assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, "SetJumpTarget out of range (%p calls %p)", code, branch.ptr); u32 instr = (u32)(branch.condition | ((distance >> 2) & 0x00FFFFFF)); instr |= (0 == branch.type) ? /* B */ 0x0A000000 : /* BL */ 0x0B000000; @@ -407,7 +407,7 @@ void ARMXEmitter::SetJumpTarget(FixupBranch const &branch) void ARMXEmitter::B(const void *fnptr) { s32 distance = (s32)fnptr - (s32(code) + 8); - _dbg_assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, + _assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, "B out of range (%p calls %p)", code, fnptr); Write32(condition | 0x0A000000 | ((distance >> 2) & 0x00FFFFFF)); @@ -429,7 +429,7 @@ bool ARMXEmitter::BLInRange(const void *fnptr) { void ARMXEmitter::BL(const void *fnptr) { s32 distance = (s32)fnptr - (s32(code) + 8); - _dbg_assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, + _assert_msg_(DYNA_REC, distance > -0x2000000 && distance <= 0x2000000, "BL out of range (%p calls %p)", code, fnptr); Write32(condition | 0x0B000000 | ((distance >> 2) & 0x00FFFFFF)); } @@ -565,7 +565,7 @@ void ARMXEmitter::WriteInstruction (u32 Op, ARMReg Rd, ARMReg Rn, Operand2 Rm, b } } if (op == -1) - _dbg_assert_msg_(DYNA_REC, false, "%s not yet support %d", InstNames[Op], Rm.GetType()); + _assert_msg_(DYNA_REC, false, "%s not yet support %d", InstNames[Op], Rm.GetType()); Write32(condition | (op << 21) | (SetFlags ? (1 << 20) : 0) | Rn << 16 | Rd << 12 | Data); } @@ -694,7 +694,7 @@ void ARMXEmitter::LDREX(ARMReg dest, ARMReg base) } void ARMXEmitter::STREX(ARMReg result, ARMReg base, ARMReg op) { - _dbg_assert_msg_(DYNA_REC, (result != base && result != op), "STREX dest can't be other two registers"); + _assert_msg_(DYNA_REC, (result != base && result != op), "STREX dest can't be other two registers"); Write32(condition | (24 << 20) | (base << 16) | (result << 12) | (0xF9 << 4) | op); } void ARMXEmitter::DMB () @@ -747,7 +747,7 @@ void ARMXEmitter::WriteStoreOp(u32 Op, ARMReg Rt, ARMReg Rn, Operand2 Rm, bool R bool SignedLoad = false; if (op == -1) - _dbg_assert_msg_(DYNA_REC, false, "%s does not support %d", LoadStoreNames[Op], Rm.GetType()); + _assert_msg_(DYNA_REC, false, "%s does not support %d", LoadStoreNames[Op], Rm.GetType()); switch (Op) { @@ -959,7 +959,7 @@ void ARMXEmitter::WriteVFPDataOp(u32 Op, ARMReg Vd, ARMReg Vn, ARMReg Vm) VFPEnc enc = VFPOps[Op][quad_reg]; if (enc.opc1 == -1 && enc.opc2 == -1) - _dbg_assert_msg_(DYNA_REC, false, "%s does not support %s", VFPOpNames[Op], quad_reg ? "NEON" : "VFP"); + _assert_msg_(DYNA_REC, false, "%s does not support %s", VFPOpNames[Op], quad_reg ? "NEON" : "VFP"); u32 VdEnc = EncodeVd(Vd); u32 VnEnc = EncodeVn(Vn); u32 VmEnc = EncodeVm(Vm); @@ -974,7 +974,7 @@ void ARMXEmitter::WriteVFPDataOp6bit(u32 Op, ARMReg Vd, ARMReg Vn, ARMReg Vm, u3 VFPEnc enc = VFPOps[Op][quad_reg]; if (enc.opc1 == -1 && enc.opc2 == -1) - _dbg_assert_msg_(DYNA_REC, false, "%s does not support %s", VFPOpNames[Op], quad_reg ? "NEON" : "VFP"); + _assert_msg_(DYNA_REC, false, "%s does not support %s", VFPOpNames[Op], quad_reg ? "NEON" : "VFP"); u32 VdEnc = EncodeVd(Vd); u32 VnEnc = EncodeVn(Vn); u32 VmEnc = EncodeVm(Vm); @@ -1002,13 +1002,13 @@ void ARMXEmitter::VCMPE(ARMReg Vd){ WriteVFPDataOp6bit(13, Vd, D5, D0, 1); } void ARMXEmitter::VLDR(ARMReg Dest, ARMReg Base, s16 offset) { - _dbg_assert_msg_(DYNA_REC, Dest >= S0 && Dest <= D31, "Passed Invalid dest register to VLDR"); - _dbg_assert_msg_(DYNA_REC, Base <= R15, "Passed invalid Base register to VLDR"); + _assert_msg_(DYNA_REC, Dest >= S0 && Dest <= D31, "Passed Invalid dest register to VLDR"); + _assert_msg_(DYNA_REC, Base <= R15, "Passed invalid Base register to VLDR"); bool Add = offset >= 0 ? true : false; u32 imm = abs(offset); - _dbg_assert_msg_(DYNA_REC, (imm & 0xC03) == 0, "VLDR: Offset needs to be word aligned and small enough"); + _assert_msg_(DYNA_REC, (imm & 0xC03) == 0, "VLDR: Offset needs to be word aligned and small enough"); if (imm & 0xC03) ERROR_LOG(DYNA_REC, "VLDR: Bad offset %08x", imm); @@ -1030,13 +1030,13 @@ void ARMXEmitter::VLDR(ARMReg Dest, ARMReg Base, s16 offset) } void ARMXEmitter::VSTR(ARMReg Src, ARMReg Base, s16 offset) { - _dbg_assert_msg_(DYNA_REC, Src >= S0 && Src <= D31, "Passed invalid src register to VSTR"); - _dbg_assert_msg_(DYNA_REC, Base <= R15, "Passed invalid base register to VSTR"); + _assert_msg_(DYNA_REC, Src >= S0 && Src <= D31, "Passed invalid src register to VSTR"); + _assert_msg_(DYNA_REC, Base <= R15, "Passed invalid base register to VSTR"); bool Add = offset >= 0 ? true : false; u32 imm = abs(offset); - _dbg_assert_msg_(DYNA_REC, (imm & 0xC03) == 0, "VSTR: Offset needs to be word aligned and small enough"); + _assert_msg_(DYNA_REC, (imm & 0xC03) == 0, "VSTR: Offset needs to be word aligned and small enough"); if (imm & 0xC03) ERROR_LOG(DYNA_REC, "VSTR: Bad offset %08x", imm); @@ -1067,14 +1067,14 @@ void ARMXEmitter::VMSR(ARMReg Rt) { // VFP and ASIMD void ARMXEmitter::VMOV(ARMReg Dest, Operand2 op2) { - _dbg_assert_msg_(DYNA_REC, cpu_info.bVFPv3, "VMOV #imm requires VFPv3"); + _assert_msg_(DYNA_REC, cpu_info.bVFPv3, "VMOV #imm requires VFPv3"); bool double_reg = Dest >= D0; Write32(condition | (0xEB << 20) | EncodeVd(Dest) | (0x5 << 9) | (double_reg << 8) | op2.Imm8VFP()); } void ARMXEmitter::VMOV(ARMReg Dest, ARMReg Src, bool high) { - _dbg_assert_msg_(DYNA_REC, Src < S0, "This VMOV doesn't support SRC other than ARM Reg"); - _dbg_assert_msg_(DYNA_REC, Dest >= D0, "This VMOV doesn't support DEST other than VFP"); + _assert_msg_(DYNA_REC, Src < S0, "This VMOV doesn't support SRC other than ARM Reg"); + _assert_msg_(DYNA_REC, Dest >= D0, "This VMOV doesn't support DEST other than VFP"); Dest = SubBase(Dest); @@ -1132,7 +1132,7 @@ void ARMXEmitter::VMOV(ARMReg Dest, ARMReg Src) else { // Move Arm reg to Arm reg - _dbg_assert_msg_(DYNA_REC, false, "VMOV doesn't support moving ARM registers"); + _assert_msg_(DYNA_REC, false, "VMOV doesn't support moving ARM registers"); } } // Moving NEON registers @@ -1142,7 +1142,7 @@ void ARMXEmitter::VMOV(ARMReg Dest, ARMReg Src) bool Single = DestSize == 1; bool Quad = DestSize == 4; - _dbg_assert_msg_(DYNA_REC, SrcSize == DestSize, "VMOV doesn't support moving different register sizes"); + _assert_msg_(DYNA_REC, SrcSize == DestSize, "VMOV doesn't support moving different register sizes"); Dest = SubBase(Dest); Src = SubBase(Src); @@ -1157,7 +1157,7 @@ void ARMXEmitter::VMOV(ARMReg Dest, ARMReg Src) // Double and quad if (Quad) { - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Trying to use quad registers when you don't support ASIMD."); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Trying to use quad registers when you don't support ASIMD."); // Gets encoded as a Double register Write32((0xF2 << 24) | ((Dest & 0x10) << 18) | (2 << 20) | ((Src & 0xF) << 16) \ | ((Dest & 0xF) << 12) | (1 << 8) | ((Src & 0x10) << 3) | (1 << 6) \ @@ -1218,9 +1218,9 @@ void ARMXEmitter::VCVT(ARMReg Dest, ARMReg Source, int flags) void NEONXEmitter::VABA(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | EncodeVn(Vn) \ @@ -1229,11 +1229,11 @@ void NEONXEmitter::VABA(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VABAL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= D0 && Vn < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= D0 && Vn < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | (1 << 23) | EncodeVn(Vn) \ | (encodedSize(Size) << 20) | EncodeVd(Vd) | (0x50 << 4) | EncodeVm(Vm)); @@ -1241,8 +1241,8 @@ void NEONXEmitter::VABAL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VABD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; if (Size & F_32) @@ -1254,11 +1254,11 @@ void NEONXEmitter::VABD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VABDL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= D0 && Vn < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= D0 && Vn < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | (1 << 23) | EncodeVn(Vn) \ | (encodedSize(Size) << 20) | EncodeVd(Vd) | (0x70 << 4) | EncodeVm(Vm)); @@ -1266,8 +1266,8 @@ void NEONXEmitter::VABDL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VABS(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xB1 << 16) | (encodedSize(Size) << 18) | EncodeVd(Vd) \ @@ -1277,8 +1277,8 @@ void NEONXEmitter::VABS(u32 Size, ARMReg Vd, ARMReg Vm) void NEONXEmitter::VACGE(ARMReg Vd, ARMReg Vn, ARMReg Vm) { // Only Float - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | EncodeVn(Vn) | EncodeVd(Vd) \ @@ -1288,8 +1288,8 @@ void NEONXEmitter::VACGE(ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VACGT(ARMReg Vd, ARMReg Vn, ARMReg Vm) { // Only Float - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (1 << 21) | EncodeVn(Vn) | EncodeVd(Vd) \ @@ -1308,8 +1308,8 @@ void NEONXEmitter::VACLT(ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1322,11 +1322,11 @@ void NEONXEmitter::VADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VADDHN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) \ | EncodeVd(Vd) | (0x80 << 4) | EncodeVm(Vm)); @@ -1334,75 +1334,75 @@ void NEONXEmitter::VADDHN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) void NEONXEmitter::VADDL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= D0 && Vn < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= D0 && Vn < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) \ | EncodeVd(Vd) | EncodeVm(Vm)); } void NEONXEmitter::VADDW(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) \ | EncodeVd(Vd) | (1 << 8) | EncodeVm(Vm)); } void NEONXEmitter::VAND(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF2 << 24) | EncodeVn(Vn) | EncodeVd(Vd) | (0x11 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VBIC(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF2 << 24) | (1 << 20) | EncodeVn(Vn) | EncodeVd(Vd) | (0x11 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VBIF(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (3 << 20) | EncodeVn(Vn) | EncodeVd(Vd) | (0x11 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VBIT(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (2 << 20) | EncodeVn(Vn) | EncodeVd(Vd) | (0x11 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VBSL(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (1 << 20) | EncodeVn(Vn) | EncodeVd(Vd) | (0x11 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VCEQ(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; if (Size & F_32) @@ -1414,8 +1414,8 @@ void NEONXEmitter::VCEQ(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VCEQ(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1424,8 +1424,8 @@ void NEONXEmitter::VCEQ(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VCGE(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; if (Size & F_32) @@ -1436,8 +1436,8 @@ void NEONXEmitter::VCGE(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VCGE(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xB << 20) | (encodedSize(Size) << 18) | (1 << 16) \ @@ -1445,8 +1445,8 @@ void NEONXEmitter::VCGE(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VCGT(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; if (Size & F_32) @@ -1457,8 +1457,8 @@ void NEONXEmitter::VCGT(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VCGT(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xD << 20) | (encodedSize(Size) << 18) | (1 << 16) \ @@ -1470,8 +1470,8 @@ void NEONXEmitter::VCLE(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VCLE(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xD << 20) | (encodedSize(Size) << 18) | (1 << 16) \ @@ -1479,9 +1479,9 @@ void NEONXEmitter::VCLE(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VCLS(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xD << 20) | (encodedSize(Size) << 18) \ @@ -1493,8 +1493,8 @@ void NEONXEmitter::VCLT(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VCLT(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xD << 20) | (encodedSize(Size) << 18) | (1 << 16) \ @@ -1502,8 +1502,8 @@ void NEONXEmitter::VCLT(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VCLZ(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xD << 20) | (encodedSize(Size) << 18) \ @@ -1511,9 +1511,9 @@ void NEONXEmitter::VCLZ(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VCNT(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, Size & I_8, "Can only use I_8 with " __FUNCTION__); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, Size & I_8, "Can only use I_8 with %s", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | (0xD << 20) | (encodedSize(Size) << 18) \ @@ -1521,8 +1521,8 @@ void NEONXEmitter::VCNT(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VDUP(u32 Size, ARMReg Vd, ARMReg Vm, u8 index) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; u32 sizeEncoded = 0, indexEncoded = 0; @@ -1543,9 +1543,9 @@ void NEONXEmitter::VDUP(u32 Size, ARMReg Vd, ARMReg Vm, u8 index) } void NEONXEmitter::VDUP(u32 Size, ARMReg Vd, ARMReg Rt) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Rt < D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, Rt < D0, "Pass invalid register to %s", __FUNCTION__); bool register_quad = Vd >= Q0; Vd = SubBase(Vd); @@ -1562,16 +1562,18 @@ void NEONXEmitter::VDUP(u32 Size, ARMReg Vd, ARMReg Rt) } void NEONXEmitter::VEOR(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF3 << 24) | EncodeVn(Vn) | EncodeVd(Vd) | (0x11 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VEXT(ARMReg Vd, ARMReg Vn, ARMReg Vm, u8 index) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF2 << 24) | (0xB << 20) | EncodeVn(Vn) | EncodeVd(Vd) | (index & 0xF) \ @@ -1579,27 +1581,28 @@ void NEONXEmitter::VEXT(ARMReg Vd, ARMReg Vn, ARMReg Vm, u8 index) } void NEONXEmitter::VFMA(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, cpu_info.bVFPv4, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bVFPv4, "Can't use %s when CPU doesn't support it", __FUNCTION__); + bool register_quad = Vd >= Q0; Write32((0xF2 << 24) | EncodeVn(Vn) | EncodeVd(Vd) | (0xC1 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VFMS(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, cpu_info.bVFPv4, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bVFPv4, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Write32((0xF2 << 24) | (1 << 21) | EncodeVn(Vn) | EncodeVd(Vd) | (0xC1 << 4) | (register_quad << 6) | EncodeVm(Vm)); } void NEONXEmitter::VHADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1608,9 +1611,9 @@ void NEONXEmitter::VHADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VHSUB(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1619,8 +1622,8 @@ void NEONXEmitter::VHSUB(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VMAX(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1632,8 +1635,8 @@ void NEONXEmitter::VMAX(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VMIN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1645,8 +1648,8 @@ void NEONXEmitter::VMIN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VMLA(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1657,8 +1660,8 @@ void NEONXEmitter::VMLA(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VMLS(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1669,30 +1672,30 @@ void NEONXEmitter::VMLS(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VMLAL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | (encodedSize(Size) << 20) \ | EncodeVn(Vn) | EncodeVd(Vd) | (0x80 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VMLSL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float."); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vn >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, Vm >= D0 && Vm < Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | ((Size & I_UNSIGNED ? 1 : 0) << 24) | (encodedSize(Size) << 20) \ | EncodeVn(Vn) | EncodeVd(Vd) | (0xA0 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VMUL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1704,17 +1707,17 @@ void NEONXEmitter::VMUL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VMULL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0xC0 << 4) | ((Size & I_POLYNOMIAL) ? 1 << 9 : 0) | EncodeVm(Vm)); } void NEONXEmitter::VNEG(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1723,8 +1726,8 @@ void NEONXEmitter::VNEG(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VORN(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1732,8 +1735,8 @@ void NEONXEmitter::VORN(ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VORR(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1741,9 +1744,9 @@ void NEONXEmitter::VORR(ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VPADAL(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1752,8 +1755,8 @@ void NEONXEmitter::VPADAL(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VPADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); if (Size & F_32) Write32((0xF3 << 24) | EncodeVn(Vn) | EncodeVd(Vd) | (0xD0 << 4) | EncodeVm(Vm)); @@ -1763,9 +1766,9 @@ void NEONXEmitter::VPADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VPADDL(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1774,8 +1777,8 @@ void NEONXEmitter::VPADDL(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VPMAX(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); if (Size & F_32) Write32((0xF3 << 24) | EncodeVn(Vn) | EncodeVd(Vd) | (0xF0 << 4) | EncodeVm(Vm)); @@ -1785,8 +1788,8 @@ void NEONXEmitter::VPMAX(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VPMIN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); if (Size & F_32) Write32((0xF3 << 24) | (1 << 21) | EncodeVn(Vn) | EncodeVd(Vd) | (0xF0 << 4) | EncodeVm(Vm)); @@ -1796,9 +1799,9 @@ void NEONXEmitter::VPMIN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VQABS(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1807,9 +1810,9 @@ void NEONXEmitter::VQABS(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VQADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1818,45 +1821,45 @@ void NEONXEmitter::VQADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VQDMLAL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0x90 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VQDMLSL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0xB0 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VQDMULH(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0xB0 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VQDMULL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF2 << 24) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0xD0 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VQNEG(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1865,18 +1868,18 @@ void NEONXEmitter::VQNEG(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VQRDMULH(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF3 << 24) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0xB0 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VQRSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1885,9 +1888,9 @@ void NEONXEmitter::VQRSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VQSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1896,9 +1899,9 @@ void NEONXEmitter::VQSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VQSUB(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1907,17 +1910,17 @@ void NEONXEmitter::VQSUB(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VRADDHN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF3 << 24) | (1 << 23) | ((encodedSize(Size) - 1) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0x40 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VRECPE(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1926,8 +1929,8 @@ void NEONXEmitter::VRECPE(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VRECPS(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1935,9 +1938,9 @@ void NEONXEmitter::VRECPS(ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VRHADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1946,9 +1949,9 @@ void NEONXEmitter::VRHADD(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VRSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1957,8 +1960,8 @@ void NEONXEmitter::VRSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VRSQRTE(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; Vd = SubBase(Vd); @@ -1970,8 +1973,8 @@ void NEONXEmitter::VRSQRTE(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VRSQRTS(ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -1980,18 +1983,18 @@ void NEONXEmitter::VRSQRTS(ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VRSUBHN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); Write32((0xF3 << 24) | (1 << 23) | ((encodedSize(Size) - 1) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0x60 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); - _dbg_assert_msg_(DYNA_REC, !(Size & F_32), __FUNCTION__ " doesn't support float"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); + _assert_msg_(DYNA_REC, !(Size & F_32), "%s doesn't support float.", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -2000,8 +2003,8 @@ void NEONXEmitter::VSHL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VSUB(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -2014,32 +2017,32 @@ void NEONXEmitter::VSUB(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VSUBHN(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); Write32((0xF2 << 24) | (1 << 23) | ((encodedSize(Size) - 1) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0x60 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VSUBL(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); Write32((0xF2 << 24) | (Size & I_UNSIGNED ? 1 << 24 : 0) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0x20 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VSUBW(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); Write32((0xF2 << 24) | (Size & I_UNSIGNED ? 1 << 24 : 0) | (1 << 23) | (encodedSize(Size) << 20) | EncodeVn(Vn) | EncodeVd(Vd) | \ (0x30 << 4) | EncodeVm(Vm)); } void NEONXEmitter::VSWP(ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -2048,8 +2051,8 @@ void NEONXEmitter::VSWP(ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VTRN(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -2058,8 +2061,8 @@ void NEONXEmitter::VTRN(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VTST(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -2068,8 +2071,8 @@ void NEONXEmitter::VTST(u32 Size, ARMReg Vd, ARMReg Vn, ARMReg Vm) } void NEONXEmitter::VUZP(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0; @@ -2078,8 +2081,8 @@ void NEONXEmitter::VUZP(u32 Size, ARMReg Vd, ARMReg Vm) } void NEONXEmitter::VZIP(u32 Size, ARMReg Vd, ARMReg Vm) { - _dbg_assert_msg_(DYNA_REC, Vd >= Q0, "Pass invalid register to " __FUNCTION__); - _dbg_assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use " __FUNCTION__ " when CPU doesn't support it"); + _assert_msg_(DYNA_REC, Vd >= D0, "Pass invalid register to %s", __FUNCTION__); + _assert_msg_(DYNA_REC, cpu_info.bNEON, "Can't use %s when CPU doesn't support it", __FUNCTION__); bool register_quad = Vd >= Q0;