📄 import_intel_libm
字号:
#!/bin/sh# Notes:# We don't import copysign finite, fpclassify, isinf, isnan, and signbit# since our own versions are nicer and just as correct and fast (except# perhaps that they don't handle non-finite arguments well?).## Also, leave out cabs for now since it doesn't seem overridable in# glibc.libm_dir=$1import_s() { # $1 = name # $2 = source file-name # $3 = destination file-name echo "Importing $1 from $2 -> $3" rm -f $3 awk -f import_file.awk FUNC=$1 $2 > $3}import_c() { # $1 = name # $2 = source file-name # $3 = destination file-name echo "Importing $1 from $2 -> $3" rm -f $3 awk -f import_file.awk LICENSE_ONLY=y $2 > $3}do_imports() { while read func_pattern src_file dst_file; do case $src_file in *.[ch]) import_c "$func_pattern" "$src_file" "$dst_file" ;; *) import_s "$func_pattern" "$src_file" "$dst_file" ;; esac done}./gen_import_file_list $libm_dir > import_file_listdo_imports < import_file_listemptyfiles="e_gamma_r.ce_gammaf_r.ce_gammal_r.cs_sincos.cs_sincosf.cs_sincosl.ct_exp.cw_acosh.cw_acoshf.cw_acoshl.cw_atanh.cw_atanhf.cw_atanhl.cw_exp10.cw_exp10f.cw_exp10l.cw_exp2.cw_exp2f.cw_exp2l.cw_expl.cw_lgamma_r.cw_lgammaf_r.cw_lgammal_r.cw_log2.cw_log2f.cw_log2l.cw_sinh.cw_sinhf.cw_sinhl.c"for f in $emptyfilesdo rm -f $f echo "/* Not needed. */" > $fdoneremovedfiles="libm_atan2_reg.Ss_ldexp.Ss_ldexpf.Ss_ldexpl.Ss_scalbn.Ss_scalbnf.Ss_scalbnl.S"rm -f $removedfilesfor f in lgammaf_r.c lgammal_r.c lgamma_r.cdo import_c $f $libm_dir/$f e_$fdonefor f in lgamma.c lgammaf.c lgammal.cdo import_c $f $libm_dir/$f w_$fdone
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -