mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 16:00:44 +02:00
We were creating a copy of the FEXCore::Core::CPUState object when we didn't need to. We can pass the host thread's CPUState frame through to the creation handlers since it's read-only (so modify it to be const). We then just move the RAX and RSP setting to /after/ the CreateThread handling instead of before. This reduces stack usage from ~1392 bytes to ~80 bytes.