[JIT]: Registers::Write<bool> handler for Xbyak register write op
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user