Skip to content

Commit d33017b

Browse files
dcpleungcfriedt
authored andcommitted
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 <[email protected]>
1 parent 049e3ba commit d33017b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

arch/x86/core/intel64/thread.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,15 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
6161
thread->arch.flags = X86_THREAD_FLAG_ALL;
6262
thread->switch_handle = thread;
6363
}
64+
65+
int arch_float_disable(struct k_thread *thread)
66+
{
67+
/* x86-64 always has FP/SSE enabled so cannot be disabled */
68+
return -ENOTSUP;
69+
}
70+
71+
int arch_float_enable(struct k_thread *thread, unsigned int options)
72+
{
73+
/* x86-64 always has FP/SSE enabled so nothing to do here */
74+
return 0;
75+
}

0 commit comments

Comments
 (0)