From 5499b93eb2907817fd8472745d509c2f34acea56 Mon Sep 17 00:00:00 2001 From: riastradh Date: Thu, 9 May 2024 00:04:23 +0000 Subject: [PATCH] libm: Split expected symbols in mips further by 32-bit vs 64-bit. 32-bit has binary64 long double, same as double; 64-bit has binary128 long double, which is implemented with a few more symbols in libm (which should maybe be hidden internal symbols, but let's get this diagnostic measure in the build working before we think about possibly deleting private symbols). --- lib/libm/Makefile | 17 +- lib/libm/m.mips.expsym | 29 --- lib/libm/m.mips64.expsym | 503 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 518 insertions(+), 31 deletions(-) create mode 100644 lib/libm/m.mips64.expsym diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 023c13421d51..495c257071ad 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.232 2024/05/08 23:28:07 riastradh Exp $ +# $NetBSD: Makefile,v 1.233 2024/05/09 00:04:23 riastradh Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -206,7 +206,6 @@ ARCH_SRCS += s_fma.S s_fmaf.S .PATH: ${.CURDIR}/arch/mips .if ${MKSOFTFLOAT} == "no" COMMON_SRCS += fenv.c -LIB_EXPSYM= ${LIB}.mipshf.expsym .endif .if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) COMMON_SRCS+= s_nexttoward.c @@ -214,6 +213,20 @@ COMMON_SRCS+= s_rintl.c .endif COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c +. if ${MKSOFTFLOAT} == "no" +. if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) +LIB_EXPSYM= m.mips64hf.expsym +. else +LIB_EXPSYM= m.mipshf.expsym +. endif +. else +. if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) +LIB_EXPSYM= m.mips64.expsym +. else +LIB_EXPSYM= m.mips.expsym +. endif +. endif + .elif (${LIBC_MACHINE_CPU} == "sh3") .PATH: ${.CURDIR}/arch/sh3 .if ${MKSOFTFLOAT} == "no" diff --git a/lib/libm/m.mips.expsym b/lib/libm/m.mips.expsym index 832dd96966b4..d8ae28ed280e 100644 --- a/lib/libm/m.mips.expsym +++ b/lib/libm/m.mips.expsym @@ -1,26 +1,3 @@ -_ItL_aT -_ItL_atanhi -_ItL_atanlo -_ItL_pS0 -_ItL_pS1 -_ItL_pS2 -_ItL_pS3 -_ItL_pS4 -_ItL_pS5 -_ItL_pS6 -_ItL_pS7 -_ItL_pS8 -_ItL_pS9 -_ItL_pi_lo -_ItL_qS1 -_ItL_qS2 -_ItL_qS3 -_ItL_qS4 -_ItL_qS5 -_ItL_qS6 -_ItL_qS7 -_ItL_qS8 -_ItL_qS9 __c99_cabs __c99_cabsf __c99_cabsl @@ -73,7 +50,6 @@ __ieee754_sinh __ieee754_sinhf __ieee754_sqrt __ieee754_sqrtf -__ieee754_sqrtl __ieee754_y0 __ieee754_y0f __ieee754_y1 @@ -82,16 +58,13 @@ __ieee754_yn __ieee754_ynf __kernel_cos __kernel_cosf -__kernel_cosl __kernel_rem_pio2 __kernel_rem_pio2f __kernel_sin __kernel_sinf -__kernel_sinl __kernel_standard __kernel_tan __kernel_tanf -__kernel_tanl __log__D __muldc3 __mulsc3 @@ -330,7 +303,6 @@ expm1 expm1f expm1l fabsf -fabsl fdim fdimf fdiml @@ -378,7 +350,6 @@ hypotl ilogb ilogbf ilogbl -imprecise_tgammal isinff isnanf j0 diff --git a/lib/libm/m.mips64.expsym b/lib/libm/m.mips64.expsym new file mode 100644 index 000000000000..832dd96966b4 --- /dev/null +++ b/lib/libm/m.mips64.expsym @@ -0,0 +1,503 @@ +_ItL_aT +_ItL_atanhi +_ItL_atanlo +_ItL_pS0 +_ItL_pS1 +_ItL_pS2 +_ItL_pS3 +_ItL_pS4 +_ItL_pS5 +_ItL_pS6 +_ItL_pS7 +_ItL_pS8 +_ItL_pS9 +_ItL_pi_lo +_ItL_qS1 +_ItL_qS2 +_ItL_qS3 +_ItL_qS4 +_ItL_qS5 +_ItL_qS6 +_ItL_qS7 +_ItL_qS8 +_ItL_qS9 +__c99_cabs +__c99_cabsf +__c99_cabsl +__divdc3 +__divsc3 +__divxc3 +__exp__D +__ieee754_acos +__ieee754_acosf +__ieee754_acosh +__ieee754_acoshf +__ieee754_asin +__ieee754_asinf +__ieee754_atan2 +__ieee754_atan2f +__ieee754_atanh +__ieee754_atanhf +__ieee754_cosh +__ieee754_coshf +__ieee754_exp +__ieee754_expf +__ieee754_fmod +__ieee754_fmodf +__ieee754_fmodl +__ieee754_hypot +__ieee754_hypotf +__ieee754_j0 +__ieee754_j0f +__ieee754_j1 +__ieee754_j1f +__ieee754_jn +__ieee754_jnf +__ieee754_lgamma_r +__ieee754_lgammaf_r +__ieee754_log +__ieee754_log10 +__ieee754_log10f +__ieee754_log2 +__ieee754_log2f +__ieee754_logf +__ieee754_pow +__ieee754_powf +__ieee754_rem_pio2 +__ieee754_rem_pio2f +__ieee754_remainder +__ieee754_remainderf +__ieee754_scalb +__ieee754_scalbf +__ieee754_sinh +__ieee754_sinhf +__ieee754_sqrt +__ieee754_sqrtf +__ieee754_sqrtl +__ieee754_y0 +__ieee754_y0f +__ieee754_y1 +__ieee754_y1f +__ieee754_yn +__ieee754_ynf +__kernel_cos +__kernel_cosf +__kernel_cosl +__kernel_rem_pio2 +__kernel_rem_pio2f +__kernel_sin +__kernel_sinf +__kernel_sinl +__kernel_standard +__kernel_tan +__kernel_tanf +__kernel_tanl +__log__D +__muldc3 +__mulsc3 +__mulxc3 +_acoshl +_acosl +_asin +_asinf +_asinhl +_asinl +_atan2 +_atan2f +_atan2l +_atanhl +_atanl +_casin +_casinf +_casinl +_catan +_catanf +_catanl +_cbrtl +_cchsh +_cchshf +_cchshl +_ceill +_copysignl +_cos +_cosf +_cosh +_coshf +_coshl +_cosl +_cospi +_cospif +_cospil +_ctans +_ctansf +_ctansl +_end +_erfcl +_erfl +_exp +_exp2l +_expf +_expl +_expm1l +_fdlib_version +_feclearexcept +_fedisableexcept +_feenableexcept +_fegetenv +_fegetexcept +_fegetexceptflag +_fegetround +_feholdexcept +_feraiseexcept +_fesetenv +_fesetexceptflag +_fesetround +_fetestexcept +_feupdateenv +_fini +_finite +_finitef +_floorl +_fmodl +_hypot +_hypotf +_hypotl +_init +_lgammal +_lgammal_r +_log +_log10l +_log1pl +_log2l +_logf +_logl +_modfl +_powl +_redupi +_redupif +_redupil +_remquo +_remquof +_remquol +_roundl +_scalbln +_scalblnf +_scalblnl +_scalbn +_scalbnf +_scalbnl +_sin +_sincos +_sincosf +_sincosl +_sinf +_sinh +_sinhf +_sinhl +_sinl +_sinpi +_sinpif +_sinpil +_sqrtl +_tan +_tanf +_tanhl +_tanl +_tanpi +_tanpif +_tanpil +_tgammal +_truncl +acos +acosf +acosh +acoshf +acoshl +acosl +asin +asinf +asinh +asinhf +asinhl +asinl +atan +atan2 +atan2f +atan2l +atanf +atanh +atanhf +atanhl +atanl +cabs +cabsf +cacos +cacosf +cacosh +cacoshf +cacoshl +cacosl +carg +cargf +cargl +casin +casinf +casinh +casinhf +casinhl +casinl +catan +catanf +catanh +catanhf +catanhl +catanl +cbrt +cbrtf +cbrtl +ccos +ccosf +ccosh +ccoshf +ccoshl +ccosl +ceil +ceilf +ceill +cexp +cexpf +cexpl +cimag +cimagf +cimagl +clog +clogf +clogl +conj +conjf +conjl +copysign +copysignf +copysignl +cos +cosf +cosh +coshf +coshl +cosl +cospi +cospif +cospil +cpow +cpowf +cpowl +cproj +cprojf +cprojl +creal +crealf +creall +csin +csinf +csinh +csinhf +csinhl +csinl +csqrt +csqrtf +csqrtl +ctan +ctanf +ctanh +ctanhf +ctanhl +ctanl +drem +dremf +erf +erfc +erfcf +erfcl +erff +erfl +exp +exp2 +exp2f +exp2l +expf +expl +expm1 +expm1f +expm1l +fabsf +fabsl +fdim +fdimf +fdiml +feclearexcept +fedisableexcept +feenableexcept +fegetenv +fegetexcept +fegetexceptflag +fegetround +feholdexcept +feraiseexcept +fesetenv +fesetexceptflag +fesetround +fetestexcept +feupdateenv +finite +finitef +floor +floorf +floorl +fma +fmaf +fmal +fmax +fmaxf +fmaxl +fmin +fminf +fminl +fmod +fmodf +fmodl +frexp +frexpf +frexpl +gamma +gamma_r +gammaf +gammaf_r +hypot +hypotf +hypotl +ilogb +ilogbf +ilogbl +imprecise_tgammal +isinff +isnanf +j0 +j0f +j1 +j1f +jn +jnf +ldexp +ldexpf +ldexpl +lgamma +lgamma_r +lgammaf +lgammaf_r +lgammal +lgammal_r +llrint +llrintf +llrintl +llround +llroundf +llroundl +log +log10 +log10f +log10l +log1p +log1pf +log1pl +log2 +log2f +log2l +logb +logbf +logbl +logf +logl +lrint +lrintf +lrintl +lround +lroundf +lroundl +matherr +modf +modff +modfl +nan +nanf +nanl +nearbyint +nearbyintf +nearbyintl +nextafter +nextafterf +nextafterl +nexttoward +nexttowardf +nexttowardl +pow +powf +powl +remainder +remainderf +remainderl +remquo +remquof +remquol +rint +rintf +rintl +round +roundf +roundl +scalb +scalbf +scalbln +scalblnf +scalblnl +scalbn +scalbnf +scalbnl +signgam +significand +significandf +sin +sincos +sincosf +sincosl +sinf +sinh +sinhf +sinhl +sinl +sinpi +sinpif +sinpil +sqrt +sqrtf +sqrtl +tan +tanf +tanh +tanhf +tanhl +tanl +tanpi +tanpif +tanpil +tgamma +tgammaf +tgammal +trunc +truncf +truncl +y0 +y0f +y1 +y1f +yn +ynf