1 /*
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2014 SAP AG. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
142 AllocatePrefetchStyle = 1; // Fall back if inappropriate.
143 }
144
145 assert(AllocatePrefetchStyle >= 0, "AllocatePrefetchStyle should be positive");
146
147 if (UseCRC32Intrinsics) {
148 if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics))
149 warning("CRC32 intrinsics are not available on this CPU");
150 FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
151 }
152
153 // The AES intrinsic stubs require AES instruction support.
154 if (UseAES) {
155 warning("AES instructions are not available on this CPU");
156 FLAG_SET_DEFAULT(UseAES, false);
157 }
158 if (UseAESIntrinsics) {
159 if (!FLAG_IS_DEFAULT(UseAESIntrinsics))
160 warning("AES intrinsics are not available on this CPU");
161 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
162 }
163
164 if (UseSHA) {
165 warning("SHA instructions are not available on this CPU");
166 FLAG_SET_DEFAULT(UseSHA, false);
167 }
168 if (UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics) {
169 warning("SHA intrinsics are not available on this CPU");
170 FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
171 FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
172 FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
173 }
174
175 }
176
177 void VM_Version::print_features() {
178 tty->print_cr("Version: %s cache_line_size = %d", cpu_features(), (int) get_cache_line_size());
179 }
180
181 #ifdef COMPILER2
|
1 /*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2014 SAP AG. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
142 AllocatePrefetchStyle = 1; // Fall back if inappropriate.
143 }
144
145 assert(AllocatePrefetchStyle >= 0, "AllocatePrefetchStyle should be positive");
146
147 if (UseCRC32Intrinsics) {
148 if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics))
149 warning("CRC32 intrinsics are not available on this CPU");
150 FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
151 }
152
153 // The AES intrinsic stubs require AES instruction support.
154 if (UseAES) {
155 warning("AES instructions are not available on this CPU");
156 FLAG_SET_DEFAULT(UseAES, false);
157 }
158 if (UseAESIntrinsics) {
159 if (!FLAG_IS_DEFAULT(UseAESIntrinsics))
160 warning("AES intrinsics are not available on this CPU");
161 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
162 }
163
164 if (UseGHASHIntrinsics) {
165 warning("GHASH intrinsics are not available on this CPU");
166 FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
167 }
168
169 if (UseSHA) {
170 warning("SHA instructions are not available on this CPU");
171 FLAG_SET_DEFAULT(UseSHA, false);
172 }
173 if (UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics) {
174 warning("SHA intrinsics are not available on this CPU");
175 FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
176 FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
177 FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
178 }
179
180 }
181
182 void VM_Version::print_features() {
183 tty->print_cr("Version: %s cache_line_size = %d", cpu_features(), (int) get_cache_line_size());
184 }
185
186 #ifdef COMPILER2
|