Crate xsave

Source
Expand description

This crate contains a practical implementation of the x86 xsave semantics.

We do not intend to support all possible variations of the instructures, nor do we intend to calculate the size of the xsave area dynamically. Instead, our practical strategy will overallocate the size of the xsave area so that we get a constant size for the struct. This allows for substantially easier embedding in other contexts.

For example, clearing the extended CPU state is a simple:

use xsave::XSave;

XSave::default().load();

Likewise, you can save and restore the extended CPU state like this:

use xsave::XSave;

let mut xsave = XSave::default();
xsave.save();
xsave.load();

Structsยง

Fcw
The x87 Floating Point Control Word
Fsw
The x87 Floating Point Unit (FPU) Status Word
Mm
An MMX register
MmField
An MMX register field
MxCsr
The MXCSR register
XCompBv
XCOMP_BV flags
XSave
An XSave buffer
XSaveHeader
The XSave Header Area
XSaveLegacy
The XSave Legacy Area
XStateBv
XSTATE_BV flags
Xmm
An XMM register