On 1/22/21 18:51, Jacek Caban wrote:
Signed-off-by: Jacek Caban jacek@codeweavers.com
dlls/ntdll/unix/signal_x86_64.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-)
This (together with saving all the basice and XMM registers) looks like a big overhead on every Nt function call. Is it maybe possible to do that when explicitly requested only (some option)?
I think we still support processors which don't have AVX and thus don't have xsave instruction (which is reported as a separate cpuid bit).
Also, to save at least this part, it is possible to use xsavec which won't be saving anything (aside from the mask) if the ymm high part is zero (that is, in initial state, which is quite the common case when ymm regs were not used before the call; compilers even tend to reset higher part of ymm when done with them). There is user_shared_data->XState.EnabledFeatures which tells if xsave supported at all and user_shared_data->XState.CompactionEnabled tells if xsavec is available.