Skip to content

[codex] Roll bring-up closure evidence onto merged submodule pins#115

Merged
zhoubot merged 2 commits into
mainfrom
codex/bringup-rollup
May 16, 2026
Merged

[codex] Roll bring-up closure evidence onto merged submodule pins#115
zhoubot merged 2 commits into
mainfrom
codex/bringup-rollup

Conversation

@zhoubot

@zhoubot zhoubot commented May 16, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • repin the superproject to the merged LLVM, QEMU, Linux, and linx-model commits
  • carry the matching AVS, bring-up checklist, and documentation updates into the canonical tree
  • include the current docs-site refresh and generated ISA reference pages that were added in this worktree

Why

The submodule fixes are merged upstream, so the superproject now needs the canonical pins and matching bring-up evidence in one reproducible rollup.

Impact

This makes the current bring-up state reproducible from the superproject again and moves the next blocker to the remaining strict-closure failures rather than local QEMU system regressions.

Linked submodule PRs

Validation

  • python3 avs/qemu/run_tests.py --suite system --timeout 20 -v
  • bash avs/qemu/check_system_strict.sh

RuoyuZhou and others added 2 commits May 15, 2026 21:57
The validated runtime closure lane now spans three repos: LLVM accepts the final-symbol TPCREL low relocations, QEMU patches the relocated branch sites and preserves halfword L.BSTART decode units, and the canonical QEMU skill records the new gate and recurring triage rule.

This superproject pin captures the tested submodule SHAs and refreshes the skills-evolution record so future runs can reproduce the same closure point without reconstructing the session history.

Constraint: The superproject must pin only the verified submodule heads and explicit skills-evolution evidence from this lane

Rejected: Leave the pinning implicit in detached submodule worktrees | the validated state would not be reproducible from the superproject alone

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Re-run the call/ret runtime contract before moving any of these three pins independently

Tested: bash /Users/zhoubot/linx-isa/tools/ci/check_linx_callret_crossstack.sh; CLANG=/Users/zhoubot/linx-isa/compiler/llvm/build-linxisa-clang/bin/clang TARGET=linx64-linx-none-elf OUT_DIR=/Users/zhoubot/linx-isa/avs/compiler/linx-llvm/tests/out-linx64 /Users/zhoubot/linx-isa/avs/compiler/linx-llvm/tests/run.sh; python3 /Users/zhoubot/linx-isa/avs/qemu/run_callret_contract.py; direct execution of the four touched lld RUN lines

Not-tested: Full top-level dirty worktree outside the repinned submodules

Co-authored-by: OmX <omx@oh-my-codex.dev>
The submodule fixes for LLVM, QEMU, Linux, and linx-model are now merged, and
the superproject needs to pin those canonical SHAs while carrying the matching
AVS, checklist, and documentation updates that describe the current bring-up
state. This also keeps the QEMU system closure edits and the doc-site refresh in
one reproducible superproject rollup.

Constraint: Superproject gate truth must pin merged upstream SHAs rather than temporary feature-branch tips
Rejected: Leave the superproject on pre-merge pins | breaks reproducibility and separates docs from the merged code state
Confidence: medium
Scope-risk: broad
Directive: Re-run strict cross-repo closure after every repin before promoting any gate-status doc to canonical truth
Tested: python3 /Users/zhoubot/linx-isa/avs/qemu/run_tests.py --suite system --timeout 20 -v; bash /Users/zhoubot/linx-isa/avs/qemu/check_system_strict.sh
Not-tested: Fresh full strict cross-repo closure after this merged-pin rollup
@zhoubot zhoubot requested review from a team as code owners May 16, 2026 06:49
@zhoubot zhoubot merged commit acc5c93 into main May 16, 2026
7 checks passed
@zhoubot zhoubot deleted the codex/bringup-rollup branch May 16, 2026 06:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a cross-stack transition to fused direct-call source syntax (BSTART.STD CALL, ..., ra=...) and advances the scalar closure lane for LinxISA. Key changes include updating the LLVM backend tests, QEMU contract gates, and runtime startup assembly to enforce the new fused header policy, alongside significant documentation updates and the addition of an automated ISA reference generator. Feedback highlights a fragile string check in the assembly parser, an I/O inefficiency in the test runner due to removed caching, and the need for architectural atomicity in the freestanding atomic builtins using native AMO instructions.

continue
if in_file_scope_inline_asm:
continue
if "CALL" not in line or "ICALL" in line or "BSTART" not in line:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The fast-path check "ICALL" in line is fragile because it will cause valid BSTART CALL instructions to be skipped if the string "ICALL" appears anywhere on the line, such as in a comment. Since ASM_CALL_RE is designed to specifically match the desired BSTART CALL patterns and naturally excludes ICALL due to its word boundaries and prefixes, this manual check is redundant and potentially incorrect.

Suggested change
if "CALL" not in line or "ICALL" in line or "BSTART" not in line:
if "CALL" not in line or "BSTART" not in line:

Comment thread avs/qemu/run_tests.py

def _pto_kernel_src(name: str) -> str:
rel_path = PTO_KERNEL_PATHS.get(name)
rel_path = _load_pto_kernel_catalog().get(name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change removes the module-level cache for the kernel catalog, resulting in the catalog being reloaded from disk on every call to _pto_kernel_src. This is inefficient, especially when called within loops or list comprehensions (e.g., in _extra_sources_for_suite). It is recommended to cache the result of _load_pto_kernel_catalog() to avoid repeated I/O.

(void)failure_memorder;

uint32_t old = *ptr;
linx_u32 old = *ptr;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The implementation of __atomic_compare_exchange_4 (and other builtins in this file) is not atomic. In a multi-core or multi-threaded environment, this will lead to race conditions. Since the LinxISA supports Atomic Memory Operations (AMOs) like LR.W/SC.W and SWAPW, these builtins should be implemented using those instructions via inline assembly to ensure architectural atomicity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant