[riscv-port] RFR: 8278994: riscv: RVC support [v10]
Fei Yang
fyang at openjdk.java.net
Mon Jan 10 01:26:54 UTC 2022
On Fri, 7 Jan 2022 08:36:47 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 14 commits:
>
> - 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
> - Remove assembler_riscv_c.hpp as discussions
> - Remove COMPRESSIBLE & NOT_COMPRESSIBLE macros by adding one layer as discussions
> - Fix remaining CEXT -> RVC
> - Remove Alignment-related changes as discussions
> - Update licenses to the new year
> - ... and 4 more: https://git.openjdk.java.net/riscv-port/compare/c7944edf...2a6ff151
src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp line 245:
> 243: // RVC: RISCV's amoswap instructions need an alignment for the memory address it swaps
> 244: // when we reach here we may get a 2-byte alignment so need to align it
> 245: __ align(4, nmethod_barrier_guard_offset());
Is it necessary to pass nmethod_barrier_guard_offset() as the "extra_offset" parameter here since this function will return (12 * instruction_size) which is multiple of 4 ?
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 2954:
> 2952: // 8 byte aligned after 3 intructions
> 2953: // RVC: when we reach here we may get a 2-byte alignment so need to align it
> 2954: align(wordSize, NativeCallTrampolineStub::data_offset);
Same question: Is there a reason to pass "NativeCallTrampolineStub::data_offset" as the "extra_offset" parameter here since this function will return (3 * NativeInstruction::instruction_size) which is multiple of 4 ?
-------------
PR: https://git.openjdk.java.net/riscv-port/pull/34
More information about the riscv-port-dev
mailing list