keystone
keystone copied to clipboard
[Feature Request] Plans for Supporting riscv64 Arch?
I'm wondering if it's possible for keystone to add riscv64 (or namely, riscv64gc
) support. The underlying llvm layer has already supported it, but I've noticed that the codes are not ported to https://github.com/keystone-engine/keystone/tree/master/llvm/lib/Target yet.
Some more information:
RISC-V is a modular ISA, meaning that it only has a mandatory base, and everything else is an extension. riscv64gc
, taken as the baseline for most distrios where they simply claim this as "supporting RISCV64". Basically, it means "RISC-V 64-bit, extensions G and C", with the G extension being a shorthand for some other extensions:
-
M
(integer multiplication and division) -
A
(atomics) -
F
(single-precision floats) -
D
(double-precision floats) - "
Zifencei
" ("fence
" instruction) - "
Zicsr
" (CSR instructions) - And the
I
base integer instructions (which are always required)
The C
instruction is for "compressed" instructions, making the most popular integer operations 16-bits (instead of 32-bit)
dup of #491
Thanks for your interest. I'm already trying to work on it but I'm a little busy...
Closed as completed, thanks the brilliant work of #549 !
No rush at all, but I was wondering if keystone has any plan to release a new version with the recently added RISC-V support. It's been three years since the last release.
And to make keystone buildable on riscv64 linux, I think it is needed to update the config.guess file here: https://github.com/keystone-engine/keystone/blob/master/llvm/cmake/config.guess . Old config.guess script can't detect riscv64 linux, relevant log: https://archriscv.felixc.at/.status/log.htm?url=logs/keystone/keystone-0.9.2-5.log
I once started working on a release several months ago because as you saw several things are broken but due to time limitation it was not done yet. Apologize for the delay.
I'm on a rush for several DDL recently so I hope to get this down early next year.