From ebe44dab7a8db0aeb48dce93c6c4e9a7019f6221 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 4 May 2021 16:26:28 +0100 Subject: [PATCH] stack_layout: Ignore warning C4324 for StackLayout We expect the structure to be padded --- src/backend/x64/stack_layout.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/backend/x64/stack_layout.h b/src/backend/x64/stack_layout.h index b4db9de4..636f40b5 100644 --- a/src/backend/x64/stack_layout.h +++ b/src/backend/x64/stack_layout.h @@ -13,6 +13,11 @@ namespace Dynarmic::Backend::X64 { constexpr size_t SpillCount = 64; +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4324) // Structure was padded due to alignment specifier +#endif + struct alignas(16) StackLayout { s64 cycles_remaining; s64 cycles_to_run; @@ -22,8 +27,13 @@ struct alignas(16) StackLayout { u32 save_host_MXCSR; bool check_bit; + bool halt_requested; }; +#ifdef _MSC_VER +#pragma warning(pop) +#endif + static_assert(sizeof(StackLayout) % 16 == 0); } // namespace Dynarmic::Backend::X64