Skip to content

Commit 29f86e0

Browse files
Rohit Arul RajVladimir Kozlov
Rohit Arul Raj
authored and
Vladimir Kozlov
committedNov 30, 2020
8256536: Newer AMD 19h (EPYC) Processor family defaults
Reviewed-by: kvn
1 parent 7f58a8e commit 29f86e0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed
 

‎src/hotspot/cpu/x86/vm_version_x86.cpp

+12-3
Original file line numberDiff line numberDiff line change
@@ -1311,9 +1311,10 @@ void VM_Version::get_processor_features() {
13111311
}
13121312
#endif // COMPILER2
13131313

1314-
// Some defaults for AMD family 17h || Hygon family 18h
1315-
if (cpu_family() == 0x17 || cpu_family() == 0x18) {
1316-
// On family 17h processors use XMM and UnalignedLoadStores for Array Copy
1314+
// Some defaults for AMD family >= 17h && Hygon family 18h
1315+
if (cpu_family() >= 0x17) {
1316+
// On family >=17h processors use XMM and UnalignedLoadStores
1317+
// for Array Copy
13171318
if (supports_sse2() && FLAG_IS_DEFAULT(UseXMMForArrayCopy)) {
13181319
FLAG_SET_DEFAULT(UseXMMForArrayCopy, true);
13191320
}
@@ -1519,6 +1520,14 @@ void VM_Version::get_processor_features() {
15191520
FLAG_SET_DEFAULT(UseFastStosb, false);
15201521
}
15211522

1523+
// For AMD Processors use XMM/YMM MOVDQU instructions
1524+
// for Object Initialization as default
1525+
if (is_amd() && cpu_family() >= 0x19) {
1526+
if (FLAG_IS_DEFAULT(UseFastStosb)) {
1527+
UseFastStosb = false;
1528+
}
1529+
}
1530+
15221531
// Use XMM/YMM MOVDQU instruction for Object Initialization
15231532
if (!UseFastStosb && UseSSE >= 2 && UseUnalignedLoadStores) {
15241533
if (FLAG_IS_DEFAULT(UseXMMForObjInit)) {

0 commit comments

Comments
 (0)
Please sign in to comment.