comparison src/cpu/sparc/vm/vm_version_sparc.cpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 89152779163c 78bbf4d43a14
children 7848fc12602b
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 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.
232 232
233 assert((CodeEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size"); 233 assert((CodeEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
234 assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size"); 234 assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
235 235
236 char buf[512]; 236 char buf[512];
237 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s", 237 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
238 (has_v9() ? ", v9" : (has_v8() ? ", v8" : "")), 238 (has_v9() ? ", v9" : (has_v8() ? ", v8" : "")),
239 (has_hardware_popc() ? ", popc" : ""), 239 (has_hardware_popc() ? ", popc" : ""),
240 (has_vis1() ? ", vis1" : ""), 240 (has_vis1() ? ", vis1" : ""),
241 (has_vis2() ? ", vis2" : ""), 241 (has_vis2() ? ", vis2" : ""),
242 (has_vis3() ? ", vis3" : ""), 242 (has_vis3() ? ", vis3" : ""),
243 (has_blk_init() ? ", blk_init" : ""), 243 (has_blk_init() ? ", blk_init" : ""),
244 (has_cbcond() ? ", cbcond" : ""), 244 (has_cbcond() ? ", cbcond" : ""),
245 (has_aes() ? ", aes" : ""),
245 (is_ultra3() ? ", ultra3" : ""), 246 (is_ultra3() ? ", ultra3" : ""),
246 (is_sun4v() ? ", sun4v" : ""), 247 (is_sun4v() ? ", sun4v" : ""),
247 (is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")), 248 (is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")),
248 (is_sparc64() ? ", sparc64" : ""), 249 (is_sparc64() ? ", sparc64" : ""),
249 (!has_hardware_mul32() ? ", no-mul32" : ""), 250 (!has_hardware_mul32() ? ", no-mul32" : ""),
263 if (!has_vis2()) // Drop to 1 if no VIS2 support 264 if (!has_vis2()) // Drop to 1 if no VIS2 support
264 UseVIS = MIN2((intx)1,UseVIS); 265 UseVIS = MIN2((intx)1,UseVIS);
265 if (!has_vis1()) // Drop to 0 if no VIS1 support 266 if (!has_vis1()) // Drop to 0 if no VIS1 support
266 UseVIS = 0; 267 UseVIS = 0;
267 268
269 // SPARC T4 and above should have support for AES instructions
270 if (has_aes()) {
271 if (UseVIS > 2) { // AES intrinsics use MOVxTOd/MOVdTOx which are VIS3
272 if (FLAG_IS_DEFAULT(UseAES)) {
273 FLAG_SET_DEFAULT(UseAES, true);
274 }
275 if (FLAG_IS_DEFAULT(UseAESIntrinsics)) {
276 FLAG_SET_DEFAULT(UseAESIntrinsics, true);
277 }
278 // we disable both the AES flags if either of them is disabled on the command line
279 if (!UseAES || !UseAESIntrinsics) {
280 FLAG_SET_DEFAULT(UseAES, false);
281 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
282 }
283 } else {
284 if (UseAES || UseAESIntrinsics) {
285 warning("SPARC AES intrinsics require VIS3 instruction support. Intrinsics will be disabled.");
286 if (UseAES) {
287 FLAG_SET_DEFAULT(UseAES, false);
288 }
289 if (UseAESIntrinsics) {
290 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
291 }
292 }
293 }
294 } else if (UseAES || UseAESIntrinsics) {
295 warning("AES instructions are not available on this CPU");
296 if (UseAES) {
297 FLAG_SET_DEFAULT(UseAES, false);
298 }
299 if (UseAESIntrinsics) {
300 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
301 }
302 }
303
268 if (FLAG_IS_DEFAULT(ContendedPaddingWidth) && 304 if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
269 (cache_line_size > ContendedPaddingWidth)) 305 (cache_line_size > ContendedPaddingWidth))
270 ContendedPaddingWidth = cache_line_size; 306 ContendedPaddingWidth = cache_line_size;
271 307
272 #ifndef PRODUCT 308 #ifndef PRODUCT
280 tty->print("PREFETCH"); 316 tty->print("PREFETCH");
281 } else if (AllocatePrefetchInstr == 1) { 317 } else if (AllocatePrefetchInstr == 1) {
282 tty->print("BIS"); 318 tty->print("BIS");
283 } 319 }
284 if (AllocatePrefetchLines > 1) { 320 if (AllocatePrefetchLines > 1) {
285 tty->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize); 321 tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
286 } else { 322 } else {
287 tty->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize); 323 tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
288 } 324 }
289 } 325 }
290 if (PrefetchCopyIntervalInBytes > 0) { 326 if (PrefetchCopyIntervalInBytes > 0) {
291 tty->print_cr("PrefetchCopyIntervalInBytes %d", PrefetchCopyIntervalInBytes); 327 tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
292 } 328 }
293 if (PrefetchScanIntervalInBytes > 0) { 329 if (PrefetchScanIntervalInBytes > 0) {
294 tty->print_cr("PrefetchScanIntervalInBytes %d", PrefetchScanIntervalInBytes); 330 tty->print_cr("PrefetchScanIntervalInBytes %d", (int) PrefetchScanIntervalInBytes);
295 } 331 }
296 if (PrefetchFieldsAhead > 0) { 332 if (PrefetchFieldsAhead > 0) {
297 tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead); 333 tty->print_cr("PrefetchFieldsAhead %d", (int) PrefetchFieldsAhead);
298 } 334 }
299 if (ContendedPaddingWidth > 0) { 335 if (ContendedPaddingWidth > 0) {
300 tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth); 336 tty->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth);
301 } 337 }
302 } 338 }
303 #endif // PRODUCT 339 #endif // PRODUCT
304 } 340 }
305 341