- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
- [x] I have read and followed the [website policy](https://git.eden-emu.dev/eden-emu/site-policy).
- [ ] I affirm that the content of this pull request body was written and submitted entirely by me, in my own words, and not by an AI agent or LLM.
- [ ] I affirm that I did not read any of this, and understand that my pull request will be closed if I check this box.
- [x] I affirm that, by submitting this pull request, I am responsible for all of the changes contained within these commits.
-------------------
Seven dynarmic fixes, one commit each with a test that fails without it, after a first commit that makes `dynarmic_tests` build again:
- Tests don't build on master: #4513's SM3/SM4 tests call `SM4E` with three operands and `SM3PARTW1/W2` with four (they take two and three), which oaknut 2.0.3 rejects. Only the calls change; the expected values were already right (checked against the Arm pseudocode).
- A32 SHA-1 (`SHA1C/P/M/H/SU0/SU1`) was never translated.
- `CLZ` (16-bit lanes) on AVX-512 got lanes 4-7 wrong.
- 32-bit `SDIV` by zero on x64 returned the dividend instead of 0.
- `FRINT` through the soft-float fallback read the rounding mode and exactness one byte off.
- `SQSHLU` on x64 didn't saturate 8/16-bit lanes and cut 64-bit lanes to 32 bits.
- `SM4E`/`SM4EKEY` on x64: `lea` with the S-box's absolute address throws in Xbyak in a PIE build, so #4513's `A64: SM4` aborts.
- `FCVTZS`/`FCVTZU` (vector) `#64` without SSE4.1 called a null thunk. To reach it on a modern CPU, `DYNARMIC_HOST_FEATURE_OVERRIDE` (CMake option, off by default) lets `DYNARMIC_HOST_FEATURES=<hex mask>` hide host features in test builds, and ctest also runs the suite as SSE2-only.
Tested on Linux x86_64 (AVX-512), each case alone on master (7a6d055094) with these tests, then this PR:
| | master + these tests | this PR |
|---|---|---|
| A32 SHA-1 (2 cases), `A64: SM4` | abort | pass |
| SDIV/UDIV by zero (A32, A64), VRINTX/VRINTA, FRINT, SQSHLU, `A64: CLZ` | fail | pass |
| FCVTZS/FCVTZU `#64` | passes (SSE4.1 path) | passes |
| whole suite | | 141 pass, 1 skipped (needs its variable); as SSE2-only, all 142 pass |
Assisted-by: Claude Opus 5.5 (Aogo) (wrote the patches and tests, rebased them, ran the checks above and wrote this description)
Co-authored-by: AO55 <AO55@reden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4598
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Eden
Eden is a free and open-source (FOSS) Switch 1 emulator started by developer Camille LaVey.
Written in C++, with builds for Windows, Linux, macOS, Android, FreeBSD and more.
Compatibility | Contribute | Building | Download | License
Compatibility
The emulator is capable of running most commercial games at full speed, provided you meet the necessary hardware requirements.
A list of supported games will be available in future. Please be patient.
Check out our website for the latest news on exciting features, monthly progress reports, and more!
Contribute
To contribute to Eden; be it financially, code, bug reports, or otherwise, see our Contributing guidelines.
Documentation
We have a user manual! See our User Handbook.
Building
See the General Build Guide
For information on provided development tooling, see the Tools directory
Download
You can download the latest releases from our release page.
Save us some bandwidth! We have mirrors available as well.
License
Eden is licensed under the GPLv3 (or any later version). Refer to the LICENSE.txt file.
Special thanks
Super special thanks to Cloudflare for preventing the git server from blowing up.
- Yuzu
- Ryujinx
- Sudachi
- Citron
- Torzu
- Suyu
- Ryubing
And everyone who continues or had contributed to the project! <3