< prev index next >

src/share/vm/opto/runtime.cpp

Print this page
rev 8611 : 8086069: Adapt runtime calls to recent intrinsics to pass ints as long
Summary: Remove CCallingConventionRequiresIntsAsLongs from shared code and push functionality to native wrapper. Less optimal but more flexible.


 762 const TypeFunc* OptoRuntime::checkcast_arraycopy_Type() {
 763   // An extension of fast_arraycopy_Type which adds type checking.
 764   return make_arraycopy_Type(ac_checkcast);
 765 }
 766 
 767 const TypeFunc* OptoRuntime::slow_arraycopy_Type() {
 768   // This signature is exactly the same as System.arraycopy.
 769   // There are no intptr_t (int/long) arguments.
 770   return make_arraycopy_Type(ac_slow);
 771 }
 772 
 773 const TypeFunc* OptoRuntime::generic_arraycopy_Type() {
 774   // This signature is like System.arraycopy, except that it returns status.
 775   return make_arraycopy_Type(ac_generic);
 776 }
 777 
 778 
 779 const TypeFunc* OptoRuntime::array_fill_Type() {
 780   const Type** fields;
 781   int argp = TypeFunc::Parms;
 782   if (CCallingConventionRequiresIntsAsLongs) {
 783   // create input type (domain): pointer, int, size_t
 784     fields = TypeTuple::fields(3 LP64_ONLY( + 2));
 785     fields[argp++] = TypePtr::NOTNULL;
 786     fields[argp++] = TypeLong::LONG;
 787     fields[argp++] = Type::HALF;
 788   } else {
 789     // create input type (domain): pointer, int, size_t
 790     fields = TypeTuple::fields(3 LP64_ONLY( + 1));
 791     fields[argp++] = TypePtr::NOTNULL;
 792     fields[argp++] = TypeInt::INT;
 793   }
 794   fields[argp++] = TypeX_X;               // size in whatevers (size_t)
 795   LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length
 796   const TypeTuple *domain = TypeTuple::make(argp, fields);
 797 
 798   // create result type
 799   fields = TypeTuple::fields(1);
 800   fields[TypeFunc::Parms+0] = NULL; // void
 801   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
 802 
 803   return TypeFunc::make(domain, range);
 804 }
 805 
 806 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant)
 807 const TypeFunc* OptoRuntime::aescrypt_block_Type() {
 808   // create input type (domain)
 809   int num_args      = 3;
 810   if (Matcher::pass_original_key_for_aes()) {
 811     num_args = 4;
 812   }
 813   int argcnt = num_args;




 762 const TypeFunc* OptoRuntime::checkcast_arraycopy_Type() {
 763   // An extension of fast_arraycopy_Type which adds type checking.
 764   return make_arraycopy_Type(ac_checkcast);
 765 }
 766 
 767 const TypeFunc* OptoRuntime::slow_arraycopy_Type() {
 768   // This signature is exactly the same as System.arraycopy.
 769   // There are no intptr_t (int/long) arguments.
 770   return make_arraycopy_Type(ac_slow);
 771 }
 772 
 773 const TypeFunc* OptoRuntime::generic_arraycopy_Type() {
 774   // This signature is like System.arraycopy, except that it returns status.
 775   return make_arraycopy_Type(ac_generic);
 776 }
 777 
 778 
 779 const TypeFunc* OptoRuntime::array_fill_Type() {
 780   const Type** fields;
 781   int argp = TypeFunc::Parms;







 782   // create input type (domain): pointer, int, size_t
 783   fields = TypeTuple::fields(3 LP64_ONLY( + 1));
 784   fields[argp++] = TypePtr::NOTNULL;
 785   fields[argp++] = TypeInt::INT;

 786   fields[argp++] = TypeX_X;               // size in whatevers (size_t)
 787   LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length
 788   const TypeTuple *domain = TypeTuple::make(argp, fields);
 789 
 790   // create result type
 791   fields = TypeTuple::fields(1);
 792   fields[TypeFunc::Parms+0] = NULL; // void
 793   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
 794 
 795   return TypeFunc::make(domain, range);
 796 }
 797 
 798 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant)
 799 const TypeFunc* OptoRuntime::aescrypt_block_Type() {
 800   // create input type (domain)
 801   int num_args      = 3;
 802   if (Matcher::pass_original_key_for_aes()) {
 803     num_args = 4;
 804   }
 805   int argcnt = num_args;


< prev index next >