mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 02:57:53 -05:00
SVC: Implement 32-bits wrappers and update Dynarmic.
This commit is contained in:
@ -33,16 +33,15 @@ public:
|
||||
|
||||
struct ThreadContext32 {
|
||||
std::array<u32, 16> cpu_registers{};
|
||||
std::array<u32, 64> extension_registers{};
|
||||
u32 cpsr{};
|
||||
std::array<u8, 4> padding{};
|
||||
std::array<u64, 32> fprs{};
|
||||
u32 fpscr{};
|
||||
u32 fpexc{};
|
||||
u32 tpidr{};
|
||||
};
|
||||
// Internally within the kernel, it expects the AArch32 version of the
|
||||
// thread context to be 344 bytes in size.
|
||||
static_assert(sizeof(ThreadContext32) == 0x158);
|
||||
static_assert(sizeof(ThreadContext32) == 0x150);
|
||||
|
||||
struct ThreadContext64 {
|
||||
std::array<u64, 31> cpu_registers{};
|
||||
|
@ -222,13 +222,17 @@ void ARM_Dynarmic_32::SaveContext(ThreadContext32& ctx) {
|
||||
Dynarmic::A32::Context context;
|
||||
jit->SaveContext(context);
|
||||
ctx.cpu_registers = context.Regs();
|
||||
ctx.extension_registers = context.ExtRegs();
|
||||
ctx.cpsr = context.Cpsr();
|
||||
ctx.fpscr = context.Fpscr();
|
||||
}
|
||||
|
||||
void ARM_Dynarmic_32::LoadContext(const ThreadContext32& ctx) {
|
||||
Dynarmic::A32::Context context;
|
||||
context.Regs() = ctx.cpu_registers;
|
||||
context.ExtRegs() = ctx.extension_registers;
|
||||
context.SetCpsr(ctx.cpsr);
|
||||
context.SetFpscr(ctx.fpscr);
|
||||
jit->LoadContext(context);
|
||||
}
|
||||
|
||||
@ -243,7 +247,9 @@ void ARM_Dynarmic_32::ClearInstructionCache() {
|
||||
jit->ClearCache();
|
||||
}
|
||||
|
||||
void ARM_Dynarmic_32::ClearExclusiveState() {}
|
||||
void ARM_Dynarmic_32::ClearExclusiveState() {
|
||||
jit->ClearExclusiveState();
|
||||
}
|
||||
|
||||
void ARM_Dynarmic_32::PageTableChanged(Common::PageTable& page_table,
|
||||
std::size_t new_address_space_size_in_bits) {
|
||||
|
Reference in New Issue
Block a user