[dynarmic] jit fix branch v2 #203

Merged
crueter merged 27 commits from dynarmic-v2 into master 2025-08-27 06:49:51 +02:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit a7b99470fa - Show all commits

View file

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

View file

@ -571,7 +571,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;
}