comparison src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.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 031b06eac1a9
children d635fd1ac81c
comparison
equal deleted inserted replaced
20312:922c87c9aed4 20313:b20a35eae442
1 /* 1 /*
2 * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2006, 2014, 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.
134 134
135 #ifndef AV_SPARC_AES 135 #ifndef AV_SPARC_AES
136 #define AV_SPARC_AES 0x00020000 /* aes instrs supported */ 136 #define AV_SPARC_AES 0x00020000 /* aes instrs supported */
137 #endif 137 #endif
138 if (av & AV_SPARC_AES) features |= aes_instructions_m; 138 if (av & AV_SPARC_AES) features |= aes_instructions_m;
139
140 #ifndef AV_SPARC_SHA1
141 #define AV_SPARC_SHA1 0x00400000 /* sha1 instruction supported */
142 #endif
143 if (av & AV_SPARC_SHA1) features |= sha1_instruction_m;
144
145 #ifndef AV_SPARC_SHA256
146 #define AV_SPARC_SHA256 0x00800000 /* sha256 instruction supported */
147 #endif
148 if (av & AV_SPARC_SHA256) features |= sha256_instruction_m;
149
150 #ifndef AV_SPARC_SHA512
151 #define AV_SPARC_SHA512 0x01000000 /* sha512 instruction supported */
152 #endif
153 if (av & AV_SPARC_SHA512) features |= sha512_instruction_m;
139 154
140 } else { 155 } else {
141 // getisax(2) failed, use the old legacy code. 156 // getisax(2) failed, use the old legacy code.
142 #ifndef PRODUCT 157 #ifndef PRODUCT
143 if (PrintMiscellaneous && Verbose) 158 if (PrintMiscellaneous && Verbose)