Ignore:
Timestamp:
2023-02-07T16:49:43Z (15 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/arm32/include/arch/fpu_context.h

    r1eaead4 r0366d09d  
    4040#include <stdint.h>
    4141
    42 #define FPU_CONTEXT_ALIGN    8
    43 
    4442/*
    4543 * ARM Architecture reference manual, p B-1529.
    4644 */
    4745typedef struct {
    48         uint32_t fpexc;
     46        _Alignas(8) uint32_t fpexc;
    4947        uint32_t fpscr;
    5048        uint32_t s[64];
Note: See TracChangeset for help on using the changeset viewer.