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

Xiaolin Zheng xlinzheng at openjdk.java.net
Fri Dec 24 09:57:50 UTC 2021


On Fri, 24 Dec 2021 07:08:31 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Xiaolin Zheng has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Cover most RVC instructions by using CompressibleRegion to cover minimal functions in C2
>>  - Revise as proposed comments, including
>>    - Fix macros in assembler_riscv_c.hpp
>>    - Remove UncompressibleRegion
>>    - Modify comments
>>    - Change names: C-Ext to RVC
>>  - Enable RVC instructions (based on the basic patch)
>
> src/hotspot/cpu/riscv/assembler_riscv_c.hpp line 30:
> 
>> 28: 
>> 29: private:
>> 30:   bool _in_compressible_region;
> 
> So where will this variable be used then?

Sorry I missed this comment. This variable `_in_compressible_region` is used in `CompressibleRegion cr(&_masm)`. During [RTTI](https://github.com/openjdk/riscv-port/blob/dbc763edfbee277125283fdd0cf98f46d42f5e12/src/hotspot/cpu/riscv/assembler_riscv_c.hpp#L873-L877) this variable is set, and when emitting instructions inside the region, instructions inside the region will be considered qualified as safe to be emitted as RVC instructions -- please see the [macros](https://github.com/openjdk/riscv-port/blob/dbc763edfbee277125283fdd0cf98f46d42f5e12/src/hotspot/cpu/riscv/assembler_riscv_c.hpp#L553-L576) and [an example usage](https://github.com/openjdk/riscv-port/blob/dbc763edfbee277125283fdd0cf98f46d42f5e12/src/hotspot/cpu/riscv/assembler_riscv_c.hpp#L601-L606).

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

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


More information about the riscv-port-dev mailing list