src/share/vm/runtime/sharedRuntime.hpp

Print this page
rev 5188 : 8024344: PPC64 (part 112): C argument in register AND stack slot.
Summary: On PPC, the first 13 floating point arguments to C calls are passed in floating point registers. Also, all but the first 8 arguments are passed on the stack. So there can be floating point arguments that are passed on the stack and in a register. We duplicate the regs datastructure in c_calling_convention() to represent this.


 339 
 340  public:
 341 
 342   // Read the array of BasicTypes from a Java signature, and compute where
 343   // compiled Java code would like to put the results.  Values in reg_lo and
 344   // reg_hi refer to 4-byte quantities.  Values less than SharedInfo::stack0 are
 345   // registers, those above refer to 4-byte stack slots.  All stack slots are
 346   // based off of the window top.  SharedInfo::stack0 refers to the first usable
 347   // slot in the bottom of the frame. SharedInfo::stack0+1 refers to the memory word
 348   // 4-bytes higher. So for sparc because the register window save area is at
 349   // the bottom of the frame the first 16 words will be skipped and SharedInfo::stack0
 350   // will be just above it. (
 351   // return value is the maximum number of VMReg stack slots the convention will use.
 352   static int java_calling_convention(const BasicType* sig_bt, VMRegPair* regs, int total_args_passed, int is_outgoing);
 353 
 354   static void check_member_name_argument_is_last_argument(methodHandle method,
 355                                                           const BasicType* sig_bt,
 356                                                           const VMRegPair* regs) NOT_DEBUG_RETURN;
 357 
 358   // Ditto except for calling C
 359   static int c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed);








 360 
 361   // Generate I2C and C2I adapters. These adapters are simple argument marshalling
 362   // blobs. Unlike adapters in the tiger and earlier releases the code in these
 363   // blobs does not create a new frame and are therefore virtually invisible
 364   // to the stack walking code. In general these blobs extend the callers stack
 365   // as needed for the conversion of argument locations.
 366 
 367   // When calling a c2i blob the code will always call the interpreter even if
 368   // by the time we reach the blob there is compiled code available. This allows
 369   // the blob to pass the incoming stack pointer (the sender sp) in a known
 370   // location for the interpreter to record. This is used by the frame code
 371   // to correct the sender code to match up with the stack pointer when the
 372   // thread left the compiled code. In addition it allows the interpreter
 373   // to remove the space the c2i adapter allocated to do it argument conversion.
 374 
 375   // Although a c2i blob will always run interpreted even if compiled code is
 376   // present if we see that compiled code is present the compiled call site
 377   // will be patched/re-resolved so that later calls will run compiled.
 378 
 379   // Aditionally a c2i blob need to have a unverified entry because it can be reached




 339 
 340  public:
 341 
 342   // Read the array of BasicTypes from a Java signature, and compute where
 343   // compiled Java code would like to put the results.  Values in reg_lo and
 344   // reg_hi refer to 4-byte quantities.  Values less than SharedInfo::stack0 are
 345   // registers, those above refer to 4-byte stack slots.  All stack slots are
 346   // based off of the window top.  SharedInfo::stack0 refers to the first usable
 347   // slot in the bottom of the frame. SharedInfo::stack0+1 refers to the memory word
 348   // 4-bytes higher. So for sparc because the register window save area is at
 349   // the bottom of the frame the first 16 words will be skipped and SharedInfo::stack0
 350   // will be just above it. (
 351   // return value is the maximum number of VMReg stack slots the convention will use.
 352   static int java_calling_convention(const BasicType* sig_bt, VMRegPair* regs, int total_args_passed, int is_outgoing);
 353 
 354   static void check_member_name_argument_is_last_argument(methodHandle method,
 355                                                           const BasicType* sig_bt,
 356                                                           const VMRegPair* regs) NOT_DEBUG_RETURN;
 357 
 358   // Ditto except for calling C
 359   //
 360   // C argument in register AND stack slot.
 361   // Some architectures require that an argument must be passed in a register
 362   // AND in a stack slot. These architectures provide a second VMRegPair array
 363   // to be filled by the c_calling_convention method. On other architectures,
 364   // NULL is being passed as the second VMRegPair array, so arguments are either
 365   // passed in a register OR in a stack slot.
 366   static int c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, VMRegPair *regs2,
 367                                   int total_args_passed);
 368 
 369   // Generate I2C and C2I adapters. These adapters are simple argument marshalling
 370   // blobs. Unlike adapters in the tiger and earlier releases the code in these
 371   // blobs does not create a new frame and are therefore virtually invisible
 372   // to the stack walking code. In general these blobs extend the callers stack
 373   // as needed for the conversion of argument locations.
 374 
 375   // When calling a c2i blob the code will always call the interpreter even if
 376   // by the time we reach the blob there is compiled code available. This allows
 377   // the blob to pass the incoming stack pointer (the sender sp) in a known
 378   // location for the interpreter to record. This is used by the frame code
 379   // to correct the sender code to match up with the stack pointer when the
 380   // thread left the compiled code. In addition it allows the interpreter
 381   // to remove the space the c2i adapter allocated to do it argument conversion.
 382 
 383   // Although a c2i blob will always run interpreted even if compiled code is
 384   // present if we see that compiled code is present the compiled call site
 385   // will be patched/re-resolved so that later calls will run compiled.
 386 
 387   // Aditionally a c2i blob need to have a unverified entry because it can be reached