Skip to content

Sync with upstream to align encoding.h - #46

Open
colluca wants to merge 5 commits into
masterfrom
sync-upstream
Open

Sync with upstream to align encoding.h#46
colluca wants to merge 5 commits into
masterfrom
sync-upstream

Conversation

@colluca

@colluca colluca commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator
  • Remove custom MCAUSE_INTERRUPT macro superseded by xCAUSE_INT macros
  • Remove custom CSR macros, now already distributed with the toolchain (not macros specifically, but mnemonics that can be used in their place)

arichardson and others added 5 commits July 20, 2026 16:46
This adds byte/halfword lr.b/h and sc.b/h encodings similar to Zabha.

Specification: riscv/riscv-isa-manual#3234
* Add MCAUSE/SCAUSE/UCAUSE Interrupt and Exception Code field masks

Define MCAUSE32/64_INT and MCAUSE32/64_EXCCODE for the Interrupt and
Exception Code fields of mcause, plus XLEN-generic aliases in the
__riscv_xlen selection block, following the same pattern used for
MSTATUS_SD and SATP_MODE. scause and ucause share the identical bit
layout per the privileged spec, so SCAUSE_* and UCAUSE_* are defined
as aliases of the MCAUSE_* masks.

* Remove UCAUSE macros

There is no ucause CSR in the privileged spec, so the UCAUSE32/64_INT
and UCAUSE32/64_EXCCODE masks (and the UCAUSE_INT/UCAUSE_EXCCODE
xlen-generic aliases) don't apply.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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