mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-25 20:28:48 +08:00
ada67a1924
The fault-time SSE4a fallback was Windows-only because the POSIX signal bridge never carried XMM state: the CONTEXT scratch buffer only held the 17 general-purpose registers, so emulating EXTRQ/INSERTQ there would have computed results from zeroed bytes and discarded the write. Bridge the XMM registers on Linux by copying them between the mcontext's FXSAVE image (kernel sigcontext ABI, libc-independent) and the CONTEXT FltSave slots on capture and write-back, and gate the recovery on that bridge instead of on Windows. Darwin still declines: its XMM area remains unbridged. With this, guest EXTRQ/INSERTQ on Linux hosts without SSE4a (any Intel CPU) resumes with correct register state instead of dying on an unrecovered SIGILL (#328).