mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 10:09:22 +01:00
externals: bump dynarmic to 6.4.6 (#6423)
This commit is contained in:
parent
a94acde519
commit
8d19483b7e
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b3a92ab54dadd26a0c2a87d2677b80249d2e1a5a
|
Subproject commit c08c5a9362bb224dc343c2f616c24df027dfdf13
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <dynarmic/interface/A32/a32.h>
|
#include <dynarmic/interface/A32/a32.h>
|
||||||
#include <dynarmic/interface/A32/context.h>
|
|
||||||
#include <dynarmic/interface/optimization_flags.h>
|
#include <dynarmic/interface/optimization_flags.h>
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/microprofile.h"
|
#include "common/microprofile.h"
|
||||||
@ -26,36 +25,36 @@ public:
|
|||||||
~DynarmicThreadContext() override = default;
|
~DynarmicThreadContext() override = default;
|
||||||
|
|
||||||
void Reset() override {
|
void Reset() override {
|
||||||
ctx.Regs() = {};
|
regs = {};
|
||||||
ctx.SetCpsr(0);
|
ext_regs = {};
|
||||||
ctx.ExtRegs() = {};
|
cpsr = 0;
|
||||||
ctx.SetFpscr(0);
|
fpscr = 0;
|
||||||
fpexc = 0;
|
fpexc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GetCpuRegister(std::size_t index) const override {
|
u32 GetCpuRegister(std::size_t index) const override {
|
||||||
return ctx.Regs()[index];
|
return regs[index];
|
||||||
}
|
}
|
||||||
void SetCpuRegister(std::size_t index, u32 value) override {
|
void SetCpuRegister(std::size_t index, u32 value) override {
|
||||||
ctx.Regs()[index] = value;
|
regs[index] = value;
|
||||||
}
|
}
|
||||||
u32 GetCpsr() const override {
|
u32 GetCpsr() const override {
|
||||||
return ctx.Cpsr();
|
return cpsr;
|
||||||
}
|
}
|
||||||
void SetCpsr(u32 value) override {
|
void SetCpsr(u32 value) override {
|
||||||
ctx.SetCpsr(value);
|
cpsr = value;
|
||||||
}
|
}
|
||||||
u32 GetFpuRegister(std::size_t index) const override {
|
u32 GetFpuRegister(std::size_t index) const override {
|
||||||
return ctx.ExtRegs()[index];
|
return ext_regs[index];
|
||||||
}
|
}
|
||||||
void SetFpuRegister(std::size_t index, u32 value) override {
|
void SetFpuRegister(std::size_t index, u32 value) override {
|
||||||
ctx.ExtRegs()[index] = value;
|
ext_regs[index] = value;
|
||||||
}
|
}
|
||||||
u32 GetFpscr() const override {
|
u32 GetFpscr() const override {
|
||||||
return ctx.Fpscr();
|
return fpscr;
|
||||||
}
|
}
|
||||||
void SetFpscr(u32 value) override {
|
void SetFpscr(u32 value) override {
|
||||||
ctx.SetFpscr(value);
|
fpscr = value;
|
||||||
}
|
}
|
||||||
u32 GetFpexc() const override {
|
u32 GetFpexc() const override {
|
||||||
return fpexc;
|
return fpexc;
|
||||||
@ -67,7 +66,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class ARM_Dynarmic;
|
friend class ARM_Dynarmic;
|
||||||
|
|
||||||
Dynarmic::A32::Context ctx;
|
std::array<u32, 16> regs;
|
||||||
|
std::array<u32, 64> ext_regs;
|
||||||
|
u32 cpsr;
|
||||||
|
u32 fpscr;
|
||||||
u32 fpexc;
|
u32 fpexc;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -291,7 +293,10 @@ void ARM_Dynarmic::SaveContext(const std::unique_ptr<ThreadContext>& arg) {
|
|||||||
DynarmicThreadContext* ctx = dynamic_cast<DynarmicThreadContext*>(arg.get());
|
DynarmicThreadContext* ctx = dynamic_cast<DynarmicThreadContext*>(arg.get());
|
||||||
ASSERT(ctx);
|
ASSERT(ctx);
|
||||||
|
|
||||||
jit->SaveContext(ctx->ctx);
|
ctx->regs = jit->Regs();
|
||||||
|
ctx->ext_regs = jit->ExtRegs();
|
||||||
|
ctx->cpsr = jit->Cpsr();
|
||||||
|
ctx->fpscr = jit->Fpscr();
|
||||||
ctx->fpexc = fpexc;
|
ctx->fpexc = fpexc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +304,10 @@ void ARM_Dynarmic::LoadContext(const std::unique_ptr<ThreadContext>& arg) {
|
|||||||
const DynarmicThreadContext* ctx = dynamic_cast<DynarmicThreadContext*>(arg.get());
|
const DynarmicThreadContext* ctx = dynamic_cast<DynarmicThreadContext*>(arg.get());
|
||||||
ASSERT(ctx);
|
ASSERT(ctx);
|
||||||
|
|
||||||
jit->LoadContext(ctx->ctx);
|
jit->Regs() = ctx->regs;
|
||||||
|
jit->ExtRegs() = ctx->ext_regs;
|
||||||
|
jit->SetCpsr(ctx->cpsr);
|
||||||
|
jit->SetFpscr(ctx->fpscr);
|
||||||
fpexc = ctx->fpexc;
|
fpexc = ctx->fpexc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,21 +337,21 @@ std::shared_ptr<Memory::PageTable> ARM_Dynarmic::GetPageTable() const {
|
|||||||
|
|
||||||
void ARM_Dynarmic::SetPageTable(const std::shared_ptr<Memory::PageTable>& page_table) {
|
void ARM_Dynarmic::SetPageTable(const std::shared_ptr<Memory::PageTable>& page_table) {
|
||||||
current_page_table = page_table;
|
current_page_table = page_table;
|
||||||
Dynarmic::A32::Context ctx{};
|
auto ctx{NewContext()};
|
||||||
if (jit) {
|
if (jit) {
|
||||||
jit->SaveContext(ctx);
|
SaveContext(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto iter = jits.find(current_page_table);
|
auto iter = jits.find(current_page_table);
|
||||||
if (iter != jits.end()) {
|
if (iter != jits.end()) {
|
||||||
jit = iter->second.get();
|
jit = iter->second.get();
|
||||||
jit->LoadContext(ctx);
|
LoadContext(ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto new_jit = MakeJit();
|
auto new_jit = MakeJit();
|
||||||
jit = new_jit.get();
|
jit = new_jit.get();
|
||||||
jit->LoadContext(ctx);
|
LoadContext(ctx);
|
||||||
jits.emplace(current_page_table, std::move(new_jit));
|
jits.emplace(current_page_table, std::move(new_jit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user