mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-06 13:09:02 +00:00
testing/ostest/fpu.c: align FPU context
some architectures requires FPU context to be aligned, for example x86-64 when used with XSAVE instruction must be aligned to 64 Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
parent
8c7323cc8b
commit
9088634e96
1 changed files with 8 additions and 2 deletions
|
|
@ -79,14 +79,20 @@
|
|||
|
||||
#define FPU_NTHREADS 2
|
||||
|
||||
/* Some architectures require XCPTCONTEXT to be aligned */
|
||||
|
||||
#ifndef XCPTCONTEXT_ALIGN
|
||||
# define XCPTCONTEXT_ALIGN 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
struct fpu_threaddata_s
|
||||
{
|
||||
uintptr_t save1[XCPTCONTEXT_REGS];
|
||||
uintptr_t save2[XCPTCONTEXT_REGS];
|
||||
uintptr_t save1[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
|
||||
uintptr_t save2[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
|
||||
|
||||
/* These are just dummy values to force the compiler to do the
|
||||
* requested floating point computations without the nonsense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue