From b84678ea28e9e41874974a6f1220a1dccc0fc5fa Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sat, 5 Nov 2022 21:35:29 +0800 Subject: [PATCH] util: Use util_get_cpu_caps instead cpu_has_sse4_1 macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cpu_has_sse4_1 doesn't belongs to src/util, so do not depends on it, this is a follow up of that u_cpu_detect.* doesn't depends on pipe/p_*.h anymore Signed-off-by: Yonggang Luo Reviewed-by: Marek Olšák Part-of: --- src/util/streaming-load-memcpy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/streaming-load-memcpy.c b/src/util/streaming-load-memcpy.c index 62b5f03e8c4..ec10d8aa981 100644 --- a/src/util/streaming-load-memcpy.c +++ b/src/util/streaming-load-memcpy.c @@ -26,9 +26,9 @@ * */ -#include "main/macros.h" #include "util/streaming-load-memcpy.h" -#include "x86/common_x86_asm.h" +#include "util/u_cpu_detect.h" +#include "util/u_math.h" #ifdef USE_SSE41 #include #endif @@ -44,7 +44,7 @@ util_streaming_load_memcpy(void *restrict dst, void *restrict src, size_t len) #ifdef USE_SSE41 /* If dst and src are not co-aligned, or if SSE4.1 is not present, fallback to memcpy(). */ - if (((uintptr_t)d & 15) != ((uintptr_t)s & 15) || !cpu_has_sse4_1) { + if (((uintptr_t)d & 15) != ((uintptr_t)s & 15) || !util_get_cpu_caps()->has_sse4_1) { memcpy(d, s, len); return; }