Capstone 101 - Decoding RISC-V instructions
Contents
Capstone & RISC-V
Just a few notes about playing with Capstone for RISC-V ISA. Be aware that RISC-V support has been added recently in Capstone. If you want to use Python bindings, you must install a v5 release candidate:
|
|
[1] is an online RISC-V ISA decoder. In the context of a research project, we had to decode instructions with Capstone [2]. Here is a simple example with two instructions (same instruction copied twice):
|
|
|
|
Be careful of the endianess. Unlike other ISA, we cannot use the endianess constants yet. For instance, in MIPS:
|
|
Other basic scripts can be found on Capstone website [3].