In preparation for more seriously tackling #523. This PR...
Changes the definition of regidx and regno to be newtypes and updates all use sites appropriately.
Splits vregidx from regidx (and friends) for Vector (vext) registers, which, AFAIK, are a completely separate set of 32 registers.
Splits fregidx from regidx (and friends) for F/D/Zcd/Zcf/Zfa/Zfh and V (again) extensions. There's a little muss and fuss around the definition to do with Zfinx, but otherwise it's also pretty rote.
Stops some punning in Zicsr and splits the CSRast ctor into CSRImm and CSRReg.
This was a slog. Most of the changes can be described as "type-directed" and "mechanical" but were all done... er, artisanally, so some more careful review is probably merited. Perhaps best viewed with word diff, not line diff.
The curious are welcome to look at https://github.com/nwf/sail-riscv/tree/202411-eext to see how I think we can properly support E atop this base, and indeed, most of these changes were motivated or directed by that work, but I would like to get this reviewed independently of that shuffling and further refactoring.
In preparation for more seriously tackling #523. This PR...
regidx
andregno
to benewtypes
and updates all use sites appropriately.vregidx
fromregidx
(and friends) for Vector (vext) registers, which, AFAIK, are a completely separate set of 32 registers.fregidx
fromregidx
(and friends) for F/D/Zcd/Zcf/Zfa/Zfh and V (again) extensions. There's a little muss and fuss around the definition to do withZfinx
, but otherwise it's also pretty rote.CSR
ast
ctor intoCSRImm
andCSRReg
.This was a slog. Most of the changes can be described as "type-directed" and "mechanical" but were all done... er, artisanally, so some more careful review is probably merited. Perhaps best viewed with word diff, not line diff.
The curious are welcome to look at https://github.com/nwf/sail-riscv/tree/202411-eext to see how I think we can properly support E atop this base, and indeed, most of these changes were motivated or directed by that work, but I would like to get this reviewed independently of that shuffling and further refactoring.