RFR: 8330161: RISC-V: Don't use C for Labels jumps

Fei Yang fyang at openjdk.org
Mon Apr 15 07:57:43 UTC 2024


On Mon, 15 Apr 2024 07:37:32 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>>> Note, I notice this when I enable c_jal, if we ever want c_jal we need to either eanble patching of C or turn off C when we need patching.
>> 
>> The current approach is to turn off C on sites where patching could happen. There are two `relocate` assembler functions for that purpose [1]. They will turn off C on those patching sites. We don't think it worth the complexity to enable patching of C.
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/assembler_riscv.hpp#L2083-L2093
>
> Those two plain jal don't use Labels, so they are unaffected.
> 
> In this case, instead of turn off C we have no C switch for jal.
> So we don't have one approach. Turn off C would be inline with what you are saying.

BTW: Is `c_jal` usable for us? The RISC-V spec say: " C.JAL is an RV32C-only instruction "

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18761#discussion_r1565330078


More information about the hotspot-dev mailing list