fastlink impl

This commit is contained in:
lizzie 2026-03-31 04:35:22 +00:00
parent ea759d3f5a
commit 247e7d1ff9
2 changed files with 16 additions and 1 deletions

View file

@ -3,6 +3,7 @@
#include <memory>
#include <mutex>
#include <cstddef>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/common/assert.h"

View file

@ -169,7 +169,21 @@ void EmitTerminal(powah::Context& code, EmitContext& ctx, IR::Term::LinkBlock te
}
void EmitTerminal(powah::Context& code, EmitContext& ctx, IR::Term::LinkBlockFast terminal, IR::LocationDescriptor initial_location, bool) {
ASSERT(false && "unimp");
if (ctx.emit_conf.a64_variant) {
auto const tmp = ctx.reg_alloc.ScratchGpr();
code.LI(tmp, terminal.next.Value());
code.STD(tmp, PPC64::RJIT, offsetof(A64JitState, pc));
code.LD(tmp, PPC64::RTOCPTR, 0);
code.MTCTR(tmp);
code.LD(powah::R2, PPC64::RTOCPTR, 8);
code.LD(powah::R11, PPC64::RTOCPTR, 16);
code.BCTR();
} else {
auto const tmp = ctx.reg_alloc.ScratchGpr();
code.LI(tmp, terminal.next.Value());
code.STW(tmp, PPC64::RJIT, offsetof(A32JitState, regs) + sizeof(u32) * 15);
ASSERT(false && "unimp");
}
}
void EmitTerminal(powah::Context& code, EmitContext& ctx, IR::Term::PopRSBHint, IR::LocationDescriptor, bool) {