How to read RISC-V mcycle CSR from Linux userspace app?

2022-07-25 Thread Maxim Blinov
Hi all, stupid question but I can't for the life of me figure this out even with all the docs open. I need to get an estimate figure for the cyclecount of a busy loop in one of my small Linux userspace apps. The app in question is running in qemu-system-riscv64. I've compiled QEMU myself, and the

[Qemu-devel] RISC-V: insn32.decode: Confusing encodings

2019-08-06 Thread Maxim Blinov
Hi all, I've been going through the insn32.decode file, and found some confusing inconsistencies with the ISA spec that I don't understand. I hope some of you can clarify. There is a field defined called "%sh10" as follows: %sh1020:10 Which is used in the "@sh" format as follows: @sh ..