8220566: AArch64: Set default vm features for Ampere eMAG CPUs
authorpzhang
Tue, 12 Mar 2019 11:49:52 +0800
changeset 54117 a6221f993616
parent 54116 d21803f47416
child 54118 d611b76d1327
8220566: AArch64: Set default vm features for Ampere eMAG CPUs Summary: Set defaults for vendor specific features Reviewed-by: adinn
src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Thu Mar 14 09:10:56 2019 +0000
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Tue Mar 12 11:49:52 2019 +0800
@@ -194,6 +194,19 @@
 
   // Enable vendor specific features
 
+  // Ampere eMAG
+  if (_cpu == CPU_AMCC && (_model == 0) && (_variant == 0x3)) {
+    if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
+      FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
+    }
+    if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
+      FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
+    }
+    if (FLAG_IS_DEFAULT(UseSIMDForArrayEquals)) {
+      FLAG_SET_DEFAULT(UseSIMDForArrayEquals, !(_revision == 1 || _revision == 2));
+    }
+  }
+
   // ThunderX
   if (_cpu == CPU_CAVIUM && (_model == 0xA1)) {
     if (_variant == 0) _features |= CPU_DMB_ATOMICS;