hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
changeset 22832 03720a5b7595
parent 18097 acd70736bd60
child 22838 82c7497fbad4
equal deleted inserted replaced
22831:1e2ba1d62103 22832:03720a5b7595
  1116 }
  1116 }
  1117 
  1117 
  1118 
  1118 
  1119 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
  1119 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
  1120                                          VMRegPair *regs,
  1120                                          VMRegPair *regs,
       
  1121                                          VMRegPair *regs2,
  1121                                          int total_args_passed) {
  1122                                          int total_args_passed) {
       
  1123     assert(regs2 == NULL, "not needed on sparc");
  1122 
  1124 
  1123     // Return the number of VMReg stack_slots needed for the args.
  1125     // Return the number of VMReg stack_slots needed for the args.
  1124     // This value does not include an abi space (like register window
  1126     // This value does not include an abi space (like register window
  1125     // save area).
  1127     // save area).
  1126 
  1128 
  2094   // Now figure out where the args must be stored and how much stack space
  2096   // Now figure out where the args must be stored and how much stack space
  2095   // they require (neglecting out_preserve_stack_slots but space for storing
  2097   // they require (neglecting out_preserve_stack_slots but space for storing
  2096   // the 1st six register arguments). It's weird see int_stk_helper.
  2098   // the 1st six register arguments). It's weird see int_stk_helper.
  2097   //
  2099   //
  2098   int out_arg_slots;
  2100   int out_arg_slots;
  2099   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args);
  2101   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args);
  2100 
  2102 
  2101   if (is_critical_native) {
  2103   if (is_critical_native) {
  2102     // Critical natives may have to call out so they need a save area
  2104     // Critical natives may have to call out so they need a save area
  2103     // for register arguments.
  2105     // for register arguments.
  2104     int double_slots = 0;
  2106     int double_slots = 0;
  2841   // Now figure out where the args must be stored and how much stack space
  2843   // Now figure out where the args must be stored and how much stack space
  2842   // they require (neglecting out_preserve_stack_slots but space for storing
  2844   // they require (neglecting out_preserve_stack_slots but space for storing
  2843   // the 1st six register arguments). It's weird see int_stk_helper.
  2845   // the 1st six register arguments). It's weird see int_stk_helper.
  2844   //
  2846   //
  2845   int out_arg_slots;
  2847   int out_arg_slots;
  2846   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args);
  2848   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args);
  2847 
  2849 
  2848   // Calculate the total number of stack slots we will need.
  2850   // Calculate the total number of stack slots we will need.
  2849 
  2851 
  2850   // First count the abi requirement plus all of the outgoing args
  2852   // First count the abi requirement plus all of the outgoing args
  2851   int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots;
  2853   int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots;