From 7ef1dfdd517aac3e2d9e3d13c0bdce1f1320260c Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Wed, 3 Nov 2021 14:22:57 +0000 Subject: [PATCH] Fix ARM AAL on Morello The spelling of inline assembler constraints on Morello would be different, but Jessica Clarke points out that we should just be using the builtin when available, so do that instead. Co-authored-by: Jessica Clarke --- src/aal/aal_arm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aal/aal_arm.h b/src/aal/aal_arm.h index b238de5..39bcd95 100644 --- a/src/aal/aal_arm.h +++ b/src/aal/aal_arm.h @@ -48,12 +48,12 @@ namespace snmalloc { #ifdef _MSC_VER __prefetch(ptr); -#else -# ifdef SNMALLOC_VA_BITS_64 +#elif __has_builtin(__builtin_prefetch) && !defined(SNMALLOC_NO_AAL_BUILTINS) + __builtin_prefetch(ptr); +#elif defined(SNMALLOC_VA_BITS_64) __asm__ volatile("prfm pldl1keep, [%0]" : "=r"(ptr)); -# else +#else __asm__ volatile("pld\t[%0]" : "=r"(ptr)); -# endif #endif } };