fix invalidations, use stack for checkbit
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
@@ -35,6 +35,7 @@ There are no plans to support v1 or v2.
|
||||
|
||||
* x86-64
|
||||
* AArch64
|
||||
* PowerPC 64 (POWER 4 and up)
|
||||
|
||||
There are no plans to support any 32-bit architecture.
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ struct Jit::Impl final {
|
||||
ASSERT(!is_executing);
|
||||
is_executing = true;
|
||||
HaltReason hr = core.Run(current_address_space, jit_state, &halt_reason);
|
||||
current_address_space.ClearCache(); // TODO: dont just invalidate everything
|
||||
is_executing = false;
|
||||
RequestCacheInvalidation();
|
||||
return hr;
|
||||
|
||||
@@ -182,8 +182,8 @@ void EmitTerminal(powah::Context& code, EmitContext& ctx, IR::Term::CheckBit ter
|
||||
powah::Label const l_else = code.DefineLabel();
|
||||
powah::Label const l_end = code.DefineLabel();
|
||||
auto const tmp = ctx.reg_alloc.ScratchGpr();
|
||||
code.LBZ(tmp, PPC64::RJIT, ctx.emit_conf.a64_variant ? offsetof(A64JitState, check_bit) : offsetof(A32JitState, check_bit));
|
||||
code.CMPLWI(tmp, 0);
|
||||
code.LD(tmp, powah::R1, offsetof(StackLayout, check_bit));
|
||||
code.CMPLDI(tmp, 0);
|
||||
code.BEQ(powah::CR0, l_else);
|
||||
// CheckBit == 1
|
||||
EmitTerminal(code, ctx, terminal.then_, initial_location, is_single_step);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Dynarmic::Backend::PPC64 {
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::A64SetCheckBit>(powah::Context& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
auto const value = ctx.reg_alloc.UseGpr(inst->GetArg(0));
|
||||
code.STB(value, PPC64::RJIT, offsetof(A64JitState, check_bit));
|
||||
code.STD(value, powah::R1, offsetof(StackLayout, check_bit));
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -9,18 +9,12 @@
|
||||
|
||||
namespace Dynarmic::Backend::PPC64 {
|
||||
|
||||
constexpr size_t SpillCount = 64;
|
||||
constexpr size_t SpillCount = 16;
|
||||
|
||||
struct alignas(16) StackLayout {
|
||||
s64 cycles_remaining;
|
||||
s64 cycles_to_run;
|
||||
|
||||
std::array<u64, 18> regs;
|
||||
std::array<u64, SpillCount> spill;
|
||||
|
||||
u32 save_host_fpcr;
|
||||
u32 save_host_fpsr;
|
||||
|
||||
bool check_bit;
|
||||
u64 check_bit;
|
||||
};
|
||||
|
||||
static_assert(sizeof(StackLayout) % 16 == 0);
|
||||
|
||||
Reference in New Issue
Block a user