cpu: keep memory reads whose value is unused in the shared lowering #660

Merged
grahamster2 merged 4 commits from upstream-pr/666 into main 2026-11-23 14:50:18 +00:00
grahamster2 commented 2026-11-22 18:30:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by grahamster2 on 2026-11-22T18:30:23Z.


Problem

#437 made cpu_switch_aot keep every executed guest memory read, following the rule on that PR: an executed read keeps its fault behaviour even when the value or the CMP/TEST flags are unused, each source memory operand is evaluated once, at its own width, in guest order, and a private frame read may stay optimizable when it is provably valid. The survey on #437 found the same bug in the shared integer lowering, ffx_version_query.lower, which cpu_exe_aot, bink_*, ffx_* and the x87 profile use. Its load<T> is a memcpy. At /O2 the compiler drops a load whose value is overwritten, or whose CMP/TEST flags nothing reads, so a null or unmapped operand returns where the original raises an access violation. (CMOVcc with a memory source already used a volatile read on main.)

Change

tools/ffx_version_query.py, following #437's emitted shape:

  • Each instruction's memory operand is read once, at its own width, into const T mem = load_always<T>(addr);, declared before the rest of the statement. Every use names mem, so the read comes before any write of the instruction. A read whose value nothing uses becomes the declaration plus static_cast<void>(mem);:
    block_1012: { const uint32_t mem = load_always<uint32_t>(rcx + 0ull); { const uint32_t a = mem, b = static_cast<uint32_t>(0ull), ... } }
    block_1019: { const uint8_t mem = load_always<uint8_t>(rcx + 0ull); zero = ((mem & 1ull) == 0); carry = false; overflow = false; }
    
    This applies to operand() (MOV/MOVZX/MOVSX, CMP, TEST, ALU and read-modify-write forms, CMOVcc, shifts and rotates, BMI, MUL/DIV, CRC32, PINSR*, ...), to XADD/CMPXCHG, and to the SSE/AVX sources that read guest memory with memcpy or load<> (VMOVQ/VMOVSD, MOVDQU, VMOVDQU, VMOVUPS, SHA, AES/PCLMUL, SSE2 saturating/multiply, SSE4.1, PMOVSX/ZX, VPBROADCAST*, VPSLLV*, scalar FMA, and the AVX2 forms that already used load_always inline).
  • A read-modify-write such as ADD [mem], reg performs one read and then its store. The CMOVcc special case is removed: operand() reads its source before the condition is evaluated.
  • load_always is now one volatile access at the operand's width for arithmetic types, so a 4-byte operand is one 4-byte read. Vector types (std::array, __m128i) keep the byte-by-byte volatile loop. It faults on exactly the addresses a single access would, with no write in between.
  • String instructions (MOVS, LODS, SCAS, CMPS) read each element through load_always in every iteration. XLATB does too.
  • tools/x87_lower.py: statement() takes the read template, and the integer lowering passes load_always for x87 memory operands (FLD, FILD, the arithmetic and compare forms, FLDCW).
  • Private frame: an operand [rsp + d] with no index that lies inside the function's own word frame[16] stays an ordinary load. This is allowed only when no instruction outside the host replacements names RSP as a register and no initial line, binding or exit mentions rsp, so RSP points at the array throughout. cpu_exe_aot's operands ([rsp+32..72), with its SUB/ADD RSP, 72 replaced by host ops) are exactly this case, and its generated C++ keeps load<.

tests/cpu/lower_dead_read.{asm,def,py} and cpu_aot_lower_dead_reads (CMake) are a new fixture modelled on cpu_aot_dead_reads. Every export stores 1 to a trace word before its read and 2 after it:

  • read_dead overwrites the value it loads;
  • cmp_dead and test_dead read memory whose flags nothing reads;
  • cmov_dead is a CMOVNE that never moves;
  • add_in_place is add dword ptr [rcx], edx followed by sete;
  • read_live is the control;
  • fld_dead is an x87 fld qword ptr [rcx] followed by fstp st(0).

