Ignore:
Timestamp:
2023-02-07T16:49:43Z (17 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
78acbc72
Parents:
1eaead4
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-14 14:08:42)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-07 16:49:43)
Message:

Avoid separate allocation for FPU context

With _Alignas, we can encode alignment in the type itself and
include it directly as a member of thread_t, thus removing
the need for a separate allocation.

The alignment requirement is never more than 16 bytes,
so this adds only minimal extra padding to the structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/arch/fpu_context.h

    r1eaead4 r0366d09d  
    3838#include <stdint.h>
    3939
    40 #define FPU_CONTEXT_ALIGN       8
    41 
    4240typedef struct {
    43         uint64_t        d[32];
    44         uint64_t        fsr;
     41        _Alignas(8) uint64_t d[32];
     42        uint64_t fsr;
    4543} fpu_context_t;
    4644
Note: See TracChangeset for help on using the changeset viewer.