zephyr/tests/kernel/fpu_sharing/generic/src/main.c
Kumar Gala d31814e990 tests: Fix floating point test variants on x86 w/LLVM
LLVM doesn't support SSE + 387 math.  As such if SSE is enabled we
have to utilize SSE floating point.  To utilize 387 math, SSE has
to be disabled.

Update the floating point related tests to introduce 387 only variants
that will build on both GCC & LLVM based tools.  Than we exclude llvm
based (llvm, oneApi) toolchains from the CONFIG_X86_SSE_FP_MATH=n and
CONFIG_X86_SSE=y test variants.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-02-21 08:25:38 -05:00

34 lines
801 B
C

/*
* Copyright (c) 2011-2014 Wind River Systems, Inc.
* Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/ztest.h>
#include "test_common.h"
#ifndef CONFIG_FPU
#error Rebuild with the FPU config option enabled
#endif
#ifndef CONFIG_FPU_SHARING
#error Rebuild with the FPU_SHARING config option enabled
#endif
static void *generic_setup(void)
{
/*
* Enable round robin scheduling to allow both the low priority pi
* computation and load/store tasks to execute. The high priority pi
* computation and load/store tasks will preempt the low priority tasks
* periodically.
*/
k_sched_time_slice_set(10, THREAD_LOW_PRIORITY);
return NULL;
}
ZTEST_SUITE(fpu_sharing_generic, NULL, generic_setup, NULL, NULL, NULL);