< prev index next >

src/hotspot/cpu/s390/sharedRuntime_s390.cpp

Print this page

 902 }
 903 
 904 static void gen_special_dispatch(MacroAssembler *masm,
 905                                  int total_args_passed,
 906                                  vmIntrinsics::ID special_dispatch,
 907                                  const BasicType *sig_bt,
 908                                  const VMRegPair *regs) {
 909   verify_oop_args(masm, total_args_passed, sig_bt, regs);
 910 
 911   // Now write the args into the outgoing interpreter space.
 912   bool     has_receiver   = false;
 913   Register receiver_reg   = noreg;
 914   int      member_arg_pos = -1;
 915   Register member_reg     = noreg;
 916   int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(special_dispatch);
 917 
 918   if (ref_kind != 0) {
 919     member_arg_pos = total_args_passed - 1;  // trailing MemberName argument
 920     member_reg = Z_R9;                       // Known to be free at this point.
 921     has_receiver = MethodHandles::ref_kind_has_receiver(ref_kind);



 922   } else {
 923     guarantee(special_dispatch == vmIntrinsics::_invokeBasic || special_dispatch == vmIntrinsics::_linkToNative,
 924               "special_dispatch=%d", vmIntrinsics::as_int(special_dispatch));
 925     has_receiver = true;
 926   }
 927 
 928   if (member_reg != noreg) {
 929     // Load the member_arg into register, if necessary.
 930     assert(member_arg_pos >= 0 && member_arg_pos < total_args_passed, "oob");
 931     assert(sig_bt[member_arg_pos] == T_OBJECT, "dispatch argument must be an object");
 932 
 933     VMReg r = regs[member_arg_pos].first();
 934     assert(r->is_valid(), "bad member arg");
 935 
 936     if (r->is_stack()) {
 937       __ z_lg(member_reg, Address(Z_SP, reg2offset(r)));
 938     } else {
 939       // No data motion is needed.
 940       member_reg = r->as_Register();
 941     }
 942   }
 943 

3258     *a = scratch + 0 * longwords,
3259     *n = scratch + 1 * longwords,
3260     *m = scratch + 2 * longwords;
3261 
3262   reverse_words((unsigned long *)a_ints, a, longwords);
3263   reverse_words((unsigned long *)n_ints, n, longwords);
3264 
3265   if (len >= MONTGOMERY_SQUARING_THRESHOLD) {
3266     ::montgomery_square(a, n, m, (unsigned long)inv, longwords);
3267   } else {
3268     ::montgomery_multiply(a, a, n, m, (unsigned long)inv, longwords);
3269   }
3270 
3271   reverse_words(m, (unsigned long *)m_ints, longwords);
3272 }
3273 
3274 extern "C"
3275 int SpinPause() {
3276   return 0;
3277 }
3278 
3279 #ifdef COMPILER2
3280 RuntimeStub* SharedRuntime::make_native_invoker(address call_target,
3281                                                 int shadow_space_bytes,
3282                                                 const GrowableArray<VMReg>& input_registers,
3283                                                 const GrowableArray<VMReg>& output_registers) {
3284   Unimplemented();
3285   return nullptr;
3286 }
3287 #endif

 902 }
 903 
 904 static void gen_special_dispatch(MacroAssembler *masm,
 905                                  int total_args_passed,
 906                                  vmIntrinsics::ID special_dispatch,
 907                                  const BasicType *sig_bt,
 908                                  const VMRegPair *regs) {
 909   verify_oop_args(masm, total_args_passed, sig_bt, regs);
 910 
 911   // Now write the args into the outgoing interpreter space.
 912   bool     has_receiver   = false;
 913   Register receiver_reg   = noreg;
 914   int      member_arg_pos = -1;
 915   Register member_reg     = noreg;
 916   int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(special_dispatch);
 917 
 918   if (ref_kind != 0) {
 919     member_arg_pos = total_args_passed - 1;  // trailing MemberName argument
 920     member_reg = Z_R9;                       // Known to be free at this point.
 921     has_receiver = MethodHandles::ref_kind_has_receiver(ref_kind);
 922   } else if (iid == vmIntrinsics::_linkToNative) {
 923     member_arg_pos = method->size_of_parameters() - 1;  // trailing NativeEntryPoint argument
 924     member_reg = Z_R9;  // known to be free at this point
 925   } else {
 926     guarantee(special_dispatch == vmIntrinsics::_invokeBasic,
 927               "special_dispatch=%d", vmIntrinsics::as_int(special_dispatch));
 928     has_receiver = true;
 929   }
 930 
 931   if (member_reg != noreg) {
 932     // Load the member_arg into register, if necessary.
 933     assert(member_arg_pos >= 0 && member_arg_pos < total_args_passed, "oob");
 934     assert(sig_bt[member_arg_pos] == T_OBJECT, "dispatch argument must be an object");
 935 
 936     VMReg r = regs[member_arg_pos].first();
 937     assert(r->is_valid(), "bad member arg");
 938 
 939     if (r->is_stack()) {
 940       __ z_lg(member_reg, Address(Z_SP, reg2offset(r)));
 941     } else {
 942       // No data motion is needed.
 943       member_reg = r->as_Register();
 944     }
 945   }
 946 

3261     *a = scratch + 0 * longwords,
3262     *n = scratch + 1 * longwords,
3263     *m = scratch + 2 * longwords;
3264 
3265   reverse_words((unsigned long *)a_ints, a, longwords);
3266   reverse_words((unsigned long *)n_ints, n, longwords);
3267 
3268   if (len >= MONTGOMERY_SQUARING_THRESHOLD) {
3269     ::montgomery_square(a, n, m, (unsigned long)inv, longwords);
3270   } else {
3271     ::montgomery_multiply(a, a, n, m, (unsigned long)inv, longwords);
3272   }
3273 
3274   reverse_words(m, (unsigned long *)m_ints, longwords);
3275 }
3276 
3277 extern "C"
3278 int SpinPause() {
3279   return 0;
3280 }










< prev index next >