RFR: 8332900: RISC-V: refactor nativeInst_riscv.cpp and macroAssembler_riscv.cpp [v3]

Fei Yang fyang at openjdk.org
Fri May 31 07:43:01 UTC 2024


On Wed, 29 May 2024 18:54:27 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi,
>> Can you help to review the patch?
>> Currently, code in nativeInst_riscv.cpp and macroAssembler_riscv.cpp call each other, which is not right for readability and maintainance.
>> After refactoring, basically only code in nativeInst_riscv.cpp calls code in macroAssembler_riscv.cpp, but not in reverse direction.
>> 
>> Thanks!
>> 
>> * Tests are still running, so far so good.
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   restrict accessbility

I know what you mean. But they play different roles by design. Just think of `MacroAssembler` as producer and `NativeInstruction` as consumer/analyzer of the native instructions. There will surely be some protocols between the them under the hood, which I think is quite normal. BTW: this is also adopted by other CPUs like aarch64.

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

PR Comment: https://git.openjdk.org/jdk/pull/19459#issuecomment-2141402623


More information about the hotspot-dev mailing list