Skip to content

Commit c49e4b3

Browse files
committed
added RISCV release notes
1 parent a1b2e0d commit c49e4b3

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

docs/cs_v6_release_guide.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Almost all the work was sponsored by [RizinOrg](https://rizin.re/). This release
1212
The developers with the biggest contributions were (alphabetically):
1313
- `TriCore` - @billow (Sponsored)
1414
- `LoongArch` - @jiegec and @FurryAcetylCoA
15+
- `RISCV` - @moste00 (Sponsored)
1516
- `Alpha`, `HPPA` - @R33v0LT (Sponsored)
1617
- `AArch64`, `ARM`, `Auto-Sync`, `PPC`, `SystemZ`, modernized testing - @Rot127 (Sponsored)
1718
- `Mips`, `NanoMips` - @wargio
@@ -31,7 +32,7 @@ With all that said, we hope you enjoy the new release!
3132

3233
## Overview
3334

34-
For `v6` we _updated_ the following architectures: `ARM`, `AArch64`, `Mips` (adding `NanoMips`!), `SystemZ`, `PPC`.
35+
For `v6` we _updated_ the following architectures: `ARM`, `AArch64`, `Mips` (adding `NanoMips`!), `RISCV`, `SystemZ`, `PPC`.
3536
And added support for several more: `TriCore` (already in `v5`), `Alpha`, `HPPA`, `LoongArch`.
3637

3738
These updates are significant! While in `v5` the most up-to-date module was based on `LLVM 7`,
@@ -194,7 +195,47 @@ Nonetheless, we hope this additional information is useful to you.
194195

195196
**RISCV**
196197

198+
- Updated to LLVM-18
197199
- Operands have now read/write access information
200+
- Previously only the basic extensions and the compressed ISA was supported, now every extension supported by LLVM-18 also available (e.g. vector, crypto, ...)
201+
- Changed register names
202+
* FP Regs: Instead of `RISCV_REG_F<n>_32` and `RISCV_REG_F<n>_64`, they're named RISCV_REG_F<n>_F
203+
and RISCV_REG_F<n>_D for n in `0..31`
204+
- Added register names
205+
* Vector registes and combinations thereof `RISCV_REG_V<n>[_V<n_i>]*`, examples
206+
* `RISCV_REG_V21`
207+
* `RISCV_REG_V9_V10`
208+
* `RISCV_REG_V3_V4_V5`
209+
* etc... up to 8-register combinations
210+
* Half-percision (16-bit) FP registers `RISCV_REG_F<n>_H` for n in `0..31`
211+
- Changed instruction names
212+
* Instructions ending in `_AQ_RL` now end in `_AQRL`
213+
- Added instruction names: massive amount, see `include/capstone/riscv.h`
214+
- Added `dimm` and `csr` fields inside the union data of `cs_riscv_op`, with corresponding `riscv_op_type`
215+
* `dimm` is used for instructions with FP immediates
216+
* `csr` is used for instructions with CSR systrem registes
217+
- Added ISA flags to turn ISA extensions on and off
218+
* `CS_MODE_RISCV_FD = 1 << 3`
219+
* `CS_MODE_RISCV_V = 1 << 4`
220+
* `CS_MODE_RISCV_ZFINX = 1 << 5`
221+
* `CS_MODE_RISCV_ZCMP_ZCMT_ZCE = 1 << 6`
222+
* `CS_MODE_RISCV_ZICFISS = 1 << 7`
223+
* `CS_MODE_RISCV_E = 1 << 8`
224+
* `CS_MODE_RISCV_A = 1 << 9`
225+
* `CS_MODE_RISCV_COREV = 1 << 10`
226+
* `CS_MODE_RISCV_THEAD = 1 << 11`
227+
* `CS_MODE_RISCV_SIFIVE = 1 << 12`
228+
* `CS_MODE_RISCV_BITMANIP = 1 << 13`
229+
* `CS_MODE_RISCV_ZBA = 1 << 14`
230+
* `CS_MODE_RISCV_ZBB = 1 << 15`
231+
* `CS_MODE_RISCV_ZBC = 1 << 16`
232+
* `CS_MODE_RISCV_ZBKB = 1 << 17`
233+
* `CS_MODE_RISCV_ZBKC = 1 << 18`
234+
* `CS_MODE_RISCV_ZBKX = 1 << 19`
235+
* `CS_MODE_RISCV_ZBS = 1 << 20`
236+
* NOTE1: All extensions above are disabled by default unless enabled by their option name or the corresponding command line flag in cstool. Any other extension is always enabled and can't be disabled.
237+
238+
* NOTE2: RISCV has a massive, sprawling list of extensions, but Capstone's internal implementaton choice of using a 32-bit mode field is not enough to cover all of them. For now, those extension flags above were added because their encoding space is conflicting with either each other or other extensions, and more flags could be added later as bug reports come and more need for fine-grained extension control. However, the current implementation using bitfields imposes a strict upper limit and would likely be refactored for a more expansive mechanism in the future.
198239

199240
**Xtensa**
200241

0 commit comments

Comments
 (0)