[JIT]: Registers::Write<bool> handler for Xbyak register write op

This commit is contained in:
SimoneN64
2025-01-28 00:35:15 +01:00
parent 7ddce3b909
commit bb498e599e

View File

@@ -195,6 +195,20 @@ void Registers::Write<s8>(size_t idx, s8 v) {
gpr[idx] = v; gpr[idx] = v;
} }
template <>
void Registers::Write<bool>(size_t idx, Xbyak::Reg v) {
if (idx == 0)
return;
gprIsConstant[idx] = false;
if (!jit)
Util::panic("Did you try to call Registers::Write(size_t, *Xbyak::Reg*) from the interpreter?");
jit->code.movsx(v.cvt64(), v.cvt8());
jit->code.mov(jit->GPR<u64>(idx), v);
}
template <> template <>
void Registers::Write<s8>(size_t idx, Xbyak::Reg v) { void Registers::Write<s8>(size_t idx, Xbyak::Reg v) {
if (idx == 0) if (idx == 0)