As for the OpenThread one im honestly not entirely sure what the best fix for this would even be. As it is pretty much any routine called with a misaligned stack has a chance of breaking due to GCC/Clang movaps / other instructions that MSVC does not generate at all. Even if we did have a wrapper for stack realignment it would need to be applied to every offending routine we came across by testing. From my brief discussion with a programmer way more experienced in this stuff a suggestion to patch GCC with a flag that disables `movaps` was brought up.
In such cases when things can't be sanely fixed universally we are used to add similar sort of workarounds in specific places as needed. I think it is in part a matter of how much of weird code needs to be added in a specific case. I am not talking about generating stack realignment for each function in existence, it is not great and likely not what Windows does. If there is some easy way we can add that for some few specific functions once some app depends on that. Not exactly related, but are you sure MSVC doesn't ever generate movaps? Or maybe it is just less likely to use SSE at all on any occasion initializing / copying local variables? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11069#note_142247