fix(relinker): lower MCOMMIT and RDPRU in --to-intel instead of failing the relink #2771
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2771"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Alessandro-GC7 on 2026-10-10T14:02:54Z.
What
--to-intellowered MONITORX and MWAITX in place but still returnedUnsupportedfor MCOMMIT and RDPRU, which aborts the whole relink when a converted title contains either. Both are AMD-only and#UDon Intel hosts, so they have to be neutralized like the other no-equivalent instructions. This closes the "--to-inteldoes not lower RDPRU/MCOMMIT" technical-debt item.F3 0F 01 FA) is lowered in place toCLC(plus NOP padding), guarded by the same_validWaitcheck as MONITORX/MWAITX so a LOCK-prefixed or over-length encoding still fails. MCOMMIT's only architecturally observable effect isrFLAGS.CF(cleared on success); on host memory with no error-logging resource reporting an error it always succeeds, soCLCreproduces the result (AMD64 APM, pub. 24594).0F 01 FD) is lowered through an out-of-line stub that writes 0 into EDX:EAX with two flag-preservingMOVs (RDPRU leavesrFLAGSunchanged). The host exposes no MPERF/APERF process-register counters; zero is also what RDPRU returns for an unsupported register selector.docs/dev/TechnicalDebt.mdis updated accordingly. The two converter tests that used RDPRU as their unsupported-instruction sample now use a LOCK-prefixed MWAITX, which still fails.If you'd prefer MCOMMIT to be a plain NOP (as MONITORX is) or RDPRU to keep failing the relink, say so — both are easy to change; I went with the most faithful neutralization.
Tested
Windows, relinker-only build (
-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON, GCC 16.2.0 / Ninja).ctestgreen: 100% of 93 tests. Added matcher cases toamd64_only_converterfor MCOMMIT (base, prefixed, LOCK-rejected, over-length) and RDPRU (trampoline + the stub zeroes EDX:EAX). No game title tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T14:03:06Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Pull request closed