< prev index next >

src/hotspot/cpu/riscv/methodHandles_riscv.cpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
   * Copyright (c) 2014, Red Hat Inc. All rights reserved.
   * Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
--- 1,7 ---
  /*
!  * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
   * Copyright (c) 2014, Red Hat Inc. All rights reserved.
   * Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it

*** 164,11 ***
      __ ld(t1, Address(method, Method::interpreter_entry_offset()));
      __ jr(t1);
      __ BIND(run_compiled_code);
    }
  
!   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :
                                                       Method::from_interpreted_offset();
    __ ld(t1, Address(method, entry_offset));
    __ jr(t1);
    __ bind(L_no_such_method);
    __ far_jump(RuntimeAddress(SharedRuntime::throw_AbstractMethodError_entry()));
--- 164,15 ---
      __ ld(t1, Address(method, Method::interpreter_entry_offset()));
      __ jr(t1);
      __ BIND(run_compiled_code);
    }
  
!   // The following jump might pass an inline type argument that was erased to Object as oop to a
+   // callee that expects inline type arguments to be passed as fields. We need to call the compiled
+   // value entry (_code->inline_entry_point() or _adapter->c2i_inline_entry()) which will take care
+   // of translating between the calling conventions.
+   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_inline_offset() :
                                                       Method::from_interpreted_offset();
    __ ld(t1, Address(method, entry_offset));
    __ jr(t1);
    __ bind(L_no_such_method);
    __ far_jump(RuntimeAddress(SharedRuntime::throw_AbstractMethodError_entry()));
< prev index next >