summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2020-03-20 22:37:42 -0400
committerGravatar bunnei2020-04-17 00:11:50 -0400
commit0f4f90cd04932d2f554ce97dd468a71fdc5b34fb (patch)
treea02284bd0b0b2115162262ce9c6fd1a6bc7c527e /src
parentMerge pull request #3671 from lioncash/switch (diff)
downloadyuzu-0f4f90cd04932d2f554ce97dd468a71fdc5b34fb.tar.gz
yuzu-0f4f90cd04932d2f554ce97dd468a71fdc5b34fb.tar.xz
yuzu-0f4f90cd04932d2f554ce97dd468a71fdc5b34fb.zip
arm_interface: Ensure ThreadContext is zero'd out.
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/arm_interface.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 57eae839e..cb2e640e2 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -26,28 +26,28 @@ public:
26 virtual ~ARM_Interface() = default; 26 virtual ~ARM_Interface() = default;
27 27
28 struct ThreadContext32 { 28 struct ThreadContext32 {
29 std::array<u32, 16> cpu_registers; 29 std::array<u32, 16> cpu_registers{};
30 u32 cpsr; 30 u32 cpsr{};
31 std::array<u8, 4> padding; 31 std::array<u8, 4> padding{};
32 std::array<u64, 32> fprs; 32 std::array<u64, 32> fprs{};
33 u32 fpscr; 33 u32 fpscr{};
34 u32 fpexc; 34 u32 fpexc{};
35 u32 tpidr; 35 u32 tpidr{};
36 }; 36 };
37 // Internally within the kernel, it expects the AArch32 version of the 37 // Internally within the kernel, it expects the AArch32 version of the
38 // thread context to be 344 bytes in size. 38 // thread context to be 344 bytes in size.
39 static_assert(sizeof(ThreadContext32) == 0x158); 39 static_assert(sizeof(ThreadContext32) == 0x158);
40 40
41 struct ThreadContext64 { 41 struct ThreadContext64 {
42 std::array<u64, 31> cpu_registers; 42 std::array<u64, 31> cpu_registers{};
43 u64 sp; 43 u64 sp{};
44 u64 pc; 44 u64 pc{};
45 u32 pstate; 45 u32 pstate{};
46 std::array<u8, 4> padding; 46 std::array<u8, 4> padding{};
47 std::array<u128, 32> vector_registers; 47 std::array<u128, 32> vector_registers{};
48 u32 fpcr; 48 u32 fpcr{};
49 u32 fpsr; 49 u32 fpsr{};
50 u64 tpidr; 50 u64 tpidr{};
51 }; 51 };
52 // Internally within the kernel, it expects the AArch64 version of the 52 // Internally within the kernel, it expects the AArch64 version of the
53 // thread context to be 800 bytes in size. 53 // thread context to be 800 bytes in size.