comparison src/share/vm/opto/runtime.cpp @ 20313:b20a35eae442

8035968: Leverage CPU Instructions to Improve SHA Performance on SPARC Summary: Add C2 SHA intrinsics on SPARC Reviewed-by: kvn, roland Contributed-by: james.cheng@oracle.com
author kvn
date Wed, 11 Jun 2014 11:05:10 -0700
parents 78bbf4d43a14
children 166d744df0de
comparison
equal deleted inserted replaced
20312:922c87c9aed4 20313:b20a35eae442
896 fields[TypeFunc::Parms+0] = TypeInt::INT; 896 fields[TypeFunc::Parms+0] = TypeInt::INT;
897 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields); 897 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields);
898 return TypeFunc::make(domain, range); 898 return TypeFunc::make(domain, range);
899 } 899 }
900 900
901 /*
902 * void implCompress(byte[] buf, int ofs)
903 */
904 const TypeFunc* OptoRuntime::sha_implCompress_Type() {
905 // create input type (domain)
906 int num_args = 2;
907 int argcnt = num_args;
908 const Type** fields = TypeTuple::fields(argcnt);
909 int argp = TypeFunc::Parms;
910 fields[argp++] = TypePtr::NOTNULL; // buf
911 fields[argp++] = TypePtr::NOTNULL; // state
912 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
913 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
914
915 // no result type needed
916 fields = TypeTuple::fields(1);
917 fields[TypeFunc::Parms+0] = NULL; // void
918 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields);
919 return TypeFunc::make(domain, range);
920 }
921
922 /*
923 * int implCompressMultiBlock(byte[] b, int ofs, int limit)
924 */
925 const TypeFunc* OptoRuntime::digestBase_implCompressMB_Type() {
926 // create input type (domain)
927 int num_args = 4;
928 int argcnt = num_args;
929 const Type** fields = TypeTuple::fields(argcnt);
930 int argp = TypeFunc::Parms;
931 fields[argp++] = TypePtr::NOTNULL; // buf
932 fields[argp++] = TypePtr::NOTNULL; // state
933 fields[argp++] = TypeInt::INT; // ofs
934 fields[argp++] = TypeInt::INT; // limit
935 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
936 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
937
938 // returning ofs (int)
939 fields = TypeTuple::fields(1);
940 fields[TypeFunc::Parms+0] = TypeInt::INT; // ofs
941 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields);
942 return TypeFunc::make(domain, range);
943 }
944
901 //------------- Interpreter state access for on stack replacement 945 //------------- Interpreter state access for on stack replacement
902 const TypeFunc* OptoRuntime::osr_end_Type() { 946 const TypeFunc* OptoRuntime::osr_end_Type() {
903 // create input type (domain) 947 // create input type (domain)
904 const Type **fields = TypeTuple::fields(1); 948 const Type **fields = TypeTuple::fields(1);
905 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // OSR temp buf 949 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // OSR temp buf