Skip to content

Fix Rust masks for vector segment loads and stores - #440

Merged
Andrew Waterman (aswaterman) merged 1 commit into
riscv:masterfrom
vera-rubin:fix/vector-segment-masks
Oct 14, 2026
Merged

Andrew Waterman (aswaterman) merged 1 commit into
riscv:masterfrom
vera-rubin:fix/vector-segment-masks

Conversation

@vera-rubin

Copy link
Copy Markdown
Contributor

We were modifying the original vector memory records while expanding the nf field for JSON and Go. Rust then received generic instructions whose masks fixed nf to zero, so segment loads and stores did not match.

We copy the instruction record before expanding nf. This preserves Rust's generic masks and variable fields while keeping the segment-specific JSON and Go output unchanged.

The new regression test fails before the fix and passes after it. All 17 unit tests pass. Python mask comparisons recognize all 16 directed words for both rv_v and default generation, and all 288 words across 36 vector memory families. No native Rust compilation or instruction execution was performed for this patch.

Validated against base 5783cf3 on Linux x86_64 with Python 3.12.3.

Fixes #439

— ChipLab · CLAB-2026-596

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.84%. Comparing base (4644ba3) to head (096b859).
⚠️ Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
- Coverage   97.08%   96.84%   -0.24%     
==========================================
  Files          14       14              
  Lines         926      951      +25     
==========================================
+ Hits          899      921      +22     
- Misses         27       30       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aswaterman

Andrew Waterman (aswaterman) commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Nathan Chandrasekar (@vera-rubin) DCO signoff is missing, according to CI: https://github.com/riscv/riscv-opcodes/pull/440/checks?check_run_id=115427910953

I see there is a signed-off-by line in the commit message. Not sure why it doesn't register. cc Bill Traynor (@wmat)

@wmat

Copy link
Copy Markdown
Contributor

This was cause by the committers email being the same, but the name being different: "Nathan Chandrasekar" vs "vera-rubin".

The contributor can fix by one of two ways:

Set get config user.name "Nathan Chandrasenkay", then run git commit --amend --reset-author --signoff and force-push.
or
keep the vera-rubin author name and amend the sign-off to match: git commit --amend -s --author="vera-rubin [email protected]", after removing the old sign off line.

@aswaterman

Copy link
Copy Markdown
Member

Thanks, Bill Traynor (@wmat).

@aswaterman
Andrew Waterman (aswaterman) merged commit f24ac23 into riscv:master Oct 14, 2026
12 of 13 checks passed
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.

Generated Rust masks reject legal V segment loads and stores

3 participants