uadk_engine/0059-uadk_utils-fix-x86-local-build.patch
2023-08-04 16:24:25 +08:00

60 lines
1.6 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 06fd1fe00a03bfbc7430ec8e1b1f7356f47da55d Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@linaro.org>
Date: Tue, 18 Oct 2022 15:39:11 +0800
Subject: uadk_utils: fix x86 local build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On x86 local build:
autoreconf -i
./configure --libdir=/usr/local/lib/engines-1.1/
make -j4
uadk_utils.c: In function uadk_memcpy:
uadk_utils.c:23:2: error: unknown register name q1 in asm
__asm__ __volatile__(
^
uadk_utils.c:23:2: error: unknown register name q0 in asm
uadk_utils.c:23:2: error: unknown register name x14 in asm
uadk_utils.c:23:2: error: unknown register name x5 in asm
uadk_utils.c:23:2: error: unknown register name x4 in asm
uadk_utils.c:23:2: error: unknown register name x3 in asm
With this patch, x86 build is OK
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
src/uadk_utils.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/uadk_utils.c b/src/uadk_utils.c
index 2b34b3a..275a124 100644
--- a/src/uadk_utils.c
+++ b/src/uadk_utils.c
@@ -16,6 +16,8 @@
*/
#include "uadk_utils.h"
+#if defined(__AARCH64_CMODEL_SMALL__) && __AARCH64_CMODEL_SMALL__
+
#define UADK_MEM_IMPROVE_THRESHOLD 1024
static void *memcpy_large(void *dstpp, const void *srcpp, size_t len)
@@ -61,3 +63,12 @@ void *uadk_memcpy(void *dstpp, const void *srcpp, size_t len)
else
return memcpy(dstpp, srcpp, len);
}
+
+#else
+
+void *uadk_memcpy(void *dstpp, const void *srcpp, size_t len)
+{
+ return memcpy(dstpp, srcpp, len);
+}
+
+#endif
--
1.8.3.1