Repository navigation
Conversation
…tore's stub A 4-byte 256-bit store at the start of a segment followed by an AMD-only site that can only be emitted in place (RDSEED, CLWB, MOVNTSS, ...) had no preceding instruction to move, so WindowPlacer gave up with "No room for a jump to the stub of 256-bit store within its neighbours or a nearby island". Try a last-resort window placement that allows EmitOutOfLine to use the in-place lowering for the follower. Preferred preceding and following moves are unchanged.
|
Thank you for your contribution! Authors with no pull requests merged into |
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.
What
A Rosetta 256-bit store occupies 4 bytes, so
Amd64OnlyConverterreplaces it with a stub and jumps there.WindowPlacercan move a neighbouring instruction into that stub to free the 5 bytes the jump needs. When the store starts a segment and the next instruction is an AMD-only site that can only be emitted in place (RDSEED,CLWB,MOVNTSS/MOVNTSD,MONITORX/MWAITX, ...), there was no preceding instruction to move and the follower could not leave its place, so conversion failed withNo room for a jump to the stub of 256-bit store within its neighbours or a nearby island.This adds a last-resort window placement that asks
EmitOutOfLineto fall back to the in-place lowering for that follower, so the store's stub carries the replacement and the following bytes are freed. Preferred preceding and following moves are tried first, so the existing preference test is unchanged.Tested
Windows 11, MinGW-w64 GCC 16.2.0,
-DANYPS5_RELINKER_ONLY=ON, branch based onmainat4997726a5.cmake --build build-relinkerandctest --test-dir build-relinker --output-on-failure: 32/32 pass.New cases in
converterWideStoreWindowscover a 256-bit store followed by RDSEED, by CLWB and by a RIP-relative MOVNTSS, and assert the stub body, length, report count and relocation target. The standalone conversion fixture that previously failed now reportsok trampolines=1 reports=1 site off=512 len=7 body=19.tools/check_conventions.pyandtools/pr_overlap.pywere not run because this environment has no Python; the overlap below was checked manually through the GitHub API.Checklist
main; no other open PR implements the same functions. Overlap: test(relinker): execute the in-place Rosetta replacements #8236 and fix(relinker): resync the syscall scan past undecodable data regions #8042 add tests toAmd64OnlyConverterTests.cpp; fix(relinker): probe masked store elements before the store under --to-rosetta #8142 touchesAmd64OnlyInstructionMatcher.cpp; none implements this fallback.NotImplemented_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)