3454a5a101
functions are only for compatibility with obsolete standards. They shouldn't be used, so they shouldn't be optimized. Use the generic versions instead. This fixes scalbf() as a side effect. The optimized asm version left garbage on the FP stack. I fixed the corresponding bug in the optimized asm scalb() and scalbn() in 1996. NetBSD fixed it in scalb(), scalbn() and scalbnf() in 1999 but missed fixing it in scalbf(). Then in 2005 the bug was reimplemented in FreeBSD by importing NetBSD's scalbf(). The generic versions have slightly different error handling: - the asm versions blindly round the second parameter to a (floating point) integer and proceed, while the generic versions return NaN if this rounding changes the value. POSIX permits both behaviours (these functions are XSI extensions and the behaviour for a bogus non-integral second parameter is unspecified). Apart from this and the bug in scalbf(), the behaviour of the generic versions seems to be identical. (I only exhusatively tested generic_scalbf(1.0F, anyfloat) == asm_scalb(1.0F, anyfloat). This covers many representative corner cases involving NaNs and Infs but doesn't test exception flags. The brokenness of scalbf() showed up as weird behaviour after testing just 7 integer cases sequentially.)
20 lines
694 B
Makefile
20 lines
694 B
Makefile
# $FreeBSD$
|
|
|
|
ARCH_SRCS = e_exp.S e_fmod.S e_log.S e_log10.S \
|
|
e_remainder.S e_sqrt.S s_ceil.S s_copysign.S \
|
|
s_cos.S s_finite.S s_floor.S s_llrint.S s_logb.S s_lrint.S \
|
|
s_remquo.S s_rint.S s_scalbn.S s_significand.S s_sin.S s_tan.S \
|
|
s_trunc.S
|
|
|
|
# float counterparts
|
|
ARCH_SRCS+= e_log10f.S e_logf.S e_remainderf.S \
|
|
e_sqrtf.S s_ceilf.S s_copysignf.S s_floorf.S \
|
|
s_llrintf.S s_logbf.S s_lrintf.S \
|
|
s_remquof.S s_rintf.S s_scalbnf.S s_significandf.S s_truncf.S
|
|
|
|
# long double counterparts
|
|
ARCH_SRCS+= s_ceill.S s_copysignl.S s_floorl.S s_scalbnl.S s_truncl.S
|
|
|
|
LDBL_PREC = 64 # XXX 64-bit format, but truncated to 53 bits
|
|
SYM_MAPS += ${.CURDIR}/i387/Symbol.map
|