Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/vm_version_x86.cpp @ 14726:92aa6797d639
Backed out merge changeset: b51e29501f30
Backed out merge revision to its first parent (8f483e200405)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 24 Mar 2014 21:30:43 +0100 |
parents | b51e29501f30 |
children |
comparison
equal
deleted
inserted
replaced
14719:0bdd0d157040 | 14726:92aa6797d639 |
---|---|
427 // HT processor could be installed on a system which doesn't support HT. | 427 // HT processor could be installed on a system which doesn't support HT. |
428 _cpuFeatures &= ~CPU_HT; | 428 _cpuFeatures &= ~CPU_HT; |
429 } | 429 } |
430 | 430 |
431 char buf[256]; | 431 char buf[256]; |
432 jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", | 432 jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
433 cores_per_cpu(), threads_per_core(), | 433 cores_per_cpu(), threads_per_core(), |
434 cpu_family(), _model, _stepping, | 434 cpu_family(), _model, _stepping, |
435 (supports_cmov() ? ", cmov" : ""), | 435 (supports_cmov() ? ", cmov" : ""), |
436 (supports_cmpxchg8() ? ", cx8" : ""), | 436 (supports_cmpxchg8() ? ", cx8" : ""), |
437 (supports_fxsr() ? ", fxsr" : ""), | 437 (supports_fxsr() ? ", fxsr" : ""), |
453 (supports_lzcnt() ? ", lzcnt": ""), | 453 (supports_lzcnt() ? ", lzcnt": ""), |
454 (supports_sse4a() ? ", sse4a": ""), | 454 (supports_sse4a() ? ", sse4a": ""), |
455 (supports_ht() ? ", ht": ""), | 455 (supports_ht() ? ", ht": ""), |
456 (supports_tsc() ? ", tsc": ""), | 456 (supports_tsc() ? ", tsc": ""), |
457 (supports_tscinv_bit() ? ", tscinvbit": ""), | 457 (supports_tscinv_bit() ? ", tscinvbit": ""), |
458 (supports_tscinv() ? ", tscinv": ""), | 458 (supports_tscinv() ? ", tscinv": "")); |
459 (supports_bmi1() ? ", bmi1" : ""), | |
460 (supports_bmi2() ? ", bmi2" : "")); | |
461 _features_str = strdup(buf); | 459 _features_str = strdup(buf); |
462 | 460 |
463 // UseSSE is set to the smaller of what hardware supports and what | 461 // UseSSE is set to the smaller of what hardware supports and what |
464 // the command line requires. I.e., you cannot set UseSSE to 2 on | 462 // the command line requires. I.e., you cannot set UseSSE to 2 on |
465 // older Pentiums which do not support it. | 463 // older Pentiums which do not support it. |
600 if( supports_sse4_2() && UseSSE >= 4 ) { | 598 if( supports_sse4_2() && UseSSE >= 4 ) { |
601 UseSSE42Intrinsics = true; | 599 UseSSE42Intrinsics = true; |
602 } | 600 } |
603 } | 601 } |
604 | 602 |
603 // Use count leading zeros count instruction if available. | |
604 if (supports_lzcnt()) { | |
605 if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) { | |
606 UseCountLeadingZerosInstruction = true; | |
607 } | |
608 } | |
609 | |
605 // some defaults for AMD family 15h | 610 // some defaults for AMD family 15h |
606 if ( cpu_family() == 0x15 ) { | 611 if ( cpu_family() == 0x15 ) { |
607 // On family 15h processors default is no sw prefetch | 612 // On family 15h processors default is no sw prefetch |
608 if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { | 613 if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { |
609 AllocatePrefetchStyle = 0; | 614 AllocatePrefetchStyle = 0; |
684 // restoring upper 128bit of YMM registers on return | 689 // restoring upper 128bit of YMM registers on return |
685 // from signal handler. | 690 // from signal handler. |
686 FLAG_SET_DEFAULT(MaxVectorSize, 16); | 691 FLAG_SET_DEFAULT(MaxVectorSize, 16); |
687 } | 692 } |
688 #endif // COMPILER2 | 693 #endif // COMPILER2 |
689 | |
690 // Use count leading zeros count instruction if available. | |
691 if (supports_lzcnt()) { | |
692 if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) { | |
693 UseCountLeadingZerosInstruction = true; | |
694 } | |
695 } else if (UseCountLeadingZerosInstruction) { | |
696 warning("lzcnt instruction is not available on this CPU"); | |
697 FLAG_SET_DEFAULT(UseCountLeadingZerosInstruction, false); | |
698 } | |
699 | |
700 if (supports_bmi1()) { | |
701 if (FLAG_IS_DEFAULT(UseBMI1Instructions)) { | |
702 UseBMI1Instructions = true; | |
703 } | |
704 } else if (UseBMI1Instructions) { | |
705 warning("BMI1 instructions are not available on this CPU"); | |
706 FLAG_SET_DEFAULT(UseBMI1Instructions, false); | |
707 } | |
708 | |
709 // Use count trailing zeros instruction if available | |
710 if (supports_bmi1()) { | |
711 if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction)) { | |
712 UseCountTrailingZerosInstruction = UseBMI1Instructions; | |
713 } | |
714 } else if (UseCountTrailingZerosInstruction) { | |
715 warning("tzcnt instruction is not available on this CPU"); | |
716 FLAG_SET_DEFAULT(UseCountTrailingZerosInstruction, false); | |
717 } | |
718 | 694 |
719 // Use population count instruction if available. | 695 // Use population count instruction if available. |
720 if (supports_popcnt()) { | 696 if (supports_popcnt()) { |
721 if (FLAG_IS_DEFAULT(UsePopCountInstruction)) { | 697 if (FLAG_IS_DEFAULT(UsePopCountInstruction)) { |
722 UsePopCountInstruction = true; | 698 UsePopCountInstruction = true; |