Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
260c8033
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
1 年多 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
260c8033
编写于
12月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
!752 Cherry-pick math function optimization to monthly1018
Merge pull request !752 from guzhihao4/cherry-pick-1671432268
上级
190b61bd
b7aa63c4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
7 deletion
+78
-7
libc-test/src/math/test_src_math.gni
libc-test/src/math/test_src_math.gni
+0
-1
musl_template.gni
musl_template.gni
+78
-6
未找到文件。
libc-test/src/math/test_src_math.gni
浏览文件 @
260c8033
...
...
@@ -91,7 +91,6 @@ math_list = [
"j0",
"j0f",
"j1",
"j1f",
"jn",
"jnf",
"ldexp",
...
...
musl_template.gni
浏览文件 @
260c8033
...
...
@@ -134,8 +134,6 @@ template("musl_libs") {
cflags_c99fse = [
"-std=c99",
"-nostdinc",
"-ffreestanding",
"-frounding-math",
"-Wa,--noexecstack",
]
...
...
@@ -292,6 +290,7 @@ template("musl_libs") {
configs += [ ":soft_musl_config" ]
cflags = [
"-fPIC",
"-ffreestanding",
"-fno-stack-protector",
]
...
...
@@ -341,6 +340,8 @@ template("musl_libs") {
"src/math/pow.c",
"src/math/powf.c",
"src/math/powl.c",
"src/math/sinf.c",
"src/math/cosf.c",
]
} else if (musl_arch == "aarch64") {
sources_orig -= [
...
...
@@ -358,6 +359,23 @@ template("musl_libs") {
"src/string/strnlen.c",
"src/string/strncmp.c",
"src/math/sincosf.c",
"src/math/sinf.c",
"src/math/cosf.c",
"src/math/cos.c",
"src/math/exp.c",
"src/math/exp2.c",
"src/math/exp2f.c",
"src/math/expf.c",
"src/math/log.c",
"src/math/log10.c",
"src/math/log2.c",
"src/math/log2f.c",
"src/math/logb.c",
"src/math/logf.c",
"src/math/sin.c",
"src/math/sincos.c",
"src/math/pow.c",
"src/math/powf.c",
]
} else if (musl_arch == "x86_64") {
sources_orig -= [ "src/thread/${musl_arch}/__set_thread_area.s" ]
...
...
@@ -382,6 +400,7 @@ template("musl_libs") {
}
if (musl_arch == "arm") {
sources += [
"$OPTRTDIR/math/cosf.c",
"$OPTRTDIR/math/exp2.c",
"$OPTRTDIR/math/exp2f.c",
"$OPTRTDIR/math/exp2f_data.c",
...
...
@@ -398,6 +417,7 @@ template("musl_libs") {
"$OPTRTDIR/math/powf.c",
"$OPTRTDIR/math/sincosf.c",
"$OPTRTDIR/math/sincosf_data.c",
"$OPTRTDIR/math/sinf.c",
"$OPTRTDIR/string/arm/memchr.S",
"$OPTRTDIR/string/arm/memcpy.S",
"$OPTRTDIR/string/arm/memset.S",
...
...
@@ -412,10 +432,6 @@ template("musl_libs") {
"-D__strlen_armv6t2 = strlen",
]
} else if (musl_arch == "aarch64") {
sources += [
"$OPTRTDIR/math/sincosf.c",
"$OPTRTDIR/math/sincosf_data.c",
]
if (defined(ARM_FEATURE_SVE)) {
sources += [
"$OPTRTDIR/string/aarch64/memchr-sve.S",
...
...
@@ -510,6 +526,7 @@ template("musl_libs") {
cflags = [
"-O3",
"-fPIC",
"-ffreestanding",
"-fstack-protector-strong",
]
...
...
@@ -543,6 +560,57 @@ template("musl_libs") {
}
}
source_set("soft_musl_src_optimize") {
sources = []
sources_orig = []
if (musl_arch == "aarch64") {
sources_orig += [
"src/math/cos.c",
"src/math/exp.c",
"src/math/exp2.c",
"src/math/exp2f.c",
"src/math/expf.c",
"src/math/log.c",
"src/math/log10.c",
"src/math/log2.c",
"src/math/log2f.c",
"src/math/logb.c",
"src/math/logf.c",
"src/math/sin.c",
"src/math/sincos.c",
"src/math/pow.c",
"src/math/powf.c",
]
}
foreach(s, sources_orig) {
sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ]
}
if (musl_arch == "aarch64") {
sources += [
"$OPTRTDIR/math/cosf.c",
"$OPTRTDIR/math/sincosf.c",
"$OPTRTDIR/math/sincosf_data.c",
"$OPTRTDIR/math/sinf.c",
]
}
configs -= musl_inherited_configs
configs += [ ":soft_musl_config" ]
cflags = [
"-mllvm",
"-instcombine-max-iterations=0",
"-ffp-contract=fast",
"-O3",
"-fPIC",
"-fstack-protector-strong",
]
deps = porting_deps
}
source_set("soft_musl_src_nossp") {
sources = []
sources_orig = [
...
...
@@ -572,6 +640,7 @@ template("musl_libs") {
cflags = [
"-O3",
"-fPIC",
"-ffreestanding",
"-fno-stack-protector",
]
...
...
@@ -590,6 +659,7 @@ template("musl_libs") {
configs += [ ":soft_musl_config" ]
cflags = [
"-fPIC",
"-ffreestanding",
"-fno-stack-protector",
]
if (is_asan) {
...
...
@@ -673,6 +743,7 @@ template("musl_libs") {
":soft_musl_ldso",
":soft_musl_src",
":soft_musl_src_nossp",
":soft_musl_src_optimize",
]
deps += dfx_deps
if (!startup_init_with_param_base) {
...
...
@@ -773,6 +844,7 @@ template("musl_libs") {
":soft_musl_ldso",
":soft_musl_src",
":soft_musl_src_nossp",
":soft_musl_src_optimize",
]
deps += dfx_deps
if (!startup_init_with_param_base) {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录