cpu: lower CBW, CWDE, CDQE, CQO, MOVSX, and ADC instructions #326
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!326
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/326/head"
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?
@Vonsek on GitHub · 2026-11-21 22:16 UTC · original
Vonsek:ag/cpu-lower-sign-ext-adc→main· +260 −4 · 6 files · 2 commits · merged 2026-11-22 03:52 UTCChange
cbw,cwde,cdqe,cqo,movsx) and add-with-carry (adc) instructions intools/ffx_version_query.py, preserving upper bits on 16-bit writes, zero-extending 32-bit writes, and propagating carry-in/carry-out and ZF onadc.tests/cpu/sign_ext_adc.asm,tests/cpu/sign_ext_adc.def) and differential test (tests/cpu/sign_ext_adc.py) wired intoCMakeLists.txtascpu_aot_sign_ext_adc, verifying all 11 exports against both the native DLL and a reference model.sign_ext_adc->cpu_aot_sign_ext_adcintools/form_coverage.py(+6 Integer mnemonics indocs/coverage/x64_zen2.tsv) and document the test indocs/experiments.md.Verification
Tested on Windows 11 (VS 2022 Build Tools 17.14, MSVC 19.44, ML64 14.44, Windows SDK 10.0.26100, Python 3.12):
cmake --build --preset dev --target cpu_sign_ext_adc_liftedfailed with:cmake --build --preset dev --target cpu_sign_ext_adc_liftedsucceeded.ctest --preset dev --no-tests=error -R "^(cpu_aot_sign_ext_adc|cpu_aot_shift_count|cpu_aot_version_query|cpu_aot_address_size)$" -V: 4/4 passed (646 sign-extension and ADC cases (CBW, CWDE, CDQE, CQO, MOVSX, ADC) matched native and translated DLLs).python -B tests/form_coverage_check.py:form coverage checks passed.Evidence and follow-up
adc,cbw,cdqe,cqo,cwde,movsx) todocs/coverage/x64_zen2.tsvcoverage; all six are part of baseline x86-64 and require no optional CPUID feature gate.Checklist
@chatgpt-codex-connector[bot] on GitHub · 2026-11-21 22:21 UTC · original · edited 2026-11-21 22:24 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
f3355b7ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@R0Y00 on GitHub · 2026-11-22 02:56 UTC · original
A test merge of
f9fdea0against main conflicts inCMakeLists.txt,docs/experiments.mdandtools/form_coverage.py. Keep the existing fixture registrations and add the sign-extension/ADC target and its coverage entry alongside them. Please refresh the branch and rerun the relevant fixture and Windows CI.@R0Y00 on GitHub · 2026-11-22 03:07 UTC · original
For your overlapping CPU and shader branches, please refresh only #326 first. Its last review identified conflicts in the CMake fixture list, coverage registration and experiment notes. I’ll review the reconciled commit and confirm which branch is next after it lands. Earlier rebase requests on your other branches can wait, including #169 and #303.
@R0Y00 on GitHub · 2026-11-22 03:33 UTC · original
#425 and #430 have landed. #326 is still first in your queue. A trial merge against
dec705ffound one additional conflict intools/ffx_version_query.py, alongside the CMake, coverage and experiment entries already discussed. Please refresh just this branch on current main and preserve the landed shared-lifter cases.@R0Y00 on GitHub · 2026-11-22 03:49 UTC · original
@Vonsek, I reconciled the four conflicts on your branch using maintainer edits in
2e7a3a9. The first line oftests/cpu/sign_ext_adc.asmnow reads; coverage: source cpu_aot_sign_ext_adc, matching the original CTest registration. The PR no longer changestools/form_coverage.py. On Windows x64,cpu_aot_sign_ext_adcandcpu_aot_rotates_shiftsboth passed, as didtests/form_coverage_check.py. I also checked this fixture’s classification for pass, fail, skip and absent test results. Your branch is updated; no further rebase is needed for this migration.