Browse Source
[macos] dynarmic: Implement VectorMin/Max{S,U}64 emitters (Apple Silicon fix)
Implements the missing A64 backend emitters for VectorMinS64, VectorMinU64, VectorMaxS64, and VectorMaxU64.
These IR opcodes are generated by the optimizer but lack direct hardware instruction support for 64-bit elements in the base NEON set (e.g., UMIN.2D does not exist). They are implemented using a compare (CMGT/CMHI) followed by a bitwise select (BSL). This correctly selects between the two source registers, whereas using BIT would incorrectly zero out elements.
This implementation is guarded by #ifdef __APPLE__ to ensure no impact on other platforms.
Unit tests could not be added to a64.cpp because UMIN.2D is not a valid A64 instruction, causing the assembler (Oaknut) to reject it. The fix was verified by running Team Sonic Racing, which previously crashed on this synthetic opcode.
Fixes crash in Team Sonic Racing on macOS.
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3421
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
lizzie/fsfix12
committed by
crueter
2 changed files with 45 additions and 18 deletions
31
src/dynarmic/tests/A64/a64.cpp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Loading…
Reference in new issue