Repository navigation
x64_recomp: SSE/SSE2 scalar floating-point and XMM move/bitwise emitters (X64-RECOMP-SSE-SCALAR) - #1202
Closed
quietfold wants to merge 1 commit into
Closed
x64_recomp: SSE/SSE2 scalar floating-point and XMM move/bitwise emitters (X64-RECOMP-SSE-SCALAR)#1202quietfold wants to merge 1 commit into
quietfold wants to merge 1 commit into
Conversation
…ers (X64-RECOMP-SSE-SCALAR)
4 tasks done
Collaborator
|
Hi @IlyassRS3, thanks for this pull request. It currently conflicts with AI-assisted (Claude Code, Claude Opus 5.5). |
aslan2142
requested changes
Dec 1, 2026
aslan2142
left a comment
Collaborator
There was a problem hiding this comment.
This PR cannot merge in its current state:
- Merge conflict with
mainintools/x64_recomp.py. - No green CI run on current head
e61deb5.
Please rebase onto current main and obtain a green CI run.
(AI-assisted review.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: X64-RECOMP-SSE-SCALAR (#14 (comment))
What and why
Advances Next Step #2 of
docs/mobile.mdby adding legacy0FSSE/SSE2 scalar floating-point, conversion, comparison, and 128-bit XMM move/bitwise decoding and arm64 emission totools/x64_recomp.py(independent of#1174and conflict-free with all openx64_recompPRs).0FSSE/SSE2 decoder (_OF_SSE): decodesxmm0–xmm15(("x", reg, size)), width specsx(16B) andy(4/8B viaREX.W, ignoring0x66), mandatoryF2/F3precedence over66, and keeps unprefixed MMX encodings as unhandled"simd".Asm): addsfldr/fstr(S/D/Q),fadd/fsub/fmul/fdiv/fsqrt,fcmp/fcsel,fmov_r/fmov_to_fp/fmov_to_gpr,fcvt_s2d/fcvt_d2s,scvtf/fcvtzs/fcvtns,vins0,vand16b/vbic16b/vorr16b/veor16b, plus EL1CPACR_EL1.FPENenable inbuild_test_kernelfor bare-metal QEMU runs.XMAP:xmm0–xmm15->v0–v15, scratchv28–v30):add/sub/mul/div/sqrt/min/max(ss/sd),cvt*, and registermovss/movsdwrite lane 0 viainsso upper XMM bits are preserved; memorymovss/movsdandmovd/movqzero-extend to 128 bits.minss/minsd/maxss/maxsdimplement exact x86 NaN and±0.0second-operand rules viafcmp+fcsel(mi/gt) while preserving liveNZCV.ucomis*/comis*(FCMP_KIND) map all 16 x86 conditions across ordered and unordered (PF/ZF/CF,OF=SF=AF=0) results on both the arm64NZCVfast path and materializedCTX_EFLAGS(includingsetcc,cmov,pushf,lahf,adc/sbb/cmc, and interveninginc/dec).cvttss2si/cvttsd2si/cvtss2si/cvtsd2si, 32/64-bit) return x86 integer indefinite (INT32_MIN/INT64_MIN) forNaNand overflow (including2147483647.5forcvtsd2sivscvttsd2si) while preserving liveNZCV.movaps/movups/movapd/movupd/movdqa/movdqu) and bitwise ops (xorps/xorpd/pxor,andps/andpd/pand,andnps/andnpd/pandnas(~dst) & src,orps/orpd/por)._ctx_jcc_regemittedtst_i(w, EF_CF | EF_ZF)(0x41is not a valid arm64 bitmask immediate) on cross-blockja/jbe/seta/setbe; replaced withmovz+tst_r._classifytaggedlahf/sahfaskind="conv"instead of"alu", making their_emit_aluhandler unreachable.tests/test_x64_recomp_sse.py): 16 tests covering decoding, LLVM 21–verified arm64 FP/SIMD encodings, translation/liveness, and 8 end-to-end execution tests (SSEExecTests, which run automatically with the Mach-O runner once#1174lands or under QEMU).Tested
main:python3 -I tests/test_x64_recomp_sse.py -v(8 cross-platform passed, 8 exec cleanly skipped without QEMU),tests/test_x64_recomp.py,tests/test_recomp_census.py,tests/test_ci_registration.py,tests/test_text_write_line_endings.py,tests/test_tool_startup.py, all 11tests/test_docs_*.py,tests/test_i18n_index.py,compileall,make_game.py --help,check_no_game_data.py: all passed.#1174in a scratch checkout):tests/test_x64_recomp_sse.py16/16 passed (all 8SSEExecTestsexecuted natively) andtests/test_x64_recomp.py46/46 passed.git apply --check) against openx64_recompPRs#847,#950,#1120,#1121, and#1174.GPUs tested: n/a (CPU x86-64 -> arm64 recompiler; tested natively on Apple M5 arm64, macOS 27.2.1)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.