Iros
 
Loading...
Searching...
No Matches
iris::arch::FpuState Struct Reference

#include <iris/arch/x86/amd64/core/task.h>

Public Member Functions

 FpuState ()=default
 
 ~FpuState ()
 
auto setup_fpu_state () -> Expected< void >
 Setup the task's FPU state. This must be called for userspace tasks.
 
auto setup_initial_fpu_state () -> Expected< void >
 
void load ()
 
void save ()
 

Public Attributes

bytefpu_state { nullptr }
 

Constructor & Destructor Documentation

◆ FpuState()

iris::arch::FpuState::FpuState ( )
default

◆ ~FpuState()

iris::arch::FpuState::~FpuState ( )

Member Function Documentation

◆ load()

void iris::arch::FpuState::load ( )

Load this task's FPU state into the registers. This only makes sense to call when IRQs are disabled, right before performing a context switch.

◆ save()

void iris::arch::FpuState::save ( )

Save the current processor's FPU state into this task. This only makes sense to call when IRQs are disabled, when the task has just been interrupted.

◆ setup_fpu_state()

auto iris::arch::FpuState::setup_fpu_state ( ) -> Expected<void>

Setup the task's FPU state. This must be called for userspace tasks.

◆ setup_initial_fpu_state()

auto iris::arch::FpuState::setup_initial_fpu_state ( ) -> Expected<void>

Setup initial FPU state. This creates a clean-copy of the FPU state which is copied to newly created tasks. This also configures the processor to allow floating-point / SIMD operations.

Member Data Documentation

◆ fpu_state

byte* iris::arch::FpuState::fpu_state { nullptr }

This is the task's FPU state. It is null for kernel-space tasks. Since it is dynamically sized, it must be managed manually.


The documentation for this struct was generated from the following files: