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/ia64/include/arch/fpu_context.h

    r1eaead4 r0366d09d  
    3636#define KERN_ia64_FPU_CONTEXT_H_
    3737
    38 #define FPU_CONTEXT_ALIGN 16
    39 
    4038#include <_bits/int128_t.h>
    4139
     
    4341
    4442typedef struct {
    45         uint128_t fr[FRS];
     43        _Alignas(16) uint128_t fr[FRS];
    4644} fpu_context_t;
    4745
Note: See TracChangeset for help on using the changeset viewer.