The translation is built by the preset's build and again by a separate cl /O2 /W4 /EHsc /LD command. The original and both translations run through guarded_call (__try/GetExceptionCode()), each with fresh trace words and a fresh page. The test compares the exception code, RAX, the trace and the page. A source control checks that each export has exactly one load_always<T> at the operand's width and no load<. The asm declares ; coverage: source cpu_aot_lower_dead_reads, so form_coverage.py needs no entry.

Updated control regexes: the mutation controls in string_ops.py, xlatb.py, x87_iarith.py and x87_integers.py match the generated text, so they now match load_always<. The x87 ones accept either load or load_always. The controls still mutate the same sites, and each still has to disagree with the reference.

docs/experiments.md describes the rule and the fixture next to the CMOVcc/SETcc paragraph of the shared lowering.

Evidence

Environment: Windows 11 Pro build 26200, VS Build Tools 2026 18.3 / MSVC 19.50.35725, ML64, Windows SDK 10.0.26100, Python 3.12 (pefile 2024.8.26, iced-x86 1.21.0). Commit 3be2e29 on main 2bb9ee0.

Before and after. I emitted the new fixture with main's tools/ (2bb9ee0) and with this branch, then compiled each /Od and /O2 (cl /nologo /EHsc /LD). Each export was called with a null RCX under guarded_call. Trace 1,0 means only the first marker was written.

export original main /Od main /O2 branch (Debug preset) branch /O2
read_dead (overwritten MOV load) 0xc0000005, trace 1,0 0xc0000005 returns 5, trace 1,2 0xc0000005, 1,0 0xc0000005, 1,0
cmp_dead (CMP m32, 0, flags unused) 0xc0000005 0xc0000005 returns 6, trace 1,2 0xc0000005 0xc0000005
test_dead (TEST m8, 1, flags unused) 0xc0000005 0xc0000005 returns 5, trace 1,2 0xc0000005 0xc0000005
cmov_dead (non-moving CMOVNE) 0xc0000005 0xc0000005 0xc0000005 (already volatile on main) 0xc0000005 0xc0000005
add_in_place (ADD m32, r32) 0xc0000005 0xc0000005 0xc0000005 0xc0000005 0xc0000005
read_live (control) 0xc0000005 0xc0000005 0xc0000005 0xc0000005 0xc0000005
fld_dead (x87 load popped unused) 0xc0000005 0xc0000005 0xc0000005 0xc0000005 0xc0000005

On main the /O2 check fails at its first dead case: AssertionError: /O2 translation read_dead, null operand: code 0x0, 5, trace (1, 2, 18446744073709551615); original code 0xc0000005, None, trace (1, 18446744073709551615, 18446744073709551615). The source control also fails on main, because the reads are load<. On main, fld_dead keeps its read only because cl does not inline x87_from_f64. add_in_place keeps its read because the value is stored. With this change both reads are explicit volatile reads.

The new test on this branch: ctest --preset dev --no-tests=error -R '^cpu_aot_lower_dead_reads$' -V passes, with 7 source-control lines and 41 comparisons. Every export is tested with:

  • a readable operand at two values of y, the second wrapping add_in_place to zero so sete gives 1;
  • a null operand;
  • an operand inside an inaccessible page;
  • an operand ending exactly at that page, which returns;
  • for widths above 1, an operand crossing into that page, which faults after the first marker and before the second.

The same test passes under --preset release.

Full suites: serial, with -E '^(conditional_import_paths|static_exe_intake|bundled_export_forwarders)$'.

  • cmake --preset dev -DINTAKE_PYTHON=C:/Users/graha/src/Xbox2Windows/out/pe-env/Scripts/python.exe, cmake --build --preset dev, ctest --preset dev --no-tests=error -E ...: 289 of 290 passed. The one failure was docs_links, which ran before the new files were staged in git (it requires linked files to be tracked); rerun after git add it passes. 3 capability skips: bvh_wave64_hardware, bvh_wave64_warp, wave_shuffle_warp.
  • cmake --preset release -DINTAKE_PYTHON=..., cmake --build --preset release, ctest --preset release --no-tests=error -E ...: 100%, 290 of 290 passed, including the same 3 capability skips.
  • pyflakes on the changed files: clean. tests/docs_links_check.py, tests/form_coverage_check.py and tests/bidi_controls_check.py: pass.

