test(relinker): check ADX guest state preservation #7531

Open
MarcZX10 wants to merge 7 commits from upstream-pr/7531 into main
MarcZX10 commented 2026-10-18 12:29:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T12:29:57Z.


What

Adds generated-stub regression checks for the ADCX/ADOX lowering in #7173. For both widths and instructions, the test covers every destination except RSP and every source register including RSP, with four flag images and zero, mixed, and all-ones register patterns. It checks the result, every unrelated guest GPR, the guest RSP, arithmetic flags, and the caller's 128-byte red zone.

This is test-only and depends on #7173. The preservation gap and independent validation matrix were reported by plokmklo in #7157; this follow-up credits that contribution and omits the VEX forms whose validity was not established in that discussion.

Tested

  • Linux x86_64, relinker-only build: ctest -R '^adx_lowering$' passes (1/1), including the new preservation matrix.
  • python3 tools/check_conventions.py --base upstream/main passes.
  • git diff --check passes.
  • The hosted relinker checks for #7173 passed on Linux, macOS, macOS x86_64, and ASan; Windows was still running when this follow-up was prepared.

Checklist

  • Based on open PR #7173; no other open PR adds these preservation assertions
  • One topic: generated-stub guest state preservation tests
  • No comments in code except technical debt
  • No unimplemented production paths changed
  • No notes, investigation files, or images added
  • No third-party code added
  • Generic behavior, not title-specific
  • Depends on: #7173
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4909094431 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T12:29:57Z. --- ### What Adds generated-stub regression checks for the ADCX/ADOX lowering in #7173. For both widths and instructions, the test covers every destination except RSP and every source register including RSP, with four flag images and zero, mixed, and all-ones register patterns. It checks the result, every unrelated guest GPR, the guest RSP, arithmetic flags, and the caller's 128-byte red zone. This is test-only and depends on #7173. The preservation gap and independent validation matrix were reported by plokmklo in #7157; this follow-up credits that contribution and omits the VEX forms whose validity was not established in that discussion. ### Tested - Linux x86_64, relinker-only build: `ctest -R '^adx_lowering$'` passes (1/1), including the new preservation matrix. - `python3 tools/check_conventions.py --base upstream/main` passes. - `git diff --check` passes. - The hosted relinker checks for #7173 passed on Linux, macOS, macOS x86_64, and ASan; Windows was still running when this follow-up was prepared. ### Checklist - [x] Based on open PR #7173; no other open PR adds these preservation assertions - [x] One topic: generated-stub guest state preservation tests - [x] No comments in code except technical debt - [x] No unimplemented production paths changed - [x] No notes, investigation files, or images added - [x] No third-party code added - [x] Generic behavior, not title-specific - [x] Depends on: #7173 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
jotitadev commented 2026-10-18 14:44:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-18T14:44:03Z.


Ran this under Rosetta, head 6d7eddffc merged into main a62c724c3.

