feat(relinker): lower MCOMMIT and RDPRU for Intel with execution tests #2780
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2780"
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 SuarezPM on 2026-10-10T14:37:26Z.
What
Narrowed per 19 Oct review: only the Intel lowering with its execution tests, rebased onto current
main(eaa5c9238). The symbol-index and fuzz parts from the previous head are dropped:mainalready covers the hashed export provider map, and the matcher has been restructured since.MCOMMITlowers in place toSTCplus NOP padding via_inPlace, preserving instruction length.RDPRUlowers through an out-of-line stub that frames the red zone with the existingLeaRspBelowRedZone/LeaRspRestorespills and dispatchesECX: selectors 0/1 (AMD APM Vol. 3 MPERF/APERF, unreadable on Intel hosts) return the host TSC as a disclosed monotonic-counter approximation (ratio always 1.0); other selectors yield zeroEDX:EAX.LOCK-prefixedMCOMMIT/RDPRUstayUnsupported. Sequences containing either instruction lower through_emitOutOfLinewith the same wait-state check.docs/dev/debt/relinker.mdreplaces thedoes not lower RDPRU/MCOMMITentry with the lowering description and its unverified assumptions (TSC-for-MPERF/APERF substitution, non-zero selectors, any console path reportingMCOMMITCF=0).Tested
Host: Linux x86-64 (CachyOS), Ryzen 5 3600, RTX 2060 Super. Execution tests ran on this host. Full Linux/Windows builds need the maintainer manual
build.ymlrun for PR 2780.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T14:37:37Z.
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.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T23:14:12Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/relinker/codegen/tests/Amd64OnlyConverterTests.cppL1809-1810Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/debt/relinker.mddocs/dev/debt/relinker.mddocs/dev/debt/relinker.mdImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T23:57:54Z.
Thanks for reopening this. It no longer merges cleanly into current main. Could you rebase onto current main? The MCOMMIT/RDPRU lowering part overlaps #2771, which is open for the same instructions, so it would help to split this into separate PRs (symbol index, fuzz test, Intel lowering) and leave the lowering to whichever of the two lands first. We'll review and run full CI on the new heads.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-19T09:52:13Z.
@SuarezPM A correction to our 17 Oct comment: #2771 isn't open. It was closed without merging, so
mainstill returns unsupported for MCOMMIT/RDPRU, and the lowering in this PR is still wanted.Since then,
mainhas also covered most of the symbol-index part (GuestModuleBuilder keeps the export type in its hashed provider map), andAmd64OnlyInstructionMatcherhas been restructured. So the request is narrower now: could you rebase just the Intel lowering, with its execution tests, onto currentmain? We'll check MCOMMIT's flag result against the APM in review (this PR sets CF, #2771 cleared it), then run full CI.Imported from boykopovar/AnyPS5. Originally posted by SuarezPM on 2026-10-19T22:22:46Z.
Rebased to current main as requested 19 Oct, narrowed to just the Intel lowering with its execution tests.
eaa5c9238.