hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
changeset 22872 b6902ee5bc8d
parent 22234 da823d78ad65
parent 22851 4c4b6a45be43
child 23844 0c29a324ae14
equal deleted inserted replaced
22511:fae90cb64946 22872:b6902ee5bc8d
  1104 }
  1104 }
  1105 
  1105 
  1106 
  1106 
  1107 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
  1107 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
  1108                                          VMRegPair *regs,
  1108                                          VMRegPair *regs,
       
  1109                                          VMRegPair *regs2,
  1109                                          int total_args_passed) {
  1110                                          int total_args_passed) {
       
  1111     assert(regs2 == NULL, "not needed on sparc");
  1110 
  1112 
  1111     // Return the number of VMReg stack_slots needed for the args.
  1113     // Return the number of VMReg stack_slots needed for the args.
  1112     // This value does not include an abi space (like register window
  1114     // This value does not include an abi space (like register window
  1113     // save area).
  1115     // save area).
  1114 
  1116 
  2082   // Now figure out where the args must be stored and how much stack space
  2084   // Now figure out where the args must be stored and how much stack space
  2083   // they require (neglecting out_preserve_stack_slots but space for storing
  2085   // they require (neglecting out_preserve_stack_slots but space for storing
  2084   // the 1st six register arguments). It's weird see int_stk_helper.
  2086   // the 1st six register arguments). It's weird see int_stk_helper.
  2085   //
  2087   //
  2086   int out_arg_slots;
  2088   int out_arg_slots;
  2087   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args);
  2089   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args);
  2088 
  2090 
  2089   if (is_critical_native) {
  2091   if (is_critical_native) {
  2090     // Critical natives may have to call out so they need a save area
  2092     // Critical natives may have to call out so they need a save area
  2091     // for register arguments.
  2093     // for register arguments.
  2092     int double_slots = 0;
  2094     int double_slots = 0;
  2829   // Now figure out where the args must be stored and how much stack space
  2831   // Now figure out where the args must be stored and how much stack space
  2830   // they require (neglecting out_preserve_stack_slots but space for storing
  2832   // they require (neglecting out_preserve_stack_slots but space for storing
  2831   // the 1st six register arguments). It's weird see int_stk_helper.
  2833   // the 1st six register arguments). It's weird see int_stk_helper.
  2832   //
  2834   //
  2833   int out_arg_slots;
  2835   int out_arg_slots;
  2834   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args);
  2836   out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args);
  2835 
  2837 
  2836   // Calculate the total number of stack slots we will need.
  2838   // Calculate the total number of stack slots we will need.
  2837 
  2839 
  2838   // First count the abi requirement plus all of the outgoing args
  2840   // First count the abi requirement plus all of the outgoing args
  2839   int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots;
  2841   int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots;