I need to manage extended processor state using _xsaveopt64. My current approach with _fxsave64 and _fxrstor64 has been as follows:
alignas(16) char fxStateBuffer[512];
// Saving state
_fxsave64(fxStateBuffer);
// Restoring state
_fxrstor64(fxStateBuffer);
now, i need to transition to using _xsaveopt64 for optimized state management how should I initialize the buffer and manage the state saving and restoration process ?