Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
typedef struct DECLSPEC_ALIGN(16) _XSAVE_FORMAT {
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
#if defined(_WIN64)
M128A XmmRegisters[16];
BYTE Reserved4[96];
#else
M128A XmmRegisters[8];
BYTE Reserved4[192];
//
// The fields below are not part of XSAVE/XRSTOR format.
// They are written by the OS which is relying on a fact that
// neither (FX)SAVE nor (F)XSTOR used this area.
//
DWORD StackControl[7]; // KERNEL_STACK_CONTROL structure actualy
DWORD Cr0NpxState;
#endif
} XSAVE_FORMAT, *PXSAVE_FORMAT;
typedef struct _FLOATING_SAVE_AREA {
DWORD ControlWord;
DWORD StatusWord;
DWORD TagWord;
DWORD ErrorOffset;
DWORD ErrorSelector;
DWORD DataOffset;
DWORD DataSelector;
BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
DWORD Cr0NpxState;
} FLOATING_SAVE_AREA;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.