RISC-V RVA23 profile support
Robbin Ehn
rehn at rivosinc.com
Fri Sep 26 18:12:19 UTC 2025
Hey,
The minimum level which we can compile with is rv64g, which is
IMAFDZicsr_Zifencei.
openJDK does not use march/mtune default on any platform, you need to
add that in the configure step.
And as we, the openJDK community, do not supply binaries it is not
something we can control.
Which means whatever gcc default march is, it will be supported.
And yes you are correct, counting leading/trailing zeros in GC is very
hot without B :)
Thanks, Robbin
On Fri, Sep 26, 2025 at 7:07 PM Piotr Tarsa <piotr.tarsa at hotmail.com> wrote:
>
> Hi,
>
> I want to share my thoughts on the original topic (even though it's not shown as a reply, because I don't have the original email to reply to).
>
> The original question was about the minimal RISC-V profile that OpenJDK is designed to support and the answer was that OpenJDK will dynamically adapt to CPU's features by probing available extensions at startup. That does work for code outputted by JIT compiler, but it doesn't work for C++ code that is compiled AOT as part of OpenJDK runtime. Therefore, selecting different optimization target when compiling OpenJDK from C++ to an executable, will impact the performance of various subsystems (GC threads, JIT compiler itself, any other code on the hot path).
>
> RVA23 doesn't add much functionality that would affect typical C++ code, but RVA22 does. RVA22 mandates the bit-manipulation extension (named 'B'), basic conditional instructions, etc. Lack of these instructions, if targeting RVA20, could significantly impact performance.
>
> What is the minimum profile level (RVA20, RVA22 or other?) and set of extensions required by OpenJDK currently?
>
> Regards,
> Piotr
More information about the riscv-port-dev
mailing list