Skip to content

dialects: split bitmanipulation ops in rv32 and rv64#6239

Open
luisacicolini wants to merge 6 commits into
xdslproject:mainfrom
luisacicolini:luisa/b-ext-riscv
Open

dialects: split bitmanipulation ops in rv32 and rv64#6239
luisacicolini wants to merge 6 commits into
xdslproject:mainfrom
luisacicolini:luisa/b-ext-riscv

Conversation

@luisacicolini

@luisacicolini luisacicolini commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Split the riscv operations from the B standard extension with different immediates' width depending on the architecture's bit-width (rv32 or rv64).
The involved ops are bclri, binvi, bseti, rori, bexti.

@luisacicolini luisacicolini requested review from osmanyasar05 and superlopuh and removed request for superlopuh June 30, 2026 14:57
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.87%. Comparing base (4e8ca46) to head (053095f).

Files with missing lines Patch % Lines
xdsl/dialects/rv32.py 66.66% 10 Missing ⚠️
xdsl/dialects/rv64.py 66.66% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6239      +/-   ##
==========================================
- Coverage   86.90%   86.87%   -0.03%     
==========================================
  Files         431      431              
  Lines       64642    64682      +40     
  Branches     7403     7403              
==========================================
+ Hits        56174    56194      +20     
- Misses       6897     6917      +20     
  Partials     1571     1571              

☔ 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.

Comment thread xdsl/dialects/rv32.py
name = "rv32.bclri"

def py_operation(self, rs1: IntegerAttr[I32]) -> IntegerAttr[I32]:
assert isinstance(self.immediate, IntegerAttr)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you please add tests for this and below?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added

@superlopuh superlopuh added the dialects Changes on the dialects label Jul 1, 2026
@luisacicolini

Copy link
Copy Markdown
Collaborator Author

thank you @superlopuh for the review, all addressed :)

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

Labels

dialects Changes on the dialects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants