Skip to content

[WIP] feat: add zicond operations#28

Draft
tobiasgrosser wants to merge 10 commits into
mainfrom
zicond-rtype
Draft

[WIP] feat: add zicond operations#28
tobiasgrosser wants to merge 10 commits into
mainfrom
zicond-rtype

Conversation

@tobiasgrosser
Copy link
Copy Markdown
Contributor

@tobiasgrosser tobiasgrosser commented Nov 4, 2025

We add the zicond operations: https://docs.riscv.org/reference/isa/unpriv/zicond.html

The Sail monad for zicond reads both register values depending on the value of the first register read. In the operation
if val2 = then 0 else val1, the register containing val1 is only read if it's actually used (i.e., val2 = 0). We obviously can't represent this behaviour in the pure semantics and therefore had to (1) rely on batteries for the manipulation of monads (2) build some more infrastructure around the reading and writing of registers.

All this infrastructure lives in ForMathlib.

Co-authored-by: Sarah Kuhn kuhnsa@student.ethz.ch

@luisacicolini luisacicolini changed the title Zicond rtype feat: add zicond type Nov 5, 2025
@luisacicolini luisacicolini changed the title feat: add zicond type feat: add zicond operations Nov 5, 2025
@luisacicolini luisacicolini changed the title feat: add zicond operations [WIP} feat: add zicond operations Nov 5, 2025
@luisacicolini luisacicolini changed the title [WIP} feat: add zicond operations [WIP] feat: add zicond operations Nov 5, 2025
@luisacicolini luisacicolini marked this pull request as draft November 5, 2025 08:00
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.

2 participants