Generated C++ change. In the Debug build, 193 generated sources come from lower (word frame[16]). 83 of them now contain 1,631 captured reads (const T mem = load_always<T>(...)). What changed in the emitted text:

  • the read moved into the mem local, ahead of the statement;
  • scalar memcpy/load<> reads of guest memory became load_always;
  • vector reads read into a std::array local;
  • string and x87 reads are spelled load_always.

What did not change: the values computed, the stores, the control flow, and cpu_exe_aot's frame reads (cpu_exe_*_lifted.cpp keep their one load< and gain no load_always). I did not run #437's corpus or image differential. The hash-pinned bink_*/ffx_* translations build and pass their existing tests, but I did not check whether those images contain a dead read.

Evidence and follow-up

The fixture is source-built MASM in this PR (MIT), with no external data. Assumption: an access violation raised by the byte-wise vector read has the same code and address set as one raised by a single wide access, and no store happens in between. cpu_chained_aot.read_word has the same bug and is a separate follow-up PR.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

Refs #437

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6546098484 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/666). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-22T18:30:23Z. --- ## Problem #437 made `cpu_switch_aot` keep every executed guest memory read, following the rule on that PR: an executed read keeps its fault behaviour even when the value or the `CMP`/`TEST` flags are unused, each source memory operand is evaluated once, at its own width, in guest order, and a private frame read may stay optimizable when it is provably valid. The [survey on #437](https://github.com/R0Y00/Xbox2Windows/pull/437#issuecomment-7073467319) found the same bug in the shared integer lowering, `ffx_version_query.lower`, which `cpu_exe_aot`, `bink_*`, `ffx_*` and the x87 profile use. Its `load<T>` is a `memcpy`. At `/O2` the compiler drops a load whose value is overwritten, or whose `CMP`/`TEST` flags nothing reads, so a null or unmapped operand returns where the original raises an access violation. (`CMOVcc` with a memory source already used a volatile read on `main`.) ## Change `tools/ffx_version_query.py`, following #437's emitted shape: - Each instruction's memory operand is read once, at its own width, into `const T mem = load_always<T>(addr);`, declared before the rest of the statement. Every use names `mem`, so the read comes before any write of the instruction. A read whose value nothing uses becomes the declaration plus `static_cast<void>(mem);`: ```cpp block_1012: { const uint32_t mem = load_always<uint32_t>(rcx + 0ull); { const uint32_t a = mem, b = static_cast<uint32_t>(0ull), ... } } block_1019: { const uint8_t mem = load_always<uint8_t>(rcx + 0ull); zero = ((mem & 1ull) == 0); carry = false; overflow = false; } ``` This applies to `operand()` (`MOV`/`MOVZX`/`MOVSX`, `CMP`, `TEST`, ALU and read-modify-write forms, `CMOVcc`, shifts and rotates, BMI, `MUL`/`DIV`, `CRC32`, `PINSR*`, ...), to `XADD`/`CMPXCHG`, and to the SSE/AVX sources that read guest memory with `memcpy` or `load<>` (`VMOVQ`/`VMOVSD`, `MOVDQU`, `VMOVDQU`, `VMOVUPS`, SHA, AES/PCLMUL, SSE2 saturating/multiply, SSE4.1, `PMOVSX/ZX`, `VPBROADCAST*`, `VPSLLV*`, scalar FMA, and the AVX2 forms that already used `load_always` inline). - A read-modify-write such as `ADD [mem], reg` performs one read and then its store. The `CMOVcc` special case is removed: `operand()` reads its source before the condition is evaluated. - `load_always` is now one volatile access at the operand's width for arithmetic types, so a 4-byte operand is one 4-byte read. Vector types (`std::array`, `__m128i`) keep the byte-by-byte volatile loop. It faults on exactly the addresses a single access would, with no write in between. - String instructions (`MOVS`, `LODS`, `SCAS`, `CMPS`) read each element through `load_always` in every iteration. `XLATB` does too. - `tools/x87_lower.py`: `statement()` takes the read template, and the integer lowering passes `load_always` for x87 memory operands (`FLD`, `FILD`, the arithmetic and compare forms, `FLDCW`). - Private frame: an operand `[rsp + d]` with no index that lies inside the function's own `word frame[16]` stays an ordinary `load`. This is allowed only when no instruction outside the host replacements names RSP as a register and no initial line, binding or exit mentions `rsp`, so RSP points at the array throughout. `cpu_exe_aot`'s operands (`[rsp+32..72)`, with its `SUB/ADD RSP, 72` replaced by host ops) are exactly this case, and its generated C++ keeps `load<`. `tests/cpu/lower_dead_read.{asm,def,py}` and `cpu_aot_lower_dead_reads` (CMake) are a new fixture modelled on `cpu_aot_dead_reads`. Every export stores 1 to a trace word before its read and 2 after it: - `read_dead` overwrites the value it loads; - `cmp_dead` and `test_dead` read memory whose flags nothing reads; - `cmov_dead` is a `CMOVNE` that never moves; - `add_in_place` is `add dword ptr [rcx], edx` followed by `sete`; - `read_live` is the control; - `fld_dead` is an x87 `fld qword ptr [rcx]` followed by `fstp st(0)`. The translation is built by the preset's build and again by a separate `cl /O2 /W4 /EHsc /LD` command. The original and both translations run through `guarded_call` (`__try`/`GetExceptionCode()`), each with fresh trace words and a fresh page. The test compares the exception code, RAX, the trace and the page. A source control checks that each export has exactly one `load_always<T>` at the operand's width and no `load<`. The asm declares `; coverage: source cpu_aot_lower_dead_reads`, so `form_coverage.py` needs no entry. Updated control regexes: the mutation controls in `string_ops.py`, `xlatb.py`, `x87_iarith.py` and `x87_integers.py` match the generated text, so they now match `load_always<`. The x87 ones accept either `load` or `load_always`. The controls still mutate the same sites, and each still has to disagree with the reference. `docs/experiments.md` describes the rule and the fixture next to the `CMOVcc`/`SETcc` paragraph of the shared lowering. ## Evidence Environment: Windows 11 Pro build 26200, VS Build Tools 2026 18.3 / MSVC 19.50.35725, ML64, Windows SDK 10.0.26100, Python 3.12 (pefile 2024.8.26, iced-x86 1.21.0). Commit 3be2e29 on main 2bb9ee0. **Before and after.** I emitted the new fixture with `main`'s `tools/` (2bb9ee0) and with this branch, then compiled each `/Od` and `/O2` (`cl /nologo /EHsc /LD`). Each export was called with a null RCX under `guarded_call`. Trace `1,0` means only the first marker was written. | export | original | main `/Od` | main `/O2` | branch (Debug preset) | branch `/O2` | |---|---|---|---|---|---| | `read_dead` (overwritten `MOV` load) | `0xc0000005`, trace 1,0 | `0xc0000005` | **returns 5, trace 1,2** | `0xc0000005`, 1,0 | `0xc0000005`, 1,0 | | `cmp_dead` (`CMP m32, 0`, flags unused) | `0xc0000005` | `0xc0000005` | **returns 6, trace 1,2** | `0xc0000005` | `0xc0000005` | | `test_dead` (`TEST m8, 1`, flags unused) | `0xc0000005` | `0xc0000005` | **returns 5, trace 1,2** | `0xc0000005` | `0xc0000005` | | `cmov_dead` (non-moving `CMOVNE`) | `0xc0000005` | `0xc0000005` | `0xc0000005` (already volatile on main) | `0xc0000005` | `0xc0000005` | | `add_in_place` (`ADD m32, r32`) | `0xc0000005` | `0xc0000005` | `0xc0000005` | `0xc0000005` | `0xc0000005` | | `read_live` (control) | `0xc0000005` | `0xc0000005` | `0xc0000005` | `0xc0000005` | `0xc0000005` | | `fld_dead` (x87 load popped unused) | `0xc0000005` | `0xc0000005` | `0xc0000005` | `0xc0000005` | `0xc0000005` | On `main` the `/O2` check fails at its first dead case: `AssertionError: /O2 translation read_dead, null operand: code 0x0, 5, trace (1, 2, 18446744073709551615); original code 0xc0000005, None, trace (1, 18446744073709551615, 18446744073709551615)`. The source control also fails on `main`, because the reads are `load<`. On `main`, `fld_dead` keeps its read only because cl does not inline `x87_from_f64`. `add_in_place` keeps its read because the value is stored. With this change both reads are explicit volatile reads. **The new test on this branch:** `ctest --preset dev --no-tests=error -R '^cpu_aot_lower_dead_reads$' -V` passes, with 7 source-control lines and 41 comparisons. Every export is tested with: - a readable operand at two values of `y`, the second wrapping `add_in_place` to zero so `sete` gives 1; - a null operand; - an operand inside an inaccessible page; - an operand ending exactly at that page, which returns; - for widths above 1, an operand crossing into that page, which faults after the first marker and before the second. The same test passes under `--preset release`. **Full suites:** serial, with `-E '^(conditional_import_paths|static_exe_intake|bundled_export_forwarders)$'`. - `cmake --preset dev -DINTAKE_PYTHON=C:/Users/graha/src/Xbox2Windows/out/pe-env/Scripts/python.exe`, `cmake --build --preset dev`, `ctest --preset dev --no-tests=error -E ...`: 289 of 290 passed. The one failure was `docs_links`, which ran before the new files were staged in git (it requires linked files to be tracked); rerun after `git add` it passes. 3 capability skips: `bvh_wave64_hardware`, `bvh_wave64_warp`, `wave_shuffle_warp`. - `cmake --preset release -DINTAKE_PYTHON=...`, `cmake --build --preset release`, `ctest --preset release --no-tests=error -E ...`: 100%, 290 of 290 passed, including the same 3 capability skips. - `pyflakes` on the changed files: clean. `tests/docs_links_check.py`, `tests/form_coverage_check.py` and `tests/bidi_controls_check.py`: pass. **Generated C++ change.** In the Debug build, 193 generated sources come from `lower` (`word frame[16]`). 83 of them now contain 1,631 captured reads (`const T mem = load_always<T>(...)`). What changed in the emitted text: - the read moved into the `mem` local, ahead of the statement; - scalar `memcpy`/`load<>` reads of guest memory became `load_always`; - vector reads read into a `std::array` local; - string and x87 reads are spelled `load_always`. What did not change: the values computed, the stores, the control flow, and `cpu_exe_aot`'s frame reads (`cpu_exe_*_lifted.cpp` keep their one `load<` and gain no `load_always`). I did not run #437's corpus or image differential. The hash-pinned `bink_*`/`ffx_*` translations build and pass their existing tests, but I did not check whether those images contain a dead read. ## Evidence and follow-up The fixture is source-built MASM in this PR (MIT), with no external data. Assumption: an access violation raised by the byte-wise vector read has the same code and address set as one raised by a single wide access, and no store happens in between. `cpu_chained_aot.read_word` has the same bug and is a separate follow-up PR. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. Refs #437 _AI-assisted (Claude Code)._
upstream-sync closed this pull request 2026-11-24 06:44:13 +00:00
legacy-code-archaeologist commented 2026-11-24 06:48:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T19:10:59Z.


Verification of 3be2e29 on an Intel Core i7-6820HQ (Skylake), Windows 11 26100.9168, MSVC/ML64 19.52.37029, dev preset. It merges cleanly with main.

ctest --preset dev --no-tests=error -R "^cpu_" -j 4
100% tests passed, 0 tests failed out of 119

I also checked that the change is pinned. I edited tools/ffx_version_query.py, rebuilt, and ran all cpu_ tests. Afterwards I restored the file, verified its hash, and confirmed the tests passed again.

Mutation Result
scalar load_always reads through const T* instead of const volatile T* a cpu_ test fails (detected)
MOVS step reads *reinterpret_cast<const T*>(rsi) instead of load_always not conclusive, see below

The second mutation stops the build in tests/cpu/string_ops.py emit with control ... changed nothing. That existing memmove control builds its mutant by replacing the exact load_always text in the MOVS step. This is a fragile coupling rather than a detection: any rewording of that line breaks the build before a test runs. So I could not judge the MOVS path this way. The scalar path is covered.

AI-assisted: run and summarized with Claude Code; outputs copied from the local runs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7084173135 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/666#issuecomment-7084173135). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-22T19:10:59Z. --- Verification of `3be2e29` on an Intel Core i7-6820HQ (Skylake), Windows 11 26100.9168, MSVC/ML64 19.52.37029, `dev` preset. It merges cleanly with `main`. ```text ctest --preset dev --no-tests=error -R "^cpu_" -j 4 100% tests passed, 0 tests failed out of 119 ``` I also checked that the change is pinned. I edited `tools/ffx_version_query.py`, rebuilt, and ran all `cpu_` tests. Afterwards I restored the file, verified its hash, and confirmed the tests passed again. | Mutation | Result | |---|---| | scalar `load_always` reads through `const T*` instead of `const volatile T*` | a `cpu_` test fails (detected) | | MOVS step reads `*reinterpret_cast<const T*>(rsi)` instead of `load_always` | not conclusive, see below | The second mutation stops the build in `tests/cpu/string_ops.py emit` with `control ... changed nothing`. That existing memmove control builds its mutant by replacing the exact `load_always` text in the MOVS step. This is a fragile coupling rather than a detection: any rewording of that line breaks the build before a test runs. So I could not judge the MOVS path this way. The scalar path is covered. AI-assisted: run and summarized with Claude Code; outputs copied from the local runs.
R0Y00 commented 2026-11-24 06:48:57 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T02:30:58Z.


The scalar /O2 mutation provides a useful regression check. The patch also changes vector loads, for which load_always emits multiple volatile byte accesses. Please add an executed, overwritten 16-byte load to the native/AOT comparison, with a successful read and a page-crossing failure, and document the access granularity the vector path actually provides. For MOVS, the independent mutation stopped while generating the memmove control. Please add a runtime discriminator for the read or adjust the control so the mutation gets to the test run. Keep the scalar and branch controls when resolving the current main conflict.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7089998473 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/666#issuecomment-7089998473). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T02:30:58Z. --- The scalar `/O2` mutation provides a useful regression check. The patch also changes vector loads, for which `load_always` emits multiple volatile byte accesses. Please add an executed, overwritten 16-byte load to the native/AOT comparison, with a successful read and a page-crossing failure, and document the access granularity the vector path actually provides. For MOVS, the independent mutation stopped while generating the memmove control. Please add a runtime discriminator for the read or adjust the control so the mutation gets to the test run. Keep the scalar and branch controls when resolving the current main conflict.
R0Y00 commented 2026-11-24 06:49:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T14:37:26Z.


I resolved the shared lowerer conflicts after #602. The guest MOVDQU result can be overwritten without deleting its 16-byte read. The REP MOVSB controls cover zero count, a successful copy and a fault on the second source read after the first byte was copied. CMPXCHG16B retains the native alignment rejection and the full-width read. The mixed candidate passed the seven focused CTests for dead reads, RCX branches, string operations, CMPXCHG, shuffles, SSE3/4.1 and x87 examination. Windows CI is rerunning.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7104282429 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/666#issuecomment-7104282429). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T14:37:26Z. --- I resolved the shared lowerer conflicts after #602. The guest MOVDQU result can be overwritten without deleting its 16-byte read. The REP MOVSB controls cover zero count, a successful copy and a fault on the second source read after the first byte was copied. CMPXCHG16B retains the native alignment rejection and the full-width read. The mixed candidate passed the seven focused CTests for dead reads, RCX branches, string operations, CMPXCHG, shuffles, SSE3/4.1 and x87 examination. Windows CI is rerunning.
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
R0Y00/Xbox2Windows!660
No description provided.