Commit 62a06d2
Add xCAUSE interrupt and exception code field masks (#427)
* 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>1 parent aeb94df commit 62a06d2
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
174 | 184 | | |
175 | 185 | | |
176 | 186 | | |
| |||
521 | 531 | | |
522 | 532 | | |
523 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
524 | 538 | | |
525 | 539 | | |
526 | 540 | | |
527 | 541 | | |
528 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
529 | 547 | | |
530 | 548 | | |
531 | 549 | | |
| |||
0 commit comments