mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-12 20:46:27 +00:00
Prefer ASSERT to DEBUG_ASSERT
This commit is contained in:
@@ -10,12 +10,12 @@ namespace Dynarmic {
|
||||
namespace BackendX64 {
|
||||
|
||||
Xbyak::Reg64 HostLocToReg64(HostLoc loc) {
|
||||
DEBUG_ASSERT(HostLocIsGPR(loc));
|
||||
ASSERT(HostLocIsGPR(loc));
|
||||
return Xbyak::Reg64(static_cast<int>(loc));
|
||||
}
|
||||
|
||||
Xbyak::Xmm HostLocToXmm(HostLoc loc) {
|
||||
DEBUG_ASSERT(HostLocIsXMM(loc));
|
||||
ASSERT(HostLocIsXMM(loc));
|
||||
return Xbyak::Xmm(static_cast<int>(loc) - static_cast<int>(HostLoc::XMM0));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ Xbyak::Address SpillToOpArg(HostLoc loc) {
|
||||
using namespace Xbyak::util;
|
||||
|
||||
static_assert(std::is_same<decltype(JitState::Spill[0]), u64&>::value, "Spill must be u64");
|
||||
DEBUG_ASSERT(HostLocIsSpill(loc));
|
||||
ASSERT(HostLocIsSpill(loc));
|
||||
|
||||
size_t i = static_cast<size_t>(loc) - static_cast<size_t>(HostLoc::FirstSpill);
|
||||
return qword[r15 + offsetof(JitState, Spill) + i * sizeof(u64)];
|
||||
|
||||
@@ -362,12 +362,12 @@ boost::optional<HostLoc> RegAlloc::ValueLocation(const IR::Inst* value) const {
|
||||
}
|
||||
|
||||
void RegAlloc::DefineValueImpl(IR::Inst* def_inst, HostLoc host_loc) {
|
||||
DEBUG_ASSERT_MSG(!ValueLocation(def_inst), "def_inst has already been defined");
|
||||
ASSERT_MSG(!ValueLocation(def_inst), "def_inst has already been defined");
|
||||
LocInfo(host_loc).AddValue(def_inst);
|
||||
}
|
||||
|
||||
void RegAlloc::DefineValueImpl(IR::Inst* def_inst, const IR::Value& use_inst) {
|
||||
DEBUG_ASSERT_MSG(!ValueLocation(def_inst), "def_inst has already been defined");
|
||||
ASSERT_MSG(!ValueLocation(def_inst), "def_inst has already been defined");
|
||||
|
||||
if (use_inst.IsImmediate()) {
|
||||
HostLoc location = ScratchImpl(any_gpr);
|
||||
@@ -376,7 +376,7 @@ void RegAlloc::DefineValueImpl(IR::Inst* def_inst, const IR::Value& use_inst) {
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_ASSERT_MSG(ValueLocation(use_inst.GetInst()), "use_inst must already be defined");
|
||||
ASSERT_MSG(ValueLocation(use_inst.GetInst()), "use_inst must already be defined");
|
||||
HostLoc location = *ValueLocation(use_inst.GetInst());
|
||||
DefineValueImpl(def_inst, location);
|
||||
}
|
||||
@@ -456,12 +456,12 @@ HostLoc RegAlloc::FindFreeSpill() const {
|
||||
}
|
||||
|
||||
HostLocInfo& RegAlloc::LocInfo(HostLoc loc) {
|
||||
DEBUG_ASSERT(loc != HostLoc::RSP && loc != HostLoc::R15);
|
||||
ASSERT(loc != HostLoc::RSP && loc != HostLoc::R15);
|
||||
return hostloc_info[static_cast<size_t>(loc)];
|
||||
}
|
||||
|
||||
const HostLocInfo& RegAlloc::LocInfo(HostLoc loc) const {
|
||||
DEBUG_ASSERT(loc != HostLoc::RSP && loc != HostLoc::R15);
|
||||
ASSERT(loc != HostLoc::RSP && loc != HostLoc::R15);
|
||||
return hostloc_info[static_cast<size_t>(loc)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user