eden/src/dynarmic
rayman30 44fa2805d6
Some checks failed
tx-src / sources (push) Has been cancelled
Check Strings / check-strings (push) Has been cancelled
[macos, dynarmic] Implement VectorMin/Max{S,U}64 emitters (Apple Silicon fix) (#3421)
[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>
2026-05-03 04:29:49 +02:00
..
CMakeModules [dynarmic] nuke mcl dependency (#3777) 2026-03-27 01:11:49 +01:00
src/dynarmic [macos, dynarmic] Implement VectorMin/Max{S,U}64 emitters (Apple Silicon fix) (#3421) 2026-05-03 04:29:49 +02:00
tests [macos, dynarmic] Implement VectorMin/Max{S,U}64 emitters (Apple Silicon fix) (#3421) 2026-05-03 04:29:49 +02:00
.clang-format [cmake] refactor: Use CPM over submodules (#143) 2025-08-04 04:50:14 +02:00
.gitignore [cmake] refactor: Use CPM over submodules (#143) 2025-08-04 04:50:14 +02:00
CMakeLists.txt [dynarmic, cmake] Assorted RISC-V build fixes (#3797) 2026-04-06 19:11:47 +02:00