sharpemu/src
kuba ab0e77e5d6
[CPU] Emulate and rewrite SHA extension instructions on hosts without SHA (#909)
* [CPU] Emulate the SHA extensions when the host raises #UD

The PS5 CPU supports SHA1RNDS4/SHA1NEXTE/SHA1MSG1/SHA1MSG2 and
SHA256RNDS2/SHA256MSG1/SHA256MSG2, and titles use them without a CPUID
check. Rosetta 2 does not translate them, so Poppy Playtime (UE4) aborted
with SIGILL on sha1msg1 on Apple Silicon. Decode the faulting instruction
and compute it from the saved XMM registers, like the SSE4a fallback.

* [Loader] Rewrite SHA extension instructions at load time on hosts without SHA

A #UD trap per SHA instruction is far too slow for titles that hash large
files: Poppy Playtime took 300k traps and the stall watchdog stopped it.
The red-zone patcher now replaces each SHA instruction with general-register
code in its trampoline, keeping all other registers and the flags. The trap
handler stays as the fallback for sites that cannot be patched.
2026-09-26 14:20:08 +03:00
..
SharpEmu.CLI [GUI/CLI] Add support for console settings and language selection (#907) 2026-09-26 00:17:25 +03:00
SharpEmu.Core [CPU] Emulate and rewrite SHA extension instructions on hosts without SHA (#909) 2026-09-26 14:20:08 +03:00
SharpEmu.DebugClient Add live debugger frontend and mutex stall recovery (#383) 2026-07-17 22:41:07 -06:00
SharpEmu.Debugger Add live debugger frontend and mutex stall recovery (#383) 2026-07-17 22:41:07 -06:00
SharpEmu.GUI [GUI/CLI] Add support for console settings and language selection (#907) 2026-09-26 00:17:25 +03:00
SharpEmu.HLE [CPU] Cache readable stack ranges per thread for import arguments on POSIX (#911) 2026-09-26 14:19:48 +03:00
SharpEmu.LibAtrac9 Sdl backend (#670) 2026-07-28 03:33:26 +03:00
SharpEmu.Libs [SpirvTranslator] Use a flat input for v_interp_mov P0 on MoltenVK (#910) 2026-09-26 14:19:57 +03:00
SharpEmu.Logging Reject undefined numeric LogLevel values (#390) 2026-07-18 15:47:19 +03:00
SharpEmu.ShaderCompiler [SpirvTranslator] Use a flat input for v_interp_mov P0 on MoltenVK (#910) 2026-09-26 14:19:57 +03:00
SharpEmu.ShaderCompiler.Metal fix(gen5): handle runtime and shader buffer paths (#904) 2026-09-26 00:37:09 +03:00
SharpEmu.ShaderCompiler.Vulkan [SpirvTranslator] Use a flat input for v_interp_mov P0 on MoltenVK (#910) 2026-09-26 14:19:57 +03:00
SharpEmu.SourceGenerators feat(hle): prefer loaded guest exports for selected registrations (#844) 2026-08-25 22:32:57 +02:00