equal
deleted
inserted
replaced
379 __ movl(rax, 0xE0); |
379 __ movl(rax, 0xE0); |
380 __ andl(rax, Address(rbp, in_bytes(VM_Version::xem_xcr0_offset()))); // xcr0 bits sse | ymm |
380 __ andl(rax, Address(rbp, in_bytes(VM_Version::xem_xcr0_offset()))); // xcr0 bits sse | ymm |
381 __ cmpl(rax, 0xE0); |
381 __ cmpl(rax, 0xE0); |
382 __ jccb(Assembler::notEqual, legacy_setup); // jump if EVEX is not supported |
382 __ jccb(Assembler::notEqual, legacy_setup); // jump if EVEX is not supported |
383 |
383 |
|
384 __ lea(rsi, Address(rbp, in_bytes(VM_Version::std_cpuid1_offset()))); |
|
385 __ movl(rax, Address(rsi, 0)); |
|
386 __ cmpl(rax, 0x50654); // If it is Skylake |
|
387 __ jcc(Assembler::equal, legacy_setup); |
384 // If UseAVX is unitialized or is set by the user to include EVEX |
388 // If UseAVX is unitialized or is set by the user to include EVEX |
385 if (use_evex) { |
389 if (use_evex) { |
386 // EVEX setup: run in lowest evex mode |
390 // EVEX setup: run in lowest evex mode |
387 VM_Version::set_evex_cpuFeatures(); // Enable temporary to pass asserts |
391 VM_Version::set_evex_cpuFeatures(); // Enable temporary to pass asserts |
388 UseAVX = 3; |
392 UseAVX = 3; |
463 __ movl(rax, 0xE0); |
467 __ movl(rax, 0xE0); |
464 __ andl(rax, Address(rbp, in_bytes(VM_Version::xem_xcr0_offset()))); // xcr0 bits sse | ymm |
468 __ andl(rax, Address(rbp, in_bytes(VM_Version::xem_xcr0_offset()))); // xcr0 bits sse | ymm |
465 __ cmpl(rax, 0xE0); |
469 __ cmpl(rax, 0xE0); |
466 __ jcc(Assembler::notEqual, legacy_save_restore); |
470 __ jcc(Assembler::notEqual, legacy_save_restore); |
467 |
471 |
|
472 __ lea(rsi, Address(rbp, in_bytes(VM_Version::std_cpuid1_offset()))); |
|
473 __ movl(rax, Address(rsi, 0)); |
|
474 __ cmpl(rax, 0x50654); // If it is Skylake |
|
475 __ jcc(Assembler::equal, legacy_save_restore); |
|
476 |
468 // If UseAVX is unitialized or is set by the user to include EVEX |
477 // If UseAVX is unitialized or is set by the user to include EVEX |
469 if (use_evex) { |
478 if (use_evex) { |
470 // EVEX check: run in lowest evex mode |
479 // EVEX check: run in lowest evex mode |
471 VM_Version::set_evex_cpuFeatures(); // Enable temporary to pass asserts |
480 VM_Version::set_evex_cpuFeatures(); // Enable temporary to pass asserts |
472 UseAVX = 3; |
481 UseAVX = 3; |
658 use_avx_limit = 0; |
667 use_avx_limit = 0; |
659 } |
668 } |
660 } |
669 } |
661 if (FLAG_IS_DEFAULT(UseAVX)) { |
670 if (FLAG_IS_DEFAULT(UseAVX)) { |
662 FLAG_SET_DEFAULT(UseAVX, use_avx_limit); |
671 FLAG_SET_DEFAULT(UseAVX, use_avx_limit); |
|
672 if (is_intel_family_core() && _model == CPU_MODEL_SKYLAKE && _stepping < 5) { |
|
673 FLAG_SET_DEFAULT(UseAVX, 2); //Set UseAVX=2 for Skylake |
|
674 } |
663 } else if (UseAVX > use_avx_limit) { |
675 } else if (UseAVX > use_avx_limit) { |
664 warning("UseAVX=%d is not supported on this CPU, setting it to UseAVX=%d", (int) UseAVX, use_avx_limit); |
676 warning("UseAVX=%d is not supported on this CPU, setting it to UseAVX=%d", (int) UseAVX, use_avx_limit); |
665 FLAG_SET_DEFAULT(UseAVX, use_avx_limit); |
677 FLAG_SET_DEFAULT(UseAVX, use_avx_limit); |
666 } else if (UseAVX < 0) { |
678 } else if (UseAVX < 0) { |
667 warning("UseAVX=%d is not valid, setting it to UseAVX=0", (int) UseAVX); |
679 warning("UseAVX=%d is not valid, setting it to UseAVX=0", (int) UseAVX); |
1057 } |
1069 } |
1058 } |
1070 } |
1059 } |
1071 } |
1060 #endif // COMPILER2 && ASSERT |
1072 #endif // COMPILER2 && ASSERT |
1061 |
1073 |
|
1074 if (!FLAG_IS_DEFAULT(AVX3Threshold)) { |
|
1075 if (!is_power_of_2(AVX3Threshold)) { |
|
1076 warning("AVX3Threshold must be a power of 2"); |
|
1077 FLAG_SET_DEFAULT(AVX3Threshold, 4096); |
|
1078 } |
|
1079 } |
|
1080 |
1062 #ifdef _LP64 |
1081 #ifdef _LP64 |
1063 if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { |
1082 if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { |
1064 UseMultiplyToLenIntrinsic = true; |
1083 UseMultiplyToLenIntrinsic = true; |
1065 } |
1084 } |
1066 if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) { |
1085 if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) { |