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

Xiaolin Zheng xlinzheng at openjdk.java.net
Wed Jan 12 07:38:19 UTC 2022


On Mon, 10 Jan 2022 07:30:28 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 refreshed the contents of this pull request, and previous commits have been removed. Incremental views are not available.

> > > 
> > 
> > 
> > I have tested this patch under whole `test/jdk` and `test/hotspot/jtreg` folders without Monday's change through last weekend on a Hifive Unleashed and only revealed [JDK-8279664](https://bugs.openjdk.java.net/browse/JDK-8279664), which has nothing to do with this patch, for the [RISC-V backend initial-load patch](https://github.com/openjdk/riscv-port/commit/7148c39832fe522bad91df77ef4b5c9371193c35) could also reveal this problem on the Unleashed board I'm currently using. This one is a bit weird and I need more time to dig deep into that.
> > About Monday's incremental changesets I tested `test/hotspot/jtreg/compiler`, `test/hotspot/jtreg/gc/z`, and `test/hotspot/jtreg/gc/shenandoah` with or without RVC and revealed no errors. Also SPECjbb2015 is tested and the result seems to have no regression found under RVC - the result on Unleashed remains a `max-jOPs` level of score 370 with minor fluctuations.
> > I think maybe this patch could safely move forward -- except I need to take a look at JDK-8279664 to find whether it is a board-related issue because I cannot reproduce it on C910 and qemu. And thanks for the scrupulous reviews and the delicious suggestions, Felix and Yadong. :-)
> 
> What about codesize improvement of the C2 JIT code? BTW: You need to rebase the patch on the latest repo.

> BTW: You need to rebase the patch on the latest repo.

Thanks for the kind reminder - rebased and tested a simple `test/hotspot/jtreg/compiler` with/without RVC on qemu without errors found.

> What about codesize improvement of the C2 JIT code?
To be short and precise, currently just 'fair' but far from 'good', as the effect of [original patch](https://github.com/openjdk/riscv-port/pull/24). 

This patch only enables the basic definitions of RVC and some scattered usages in the dot ad file, so its title is just a very simple 'riscv: RVC support' and I didn't mention its effect. But considering currently register spills and `pusha/popa`s are covered by this patch, which could cover many instructions (C2 and some stub code), so the result is not 'poor' though.

With respect to this, I shall consider ways to further enable compressions for C1/C2's instructions to take it back to nearly a level of the original patch afterward by adding further patches.

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

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


More information about the riscv-port-dev mailing list