summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-06-20 01:40:07 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:36:27 +0200
commit4105f38022a525aab2e7d4288f121b4f0a0dd7b2 (patch)
tree3cf68e47fcc17442111b8af16a3fff19b3f3434f /src/core/arm
parentSVC: Add GetCurrentProcessorNumber32, CreateTransferMemory32, SetMemoryAttribute32 (diff)
downloadyuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.tar
yuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.tar.gz
yuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.tar.bz2
yuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.tar.lz
yuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.tar.xz
yuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.tar.zst
yuzu-4105f38022a525aab2e7d4288f121b4f0a0dd7b2.zip
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/arm_interface.h5
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_32.cpp8
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index fbdce4134..0c1d6ac39 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -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{};
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp
index 5df4fc079..cfda12098 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp
@@ -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) {