comparison src/share/vm/opto/runtime.cpp @ 6894:a3ecd773a7b9

7184394: add intrinsics to use AES instructions Summary: Use new x86 AES instructions for AESCrypt. Reviewed-by: twisti, kvn, roland Contributed-by: tom.deneau@amd.com
author kvn
date Wed, 24 Oct 2012 14:33:22 -0700
parents d8ce2825b193
children e522a00b91aa 070d523b96a7
comparison
equal deleted inserted replaced
6893:b2c669fd8114 6894:a3ecd773a7b9
809 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields); 809 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
810 810
811 return TypeFunc::make(domain, range); 811 return TypeFunc::make(domain, range);
812 } 812 }
813 813
814 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant)
815 const TypeFunc* OptoRuntime::aescrypt_block_Type() {
816 // create input type (domain)
817 int num_args = 3;
818 int argcnt = num_args;
819 const Type** fields = TypeTuple::fields(argcnt);
820 int argp = TypeFunc::Parms;
821 fields[argp++] = TypePtr::NOTNULL; // src
822 fields[argp++] = TypePtr::NOTNULL; // dest
823 fields[argp++] = TypePtr::NOTNULL; // k array
824 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
825 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
826
827 // no result type needed
828 fields = TypeTuple::fields(1);
829 fields[TypeFunc::Parms+0] = NULL; // void
830 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields);
831 return TypeFunc::make(domain, range);
832 }
833
834 // for cipherBlockChaining calls of aescrypt encrypt/decrypt, four pointers and a length, returning void
835 const TypeFunc* OptoRuntime::cipherBlockChaining_aescrypt_Type() {
836 // create input type (domain)
837 int num_args = 5;
838 int argcnt = num_args;
839 const Type** fields = TypeTuple::fields(argcnt);
840 int argp = TypeFunc::Parms;
841 fields[argp++] = TypePtr::NOTNULL; // src
842 fields[argp++] = TypePtr::NOTNULL; // dest
843 fields[argp++] = TypePtr::NOTNULL; // k array
844 fields[argp++] = TypePtr::NOTNULL; // r array
845 fields[argp++] = TypeInt::INT; // src len
846 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
847 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
848
849 // no result type needed
850 fields = TypeTuple::fields(1);
851 fields[TypeFunc::Parms+0] = NULL; // void
852 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields);
853 return TypeFunc::make(domain, range);
854 }
855
814 //------------- Interpreter state access for on stack replacement 856 //------------- Interpreter state access for on stack replacement
815 const TypeFunc* OptoRuntime::osr_end_Type() { 857 const TypeFunc* OptoRuntime::osr_end_Type() {
816 // create input type (domain) 858 // create input type (domain)
817 const Type **fields = TypeTuple::fields(1); 859 const Type **fields = TypeTuple::fields(1);
818 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // OSR temp buf 860 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // OSR temp buf