RFR: JDK-8310020: MacroAssembler::call_VM(_leaf) doesn't consistently check for conflict with C calling convention. [v2]
Damon Fenacci
duke at openjdk.org
Thu Jun 15 08:22:20 UTC 2023
On Thu, 15 Jun 2023 08:08:26 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Damon Fenacci has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
>>
>> Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
>
> Hello, I can help do some tests on linux-riscv64 platform.
> But I think we need following extra changes for riscv. Could you please help add this? Thanks.
>
>
> diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
> index e6d1e66e0c0..32a144b2d42 100644
> --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
> +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
> @@ -666,6 +666,7 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0) {
> }
>
> void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
> + assert_different_registers(arg_1, c_rarg0);
> pass_arg0(this, arg_0);
> pass_arg1(this, arg_1);
> call_VM_leaf_base(entry_point, 2);
> @@ -673,6 +674,8 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register
>
> void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0,
> Register arg_1, Register arg_2) {
> + assert_different_registers(arg_1, c_rarg0);
> + assert_different_registers(arg_2, c_rarg0, c_rarg1);
> pass_arg0(this, arg_0);
> pass_arg1(this, arg_1);
> pass_arg2(this, arg_2);
Thanks @RealFYang, I missed it! It should be fixed now.
Thanks for testing too!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14470#issuecomment-1592582573
More information about the hotspot-dev
mailing list