[JIT] implement setPC like regs

This commit is contained in:
irisz64
2025-07-07 11:19:36 +02:00
parent 6e69a37a62
commit f91b0d0242

View File

@@ -99,6 +99,20 @@ private:
code.add(code.rsp, 8);
}
void SetPC32(s32 val) {
code.mov(code.rax, REG(qword, pc));
code.mov(REG(qword, oldPC), code.rax);
code.mov(REG(qword, pc), (s64)val);
code.mov(REG(qword, nextPC), (s64)val + 4);
}
void SetPC64(s64 val) {
code.mov(code.rax, REG(qword, pc));
code.mov(REG(qword, oldPC), code.rax);
code.mov(REG(qword, pc), val);
code.mov(REG(qword, nextPC), val + 4);
}
void SkipSlot();
void SkipSlotConstant();
void BranchNotTaken();