comparison src/share/vm/opto/runtime.cpp @ 17799:752ba2e5f6d0

Merge
author kvn
date Tue, 25 Feb 2014 15:11:18 -0800
parents 04d32e7fad07 2b8e28fdf503
children 8a9bb7821e28 62c54fcc0a35
comparison
equal deleted inserted replaced
17798:f040cf9fc9c0 17799:752ba2e5f6d0
824 824
825 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant) 825 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant)
826 const TypeFunc* OptoRuntime::aescrypt_block_Type() { 826 const TypeFunc* OptoRuntime::aescrypt_block_Type() {
827 // create input type (domain) 827 // create input type (domain)
828 int num_args = 3; 828 int num_args = 3;
829 if (Matcher::pass_original_key_for_aes()) {
830 num_args = 4;
831 }
829 int argcnt = num_args; 832 int argcnt = num_args;
830 const Type** fields = TypeTuple::fields(argcnt); 833 const Type** fields = TypeTuple::fields(argcnt);
831 int argp = TypeFunc::Parms; 834 int argp = TypeFunc::Parms;
832 fields[argp++] = TypePtr::NOTNULL; // src 835 fields[argp++] = TypePtr::NOTNULL; // src
833 fields[argp++] = TypePtr::NOTNULL; // dest 836 fields[argp++] = TypePtr::NOTNULL; // dest
834 fields[argp++] = TypePtr::NOTNULL; // k array 837 fields[argp++] = TypePtr::NOTNULL; // k array
838 if (Matcher::pass_original_key_for_aes()) {
839 fields[argp++] = TypePtr::NOTNULL; // original k array
840 }
835 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); 841 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
836 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); 842 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
837 843
838 // no result type needed 844 // no result type needed
839 fields = TypeTuple::fields(1); 845 fields = TypeTuple::fields(1);
866 872
867 // for cipherBlockChaining calls of aescrypt encrypt/decrypt, four pointers and a length, returning void 873 // for cipherBlockChaining calls of aescrypt encrypt/decrypt, four pointers and a length, returning void
868 const TypeFunc* OptoRuntime::cipherBlockChaining_aescrypt_Type() { 874 const TypeFunc* OptoRuntime::cipherBlockChaining_aescrypt_Type() {
869 // create input type (domain) 875 // create input type (domain)
870 int num_args = 5; 876 int num_args = 5;
877 if (Matcher::pass_original_key_for_aes()) {
878 num_args = 6;
879 }
871 int argcnt = num_args; 880 int argcnt = num_args;
872 const Type** fields = TypeTuple::fields(argcnt); 881 const Type** fields = TypeTuple::fields(argcnt);
873 int argp = TypeFunc::Parms; 882 int argp = TypeFunc::Parms;
874 fields[argp++] = TypePtr::NOTNULL; // src 883 fields[argp++] = TypePtr::NOTNULL; // src
875 fields[argp++] = TypePtr::NOTNULL; // dest 884 fields[argp++] = TypePtr::NOTNULL; // dest
876 fields[argp++] = TypePtr::NOTNULL; // k array 885 fields[argp++] = TypePtr::NOTNULL; // k array
877 fields[argp++] = TypePtr::NOTNULL; // r array 886 fields[argp++] = TypePtr::NOTNULL; // r array
878 fields[argp++] = TypeInt::INT; // src len 887 fields[argp++] = TypeInt::INT; // src len
888 if (Matcher::pass_original_key_for_aes()) {
889 fields[argp++] = TypePtr::NOTNULL; // original k array
890 }
879 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); 891 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
880 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); 892 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
881 893
882 // no result type needed 894 // returning cipher len (int)
883 fields = TypeTuple::fields(1); 895 fields = TypeTuple::fields(1);
884 fields[TypeFunc::Parms+0] = NULL; // void 896 fields[TypeFunc::Parms+0] = TypeInt::INT;
885 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields); 897 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields);
886 return TypeFunc::make(domain, range); 898 return TypeFunc::make(domain, range);
887 } 899 }
888 900
889 //------------- Interpreter state access for on stack replacement 901 //------------- Interpreter state access for on stack replacement
890 const TypeFunc* OptoRuntime::osr_end_Type() { 902 const TypeFunc* OptoRuntime::osr_end_Type() {