From d33017b458fbdb9974f70939f099be5bfcf35794 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Tue, 31 Aug 2021 10:46:01 -0700 Subject: [PATCH] x86: x86-64: add arch_float_en-/dis-able() functions This adds arch_float_enable() and arch_float_disable() to x86-64. As x86-64 always has FP/SSE enabled, these operations are basically no-ops. These are added just for the completeness of arch interface. Fixes #38022 Signed-off-by: Daniel Leung --- arch/x86/core/intel64/thread.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/x86/core/intel64/thread.c b/arch/x86/core/intel64/thread.c index a941022f9fa..e998b06ac8e 100644 --- a/arch/x86/core/intel64/thread.c +++ b/arch/x86/core/intel64/thread.c @@ -61,3 +61,15 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, thread->arch.flags = X86_THREAD_FLAG_ALL; thread->switch_handle = thread; } + +int arch_float_disable(struct k_thread *thread) +{ + /* x86-64 always has FP/SSE enabled so cannot be disabled */ + return -ENOTSUP; +} + +int arch_float_enable(struct k_thread *thread, unsigned int options) +{ + /* x86-64 always has FP/SSE enabled so nothing to do here */ + return 0; +}