From 333cc2ccf86e6dbbcbee81ab59498ef3ffb1df9d Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 12 May 2024 19:50:22 +0200 Subject: [PATCH] Provide prefetch on non GCC target & compatible --- m-core.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/m-core.h b/m-core.h index fa14ffc5..8e88b24a 100644 --- a/m-core.h +++ b/m-core.h @@ -147,7 +147,10 @@ #if defined(__GNUC__) # define M_PREFETCH(p) __builtin_prefetch((p), 0, 0) #else -# define M_PREFETCH(p) (void) 0 +# define M_PREFETCH(p) do { \ + volatile char m_c = *(volatile char *) (p); \ + (void) m_c; \ + } while (0) #endif /* Ignore some warnings detected by some compilers in the library.