changeset 9419:9d362a0bae2c

8191955: AArch64: incorrect prefetch distance causes an internal error Summary: Fixed incorrect prefetch distance on AArch64. Reviewed-by: aph, phh
author njian
date Thu, 11 Mar 2021 16:59:33 +0800
parents b0825e3772d3
children d21a3fc77eca 705e62002289
files src/cpu/aarch64/vm/vm_version_aarch64.cpp
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/vm_version_aarch64.cpp	Mon Apr 20 13:34:04 2015 +0200
+++ b/src/cpu/aarch64/vm/vm_version_aarch64.cpp	Thu Mar 11 16:59:33 2021 +0800
@@ -138,6 +138,17 @@
     if (PrefetchCopyIntervalInBytes >= 32768)
       PrefetchCopyIntervalInBytes = 32760;
   }
+
+  if (AllocatePrefetchDistance !=-1 && (AllocatePrefetchDistance & 7)) {
+    warning("AllocatePrefetchDistance must be multiple of 8");
+    AllocatePrefetchDistance &= ~7;
+  }
+
+  if (AllocatePrefetchStepSize & 7) {
+    warning("AllocatePrefetchStepSize must be multiple of 8");
+    AllocatePrefetchStepSize &= ~7;
+  }
+
   FLAG_SET_DEFAULT(UseSSE42Intrinsics, true);
 
   unsigned long auxv = getauxval(AT_HWCAP);