Merge pull request #18560 from unknownbrackets/replacement-slice

HLE: Slice the very slow memset/memcpy variants
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2023-12-17 12:35:48 +01:00
commit e5af1f8bd0
12 files changed
+132 -23

No files matched your search

+15 -2
View File
@@ -233,8 +233,21 @@ void X64JitBackend::CompIR_System(IRInst inst) {
ABI_CallFunction(GetReplacementFunc(inst.constant)->replaceFunc);
WriteDebugProfilerStatus(IRProfilerStatus::IN_JIT);
LoadStaticRegisters();
//SUB(32, R(DOWNCOUNTREG), R(DOWNCOUNTREG), R(EAX));
SUB(32, MDisp(CTXREG, downcountOffset), R(EAX));
// Since we flushed above, and we're mapping write, EAX should be safe.
regs_.Map(inst);
MOV(32, regs_.R(inst.dest), R(EAX));
NEG(32, R(EAX));
// Set it back if it negate made it negative. That's the absolute value.
CMOVcc(32, EAX, regs_.R(inst.dest), CC_S);
// Now set the dest to the sign bit status.
SAR(32, regs_.R(inst.dest), Imm8(31));
if (jo.downcountInRegister)
SUB(32, R(DOWNCOUNTREG), R(EAX));
else
SUB(32, MDisp(CTXREG, downcountOffset), R(EAX));
break;
case IROp::Break: