Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8256536: Newer AMD 19h (EPYC) Processor family defaults
Reviewed-by: kvn
  • Loading branch information
Rohit Arul Raj authored and Vladimir Kozlov committed Nov 30, 2020
1 parent 7f58a8e commit 29f86e0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/hotspot/cpu/x86/vm_version_x86.cpp
Expand Up @@ -1311,9 +1311,10 @@ void VM_Version::get_processor_features() {
}
#endif // COMPILER2

// Some defaults for AMD family 17h || Hygon family 18h
if (cpu_family() == 0x17 || cpu_family() == 0x18) {
// On family 17h processors use XMM and UnalignedLoadStores for Array Copy
// Some defaults for AMD family >= 17h && Hygon family 18h
if (cpu_family() >= 0x17) {
// On family >=17h processors use XMM and UnalignedLoadStores
// for Array Copy
if (supports_sse2() && FLAG_IS_DEFAULT(UseXMMForArrayCopy)) {
FLAG_SET_DEFAULT(UseXMMForArrayCopy, true);
}
Expand Down Expand Up @@ -1519,6 +1520,14 @@ void VM_Version::get_processor_features() {
FLAG_SET_DEFAULT(UseFastStosb, false);
}

// For AMD Processors use XMM/YMM MOVDQU instructions
// for Object Initialization as default
if (is_amd() && cpu_family() >= 0x19) {
if (FLAG_IS_DEFAULT(UseFastStosb)) {
UseFastStosb = false;
}
}

// Use XMM/YMM MOVDQU instruction for Object Initialization
if (!UseFastStosb && UseSSE >= 2 && UseUnalignedLoadStores) {
if (FLAG_IS_DEFAULT(UseXMMForObjInit)) {
Expand Down

1 comment on commit 29f86e0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.