Mercurial > hg > graal-compiler
comparison src/share/vm/opto/runtime.cpp @ 11080:b800986664f4
7088419: Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
Summary: add intrinsics using new instruction to interpreter, C1, C2, for suitable x86; add test
Reviewed-by: kvn, twisti
author | drchase |
---|---|
date | Tue, 02 Jul 2013 20:42:12 -0400 |
parents | e76dd894b984 |
children | 6b0fd0964b87 8b80b262e501 6cc7093e1341 |
comparison
equal
deleted
inserted
replaced
11079:738e04fb1232 | 11080:b800986664f4 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
827 fields[TypeFunc::Parms+0] = NULL; // void | 827 fields[TypeFunc::Parms+0] = NULL; // void |
828 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields); | 828 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields); |
829 return TypeFunc::make(domain, range); | 829 return TypeFunc::make(domain, range); |
830 } | 830 } |
831 | 831 |
832 /** | |
833 * int updateBytesCRC32(int crc, byte* b, int len) | |
834 */ | |
835 const TypeFunc* OptoRuntime::updateBytesCRC32_Type() { | |
836 // create input type (domain) | |
837 int num_args = 3; | |
838 int argcnt = num_args; | |
839 const Type** fields = TypeTuple::fields(argcnt); | |
840 int argp = TypeFunc::Parms; | |
841 fields[argp++] = TypeInt::INT; // crc | |
842 fields[argp++] = TypePtr::NOTNULL; // src | |
843 fields[argp++] = TypeInt::INT; // len | |
844 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); | |
845 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); | |
846 | |
847 // result type needed | |
848 fields = TypeTuple::fields(1); | |
849 fields[TypeFunc::Parms+0] = TypeInt::INT; // crc result | |
850 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields); | |
851 return TypeFunc::make(domain, range); | |
852 } | |
853 | |
832 // for cipherBlockChaining calls of aescrypt encrypt/decrypt, four pointers and a length, returning void | 854 // for cipherBlockChaining calls of aescrypt encrypt/decrypt, four pointers and a length, returning void |
833 const TypeFunc* OptoRuntime::cipherBlockChaining_aescrypt_Type() { | 855 const TypeFunc* OptoRuntime::cipherBlockChaining_aescrypt_Type() { |
834 // create input type (domain) | 856 // create input type (domain) |
835 int num_args = 5; | 857 int num_args = 5; |
836 int argcnt = num_args; | 858 int argcnt = num_args; |