[riscv-port] RFR: 8278994: riscv: RVC support [v16]

Yadong Wang yadongwang at openjdk.java.net
Sat Jan 15 03:35:02 UTC 2022


On Thu, 13 Jan 2022 10:02:27 GMT, Xiaolin Zheng <xlinzheng at openjdk.org> wrote:

>> Hi team,
>> 
>> This patch includes the basic definition of the RVC instruction set and some cleanups. Tested a simple `test/hotspot/jtreg/compiler/` folder on qemu.
>> 
>> Using `<JAVA_HOME>/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseRVC -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -XX:PrintAssemblyOptions=no-aliases,numeric -XX:+PrintStubCode -XX:-TieredCompilation` could show RVC instructions.
>> 
>> Thanks,
>> Xiaolin
>
> Xiaolin Zheng has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits:
> 
>  - Polish comments: remove the 'RVC:' prefix
>  - Polish `nmethod_entry_barrier` and RISC-V CAS related comments
>  - Remove `nmethod_entry_barrier`-related things
>  - Split c_ldsp and c_fldsp
>  - Remove useless and polish comments
>  - Move RVC code to the proper location after rebasing (#42)
>  - Rename misc functions and change the positions of some comments
>  - Remove remaining macros as discussions
>  - Remain an 'minimum_alignment' unchanged
>  - Manually inline all macros into functions as discussions
>  - ... and 9 more: https://git.openjdk.java.net/riscv-port/compare/a61d66c5...969a4d4d

src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp line 1329:

> 1327:   //   the address of jal itself (which will be patched later) should not span the cache line.
> 1328:   //   See CallStaticJavaDirectNode::compute_padding() for more info.
> 1329:   __ align(4);

It's better to add some alignment asserts before the code that may be patched, for example, in MacroAssembler::emit_static_call_stub.

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

PR: https://git.openjdk.java.net/riscv-port/pull/34


More information about the riscv-port-dev mailing list