提交 bc342ae0 编写于 作者: F fangting

memcpy性能优化

Signed-off-by: Nfangting <fangting10@huawei.com>
上级 21b33e18
import("//build/ohos.gni")
import("//third_party/optimized-routines/optimized-routines.gni")
import("musl_src.gni")
template("musl_libs") {
no_default_deps = true
......@@ -271,9 +271,16 @@ template("musl_libs") {
]
if (musl_arch == "arm") {
sources_orig -= [ "src/thread/${musl_arch}/__set_thread_area.c" ]
sources_orig -= [
"src/thread/${musl_arch}/__set_thread_area.c",
"src/string/arm/memcpy.c",
"src/string/arm/memcpy_le.S",
]
} else if (musl_arch == "aarch64") {
sources_orig -= [ "src/thread/${musl_arch}/__set_thread_area.s" ]
sources_orig -= [
"src/thread/${musl_arch}/__set_thread_area.s",
"src/string/memcpy.c",
]
}
if ("${target_abi}" == "a7_hard_neon-vfpv4") {
......@@ -283,6 +290,13 @@ template("musl_libs") {
foreach(s, sources_orig) {
sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ]
}
if (musl_arch == "arm") {
sources += [ "$OPTRTDIR/string/arm/memcpy.S" ]
asmflags = [ "-D__memcpy_arm = memcpy" ]
} else if (musl_arch == "aarch64") {
sources += [ "$OPTRTDIR/string/aarch64/memcpy.S" ]
asmflags = [ "-D__memcpy_aarch64 = memcpy" ]
}
cflags = [
"-O3",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册