< prev index next >

src/hotspot/cpu/s390/methodHandles_s390.cpp

Print this page
@@ -346,10 +346,16 @@
    }
  
    return entry_point;
  }
  
+ void MethodHandles::jump_to_native_invoker(MacroAssembler* _masm, Register nep_reg, Register temp_target) {
+   BLOCK_COMMENT("jump_to_native_invoker {");
+   __ should_not_reach_here();
+   BLOCK_COMMENT("} jump_to_native_invoker");
+ }
+ 
  void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
                                                      vmIntrinsics::ID iid,
                                                      Register receiver_reg,
                                                      Register member_reg,
                                                      bool for_compiler_entry) {

@@ -359,11 +365,11 @@
    Register temp2 = Z_R12;
    Register temp3 = Z_R11;
    Register temp4 = Z_R13;
  
    if (for_compiler_entry) {
-     assert(receiver_reg == (iid == vmIntrinsics::_linkToStatic ? noreg : Z_ARG1),
+     assert(receiver_reg == (iid == vmIntrinsics::_linkToStatic || iid == vmIntrinsics::_linkToNative ? noreg : Z_ARG1),
             "only valid assignment");
    }
    if (receiver_reg != noreg) {
      assert_different_registers(temp1, temp2, temp3, temp4, receiver_reg);
    }

@@ -372,18 +378,18 @@
    }
    if (!for_compiler_entry) {  // Don't trash last SP.
      assert_different_registers(temp1, temp2, temp3, temp4, Z_R10);
    }
  
-   if (iid == vmIntrinsics::_invokeBasic || iid == vmIntrinsics::_linkToNative) {
-     if (iid == vmIntrinsics::_linkToNative) {
-       assert(for_compiler_entry, "only compiler entry is supported");
-     }
+   if (iid == vmIntrinsics::_invokeBasic) {
      __ pc(); // Just for the block comment.
      // Indirect through MH.form.vmentry.vmtarget.
      jump_to_lambda_form(_masm, receiver_reg, Z_method, Z_R1, temp3, for_compiler_entry);
      return;
+   } else if (iid == vmIntrinsics::_linkToNative) {
+     assert(for_compiler_entry, "only compiler entry is supported");
+     jump_to_native_invoker(_masm, member_reg, temp1);
    }
  
    // The method is a member invoker used by direct method handles.
    if (VerifyMethodHandles) {
      // Make sure the trailing argument really is a MemberName (caller responsibility).
< prev index next >