From bd3b7c3f9067a54632118e41be664ddaa2edc330 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 14 Jul 2020 12:07:05 +0200 Subject: [PATCH] Make space for AVX-512 registers in x86 arch_thread. Should fix #16382 Change-Id: Ib1445e3c08036a8c959eae54adcf0f0c27bcf22d Reviewed-on: https://review.haiku-os.org/c/haiku/+/3031 Reviewed-by: Rene Gollent Reviewed-by: Adrien Destugues --- headers/private/kernel/arch/x86/arch_thread_types.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/headers/private/kernel/arch/x86/arch_thread_types.h b/headers/private/kernel/arch/x86/arch_thread_types.h index 5bd1b637d9..5f124bd99e 100644 --- a/headers/private/kernel/arch/x86/arch_thread_types.h +++ b/headers/private/kernel/arch/x86/arch_thread_types.h @@ -57,8 +57,11 @@ struct arch_thread { // 512 byte floating point save point - this must be 16 byte aligned uint8 fpu_state[512] _ALIGNED(16); #else - // floating point save point - this must be 64 byte aligned for xsave - uint8 fpu_state[1024] _ALIGNED(64); + // floating point save point - this must be 64 byte aligned for xsave and + // have enough space for all the registers, at least 2560 bytes according + // to Intel Architecture Instruction Set Extensions Programming Reference, + // Section 3.2.4, table 3-8 + uint8 fpu_state[2560] _ALIGNED(64); #endif addr_t GetFramePointer() const;