diff --git a/externals/dynarmic/src/dynarmic/backend/x64/hostloc.h b/externals/dynarmic/src/dynarmic/backend/x64/hostloc.h index 1f0dfa80a6..c96a18628a 100644 --- a/externals/dynarmic/src/dynarmic/backend/x64/hostloc.h +++ b/externals/dynarmic/src/dynarmic/backend/x64/hostloc.h @@ -131,9 +131,12 @@ const HostLocList any_gpr = { }; // XMM0 is reserved for use by instructions that implicitly use it as an argument +// XMM1 is used by 128 mem accessors +// XMM2 is also used by that (and other stuff) +// Basically dont use either XMM0, XMM1 or XMM2 ever; they're left for the regsel const HostLocList any_xmm = { - HostLoc::XMM1, - HostLoc::XMM2, + //HostLoc::XMM1, + //HostLoc::XMM2, HostLoc::XMM3, HostLoc::XMM4, HostLoc::XMM5, diff --git a/externals/dynarmic/src/dynarmic/backend/x64/reg_alloc.cpp b/externals/dynarmic/src/dynarmic/backend/x64/reg_alloc.cpp index f8323e7ded..c1691d9171 100644 --- a/externals/dynarmic/src/dynarmic/backend/x64/reg_alloc.cpp +++ b/externals/dynarmic/src/dynarmic/backend/x64/reg_alloc.cpp @@ -573,7 +573,7 @@ HostLoc RegAlloc::FindFreeSpill(bool is_xmm) const noexcept { if (!is_xmm) { // TODO(lizzie): Using lower (xmm0 and such) registers results in issues/crashes - INVESTIGATE WHY // Intel recommends to spill GPR onto XMM registers IF POSSIBLE - for (size_t i = size_t(HostLoc::XMM15); i >= size_t(HostLoc::XMM0); --i) + for (auto const i : any_xmm) if (const auto loc = HostLoc(i); LocInfo(loc).IsEmpty()) return loc; }