PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
simd.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5
6/**
7 * @brief SIMD context management
8 * @defgroup kernel_cpu_simd SIMD
9 * @ingroup kernel_cpu
10 *
11 * SIMD (Single Instruction, Multiple Data) context management allows saving and restoring the state of SIMD registers,
12 * the fact that SIMD uses its own registers is the reason that we cant use SIMD in the kernel normally.
13 *
14 * @see [XSAVE Instruction](https://www.felixcloutier.com/x86/xsave)
15 * @see [FXSAVE Instruction](https://www.felixcloutier.com/x86/fxsave)
16 * @see [FNINIT Instruction](https://www.felixcloutier.com/x86/fninit)
17 *
18 * @{
19 */
20
21typedef struct
22{
25
26void simd_cpu_init(void);
27
29
31
32void simd_ctx_save(simd_ctx_t* ctx);
33
34void simd_ctx_load(simd_ctx_t* ctx);
35
36/** @} */
void simd_ctx_save(simd_ctx_t *ctx)
Definition simd.c:139
void simd_ctx_load(simd_ctx_t *ctx)
Definition simd.c:154
uint64_t simd_ctx_init(simd_ctx_t *ctx)
Definition simd.c:121
void simd_cpu_init(void)
Definition simd.c:41
void simd_ctx_deinit(simd_ctx_t *ctx)
Definition simd.c:134
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
__UINT8_TYPE__ uint8_t
Definition stdint.h:11
uint8_t * buffer
Definition simd.h:23