On Tue Mar 12 20:57:49 2024 +0000, Paul Gofman wrote:
It depends on implementation details. Unless I'm missing something, we
could just not touch them on restore which would preserve them for free. I think any xstate may be potentially clobbered on entering NtSetContextThread C function (that's the main concern for the patch in the present form)? So we should assume that if we didn't save all the xstate implicitly we are initializing that to init? As far as avx512 is concerned, it is used even in memcpy now and will be clobbered once even memcpy is used.
The main difference is that avx is usually cheap to store (or, worst
case, still much cheaper than avx512). I don't know if anything depends on it specifically, through. So should we probably stop now on keeping existing avx save and assuming other xstate being in init state in syscalls when we need it?
I send another MR which adds more xstate bits with this patch in it (as the patch in the current form probably doesn't make much sense alone): https://gitlab.winehq.org/wine/wine/-/merge_requests/5346.