Machine: Apple M2 Max, macOS 27.2, Xcode 27 clang, relinker-only Release builds, x86_64 (-DCMAKE_OSX_ARCHITECTURES=x86_64, Xcode's Python 3.9.6, run under Rosetta 2) and native arm64.

  • Full ctest: 189/189 on both. On x86_64, adx_lowering_tests runs the new preservation matrix under Rosetta and passes. On arm64 the execution part is compiled out, as expected.
  • Checked that the matrix adds coverage. I dropped the final mov scratch, [rsp] from EmitAdx's epilogue, so the scratch register is not restored. The new test fails (ADX changed an unrelated guest register or produced the wrong destination). #7173's tests on 010ce9b02 still pass with that change.

The red-zone check looks at the wrong side of RSP. The wrapper writes the sentinels at [rsp]..[rsp+120] after lea rsp, [rsp-128], then saves that RSP as the guest RSP (cell 72). So the 128 bytes it checks sit above the guest RSP, in the wrapper's own frame. The red zone that EmitAdx's 144-byte frame steps over is the 128 bytes below the guest RSP, and nothing checks those. To show it, I shrank the lowering's frame from 144 to 16 bytes (kFrameSize and both leas). The scratch and flags spills then land at guest RSP-16 and RSP-8, inside the red zone, and the test still passes.

A version that checks the bytes below the guest RSP works for me under Rosetta:

  • Load the input flags (push/popf) before the lea.
  • Write the sentinels at [rsp-128+8*i].
  • Right after the lowered body, copy those 16 qwords into RIP-relative cells, saving rax around the copy, before the wrapper pushes anything. Then fill RedZone from the cells.

With that version, the real lowering passes. A 16-byte frame and a 128-byte frame both fail with ADX changed the caller red zone. The dropped scratch restore still fails with the register message. The 19-line diff is below. I only ran it under Rosetta, not on a native Linux or Windows x86-64 host.

Test diff
@@ -149,14 +149,13 @@ public:
         rspToCell(48);
         statePtrToCell(0);
         loadCellTo(0, 256);
+        push(0);
+        bytes.push_back(0x9D);
         bytes.insert(bytes.end(), {0x48, 0x8D, 0xA4, 0x24});
         append32(-128);
         bytes.insert(bytes.end(), {0x48, 0xB8});
         append64(preservationSentinel);
-        for (int slot = 0; slot < 16; ++slot) storeAtStack(0, slot * 8);
-        loadCellTo(0, 256);
-        push(0);
-        bytes.push_back(0x9D);
+        for (int slot = 0; slot < 16; ++slot) storeAtStack(0, -128 + slot * 8);
         rspToCell(72);
@@ -170,6 +169,12 @@ public:
         rspToCell(24);
+        raxToCell(80);
+        for (int slot = 0; slot < 16; ++slot) {
+            stackLoad(0, -128 + slot * 8);
+            raxToCell(96 + slot * 8);
+        }
+        loadCellTo(0, 80);
         rspFromCell(72);
@@ -185,7 +190,7 @@ public:
         for (int slot = 0; slot < 16; ++slot) {
-            stackLoad(0, slot * 8);
+            loadCellTo(0, 96 + slot * 8);
             store(0, (34 + slot) * 8);
         }
@@ -255,6 +260,10 @@ private:
+    void raxToCell(const int slot) {
+        bytes.insert(bytes.end(), {0x48, 0x89, 0x05});
+        append32(static_cast<std::int32_t>(4096 + slot - (bytes.size() + 4)));
+    }

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251238352 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#issuecomment-6251238352). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-18T14:44:03Z. --- Ran this under Rosetta, head `6d7eddffc` merged into `main` `a62c724c3`. Machine: Apple M2 Max, macOS 27.2, Xcode 27 clang, relinker-only Release builds, x86_64 (`-DCMAKE_OSX_ARCHITECTURES=x86_64`, Xcode's Python 3.9.6, run under Rosetta 2) and native arm64. - Full ctest: 189/189 on both. On x86_64, `adx_lowering_tests` runs the new preservation matrix under Rosetta and passes. On arm64 the execution part is compiled out, as expected. - Checked that the matrix adds coverage. I dropped the final `mov scratch, [rsp]` from `EmitAdx`'s epilogue, so the scratch register is not restored. The new test fails (`ADX changed an unrelated guest register or produced the wrong destination`). #7173's tests on `010ce9b02` still pass with that change. **The red-zone check looks at the wrong side of RSP.** The wrapper writes the sentinels at `[rsp]..[rsp+120]` after `lea rsp, [rsp-128]`, then saves that RSP as the guest RSP (cell 72). So the 128 bytes it checks sit above the guest RSP, in the wrapper's own frame. The red zone that `EmitAdx`'s 144-byte frame steps over is the 128 bytes below the guest RSP, and nothing checks those. To show it, I shrank the lowering's frame from 144 to 16 bytes (`kFrameSize` and both `lea`s). The scratch and flags spills then land at guest RSP-16 and RSP-8, inside the red zone, and the test still passes. A version that checks the bytes below the guest RSP works for me under Rosetta: - Load the input flags (`push`/`popf`) before the `lea`. - Write the sentinels at `[rsp-128+8*i]`. - Right after the lowered body, copy those 16 qwords into RIP-relative cells, saving `rax` around the copy, before the wrapper pushes anything. Then fill `RedZone` from the cells. With that version, the real lowering passes. A 16-byte frame and a 128-byte frame both fail with `ADX changed the caller red zone`. The dropped scratch restore still fails with the register message. The 19-line diff is below. I only ran it under Rosetta, not on a native Linux or Windows x86-64 host. <details><summary>Test diff</summary> ```diff @@ -149,14 +149,13 @@ public: rspToCell(48); statePtrToCell(0); loadCellTo(0, 256); + push(0); + bytes.push_back(0x9D); bytes.insert(bytes.end(), {0x48, 0x8D, 0xA4, 0x24}); append32(-128); bytes.insert(bytes.end(), {0x48, 0xB8}); append64(preservationSentinel); - for (int slot = 0; slot < 16; ++slot) storeAtStack(0, slot * 8); - loadCellTo(0, 256); - push(0); - bytes.push_back(0x9D); + for (int slot = 0; slot < 16; ++slot) storeAtStack(0, -128 + slot * 8); rspToCell(72); @@ -170,6 +169,12 @@ public: rspToCell(24); + raxToCell(80); + for (int slot = 0; slot < 16; ++slot) { + stackLoad(0, -128 + slot * 8); + raxToCell(96 + slot * 8); + } + loadCellTo(0, 80); rspFromCell(72); @@ -185,7 +190,7 @@ public: for (int slot = 0; slot < 16; ++slot) { - stackLoad(0, slot * 8); + loadCellTo(0, 96 + slot * 8); store(0, (34 + slot) * 8); } @@ -255,6 +260,10 @@ private: + void raxToCell(const int slot) { + bytes.insert(bytes.end(), {0x48, 0x89, 0x05}); + append32(static_cast<std::int32_t>(4096 + slot - (bytes.size() + 4))); + } ``` </details> Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-18 16:51:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T16:51:20Z.


Fixed in f1fcb95f4. The fixture now plants and reads sentinels in the 128 bytes below the guest RSP. It captures those bytes immediately after the lowered instruction and before the wrapper pushes registers, then checks them after restoring the wrapper state. The focused Linux adx_lowering CTest passes (1/1); git diff --check and python3 tools/check_conventions.py --base upstream/main pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252529401 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#issuecomment-6252529401). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T16:51:20Z. --- Fixed in `f1fcb95f4`. The fixture now plants and reads sentinels in the 128 bytes below the guest RSP. It captures those bytes immediately after the lowered instruction and before the wrapper pushes registers, then checks them after restoring the wrapper state. The focused Linux `adx_lowering` CTest passes (1/1); `git diff --check` and `python3 tools/check_conventions.py --base upstream/main` pass.
MarcZX10 commented 2026-10-18 18:53:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T18:53:21Z.


Thanks for the independent Rosetta check and the short-frame negative control. The updated head f1fcb95f4 now places and checks the sentinel region below the guest RSP, and the focused Linux test plus Linux/macOS/Rosetta/Windows relinker CI are green. I also see the PR is currently DIRTY against main; this looks like a base update/rebase item before merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253788186 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#issuecomment-6253788186). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T18:53:21Z. --- Thanks for the independent Rosetta check and the short-frame negative control. The updated head `f1fcb95f4` now places and checks the sentinel region below the guest RSP, and the focused Linux test plus Linux/macOS/Rosetta/Windows relinker CI are green. I also see the PR is currently DIRTY against main; this looks like a base update/rebase item before merge.
THEMANnt commented 2026-10-28 12:01:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T12:01:24Z.

Review: COMMENTED


Reviewed 3fbc2fd4913e7feede88f43a78c5cc241e37b11b — comment; dependent integration remains pending.

Fresh Windows/GCC 15.2 Release relinker-only build: adx_lowering passed 1/1. The preservation matrix checks both ADCX/ADOX widths, guest registers including RSP sources, arithmetic flags and the caller's red zone. The author merge base has no adx_lowering_tests target; that absence is expected, not a product regression.

This head includes the production lowering from its declared dependency #7173, which is still open at the refreshed head db9db10676a6ae4215b7854126555882ac6661bb. I have not completed a full review of that underlying lowering or validated this test delta after landing/retargeting the dependency. The local pass supports the submitted test head, not final approval of the combined production change. Recheck that integration before final approval. No game or full product execution is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5682244284 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#pullrequestreview-5682244284). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-28T12:01:24Z. **Review:** COMMENTED --- Reviewed `3fbc2fd4913e7feede88f43a78c5cc241e37b11b` — comment; dependent integration remains pending. Fresh Windows/GCC 15.2 Release relinker-only build: `adx_lowering` passed 1/1. The preservation matrix checks both ADCX/ADOX widths, guest registers including RSP sources, arithmetic flags and the caller's red zone. The author merge base has no `adx_lowering_tests` target; that absence is expected, not a product regression. This head includes the production lowering from its declared dependency #7173, which is still open at the refreshed head `db9db10676a6ae4215b7854126555882ac6661bb`. I have not completed a full review of that underlying lowering or validated this test delta after landing/retargeting the dependency. The local pass supports the submitted test head, not final approval of the combined production change. Recheck that integration before final approval. No game or full product execution is claimed.
THEMANnt commented 2026-10-29 06:23:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T06:23:33Z.

Review: COMMENTED


Re-reviewed 4fc006aa12fcffee2efcc209d95ba29cba9f829c against 2227f1366188cda5699dd20e2e756a18006a5d4b. The added matrix checks both instruction/width combinations, every supported destination and every source including RSP, unrelated GPRs, arithmetic flags, guest RSP, and the caller's 128-byte red zone. No actionable issue found in these assertions.

Windows/GCC 15.3 Release: built adx_lowering_tests and passed its registered CTest. Its execution branch is Linux/macOS-only, so that unmodified Windows pass does not exercise the preservation matrix. I therefore compiled a separate review-only adapter replacing mmap/mprotect with Win32 page allocation/protection and using an explicit SysV ABI pointer for the generated preservation wrapper. With the submitted arithmetic, lowering and preservation checks unchanged, it passed all 11,520 matrix cases plus the existing execution/native-ADX comparisons on this ADX-capable x64 host.

Independent negative control: a separate copy reduces the spill frame from 144 to 128 bytes with matching stack adjustments. It compiles but the matrix exits 1 with ADX changed the caller red zone; the submitted implementation passes. No tracked source was modified by either adapter.

The declared prerequisite #7173 is still open. This validates the submitted combined branch, not integration after that dependency lands. Native Linux/macOS and actual Rosetta execution were not independently run locally, so I am leaving a formal COMMENT with the execution evidence rather than treating this as merge readiness.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693675106 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#pullrequestreview-5693675106). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T06:23:33Z. **Review:** COMMENTED --- Re-reviewed `4fc006aa12fcffee2efcc209d95ba29cba9f829c` against `2227f1366188cda5699dd20e2e756a18006a5d4b`. The added matrix checks both instruction/width combinations, every supported destination and every source including RSP, unrelated GPRs, arithmetic flags, guest RSP, and the caller's 128-byte red zone. No actionable issue found in these assertions. Windows/GCC 15.3 Release: built `adx_lowering_tests` and passed its registered CTest. Its execution branch is Linux/macOS-only, so that unmodified Windows pass does not exercise the preservation matrix. I therefore compiled a separate review-only adapter replacing mmap/mprotect with Win32 page allocation/protection and using an explicit SysV ABI pointer for the generated preservation wrapper. With the submitted arithmetic, lowering and preservation checks unchanged, it passed all 11,520 matrix cases plus the existing execution/native-ADX comparisons on this ADX-capable x64 host. Independent negative control: a separate copy reduces the spill frame from 144 to 128 bytes with matching stack adjustments. It compiles but the matrix exits 1 with `ADX changed the caller red zone`; the submitted implementation passes. No tracked source was modified by either adapter. The declared prerequisite #7173 is still open. This validates the submitted combined branch, not integration after that dependency lands. Native Linux/macOS and actual Rosetta execution were not independently run locally, so I am leaving a formal COMMENT with the execution evidence rather than treating this as merge readiness.
MarcZX10 commented 2026-11-02 04:56:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:56:56Z.

Review: COMMENTED


Replies checked — docs duplicate confirmed, one answer needed, no code finding

The docs file at this head has two identical "--to-rosetta lowers what Rosetta lacks" entries, which is the duplicate a reviewer reported after merge with main.

What I ran

  • Live head 2d2915b3f839bba156db404e0f9092c448b0116c (OPEN, unchanged from batch).
  • gh api comments, reviews and review comments on #7531, newer than 2026-10-18T18:53:21Z, excluding MarcZX10 and bots.
  • gh pr view 7531 --json body,statusCheckRollup; gh pr view 7173 --json state.
  • git show 2d2915b3:docs/dev/debt/relinker.md; git merge-tree --write-tree upstream/main 2d2915b3, then a grep count of the merged file.
  • Nothing built or run.

Results

Check Result Note
Live head matches batch OPEN
merge-tree vs upstream/main exit 0 477 behind, 8 ahead
relinker.md entries at head 2 (L49-L50) upstream/main has 1
Merged relinker.md entries 2 the duplicate remains after merge
Dependency #7173 OPEN body says this PR depends on it
Hosted relinker (ubuntu, macOS, windows), relinker-asan, conventions SUCCESS windows, linux, register-context, write-watch SKIPPED

Findings

  • @oneandonlydean (2026-10-28 14:57 UTC) asks for one docs entry, with the ADCX/ADOX wording on main's current line. Confirmed the duplicate. Answer needed: make that change in the stack's docs commit (the same duplicate exists in #7173).
  • @blawesom (2026-10-29) reports a Linux run with no findings, and @THEMANnt (2026-10-28, 10-29) reports Windows runs passing. No answer needed for these.
  • @THEMANnt asks that the integration be rechecked after #7173 lands. Dependency is OPEN, so that remains pending. No answer needed beyond the dependency note.

Sources

Not verified

  • Code and test behaviour of the ADCX/ADOX tests, beyond the reviewers' reports. Not run here.
  • The Windows and Linux independent runs quoted by reviewers.
  • Any build or test result.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732246410 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#pullrequestreview-5732246410). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T04:56:56Z. **Review:** COMMENTED --- # Replies checked — docs duplicate confirmed, one answer needed, no code finding The docs file at this head has two identical "`--to-rosetta` lowers what Rosetta lacks" entries, which is the duplicate a reviewer reported after merge with main. ## What I ran - Live head `2d2915b3f839bba156db404e0f9092c448b0116c` (OPEN, unchanged from batch). - `gh api` comments, reviews and review comments on #7531, newer than 2026-10-18T18:53:21Z, excluding MarcZX10 and bots. - `gh pr view 7531 --json body,statusCheckRollup`; `gh pr view 7173 --json state`. - `git show 2d2915b3:docs/dev/debt/relinker.md`; `git merge-tree --write-tree upstream/main 2d2915b3`, then a grep count of the merged file. - Nothing built or run. ## Results | Check | Result | Note | |---|---|---| | Live head | matches batch | OPEN | | `merge-tree` vs upstream/main | exit 0 | 477 behind, 8 ahead | | `relinker.md` entries at head | 2 (L49-L50) | upstream/main has 1 | | Merged `relinker.md` entries | 2 | the duplicate remains after merge | | Dependency #7173 | OPEN | body says this PR depends on it | | Hosted relinker (ubuntu, macOS, windows), relinker-asan, conventions | SUCCESS | `windows`, `linux`, `register-context`, `write-watch` SKIPPED | ## Findings - @oneandonlydean (2026-10-28 14:57 UTC) asks for one docs entry, with the ADCX/ADOX wording on main's current line. Confirmed the duplicate. Answer needed: make that change in the stack's docs commit (the same duplicate exists in #7173). - @blawesom (2026-10-29) reports a Linux run with no findings, and @THEMANnt (2026-10-28, 10-29) reports Windows runs passing. No answer needed for these. - @THEMANnt asks that the integration be rechecked after #7173 lands. Dependency is OPEN, so that remains pending. No answer needed beyond the dependency note. ## Sources - https://github.com/boykopovar/AnyPS5/blob/2d2915b3f839bba156db404e0f9092c448b0116c/docs/dev/debt/relinker.md#L49-L50 ## Not verified - Code and test behaviour of the ADCX/ADOX tests, beyond the reviewers' reports. Not run here. - The Windows and Linux independent runs quoted by reviewers. - Any build or test result.
catminou4 commented 2026-11-25 06:20:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by catminou4 on 2026-11-25T06:20:29Z.

Review: CHANGES_REQUESTED


Built on Linux x86_64 (relinker-only Release build, GCC), merged into current main (3cab484efb).

  • This branch merged into main: ctest -R '^adx_lowering$' passes.
  • Against the current head of #7173 (merged into main, with this PR's AdxLoweringTests.cpp on top), adx_lowering_tests fails immediately with ADCX address-size source was mistaken for RIP-relative. #7173 has since gained 84075b7712 (relocate address-size RIP-relative ADCX/ADOX sources) and 5f8c0b7958, so it now expects sixth->Memory->RipRelative to be true. This branch still asserts the opposite.
  • This branch carries its own rewritten copies of the #7173 commits (0920ad052d…b11ce25c1a), not its current commits. Once #7173 merges, this will conflict in AdxLowering.cpp, AdxLoweringTests.cpp and docs/dev/debt/relinker.md.

The new preservation matrix itself (every destination except RSP and every source, four flag images, unrelated GPRs, RSP and the 128-byte red zone) looks like the right check. Rebase it on the current #7173 head (or on main after #7173 merges) and keep only the test commits.

Not mergeable as is: the branch is stale against its dependency.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6052756138 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#pullrequestreview-6052756138). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T06:20:29Z. **Review:** CHANGES_REQUESTED --- Built on Linux x86_64 (relinker-only Release build, GCC), merged into current `main` (3cab484efb). - This branch merged into `main`: `ctest -R '^adx_lowering$'` passes. - Against the current head of #7173 (merged into `main`, with this PR's `AdxLoweringTests.cpp` on top), `adx_lowering_tests` fails immediately with `ADCX address-size source was mistaken for RIP-relative`. #7173 has since gained 84075b7712 (relocate address-size RIP-relative ADCX/ADOX sources) and 5f8c0b7958, so it now expects `sixth->Memory->RipRelative` to be true. This branch still asserts the opposite. - This branch carries its own rewritten copies of the #7173 commits (0920ad052d…b11ce25c1a), not its current commits. Once #7173 merges, this will conflict in `AdxLowering.cpp`, `AdxLoweringTests.cpp` and `docs/dev/debt/relinker.md`. The new preservation matrix itself (every destination except RSP and every source, four flag images, unrelated GPRs, RSP and the 128-byte red zone) looks like the right check. Rebase it on the current #7173 head (or on `main` after #7173 merges) and keep only the test commits. Not mergeable as is: the branch is stale against its dependency.
ligmaSec commented 2026-12-03 12:01:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:01:05Z.

Review: COMMENTED


Built this head with ANYPS5_RELINKER_ONLY=ON and ran adx_lowering on Linux x86-64. The fixture passed its guest state preservation checks.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6169355397 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7531#pullrequestreview-6169355397). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T12:01:05Z. **Review:** COMMENTED --- Built this head with `ANYPS5_RELINKER_ONLY=ON` and ran `adx_lowering` on Linux x86-64. The fixture passed its guest state preservation checks. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/7531:upstream-pr/7531'
git switch 'upstream-pr/7531'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/7531'
git switch 'upstream-pr/7531'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/7531'
git switch 'upstream-pr/7531'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/7531'
git switch 'main'
git merge --squash 'upstream-pr/7531'
git switch 'main'
git merge --ff-only 'upstream-pr/7531'
git switch 'main'
git merge 'upstream-pr/7531'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7531
No description provided.