5 #include <machine/asm.h>
6 #include <libm-alias-finite.h>
8 .section .rodata.cst8,"aM",@progbits,8
13 ASM_SIZE_DIRECTIVE(one)
14 /* It is not important that this constant is precise. It is only
15 a value which is known to be on the safe side for using the
16 fyl2xp1 instruction. */
19 ASM_SIZE_DIRECTIVE(limit)
23 # define MO(op) op##@GOTOFF(%edx)
29 ENTRY(__ieee754_log10f)
31 flds 4(%esp) // x : log10(2)
37 fld %st // x : x : log10(2)
39 jc 3f // in case x is NaN or ±Inf
40 4: fsubl MO(one) // x-1 : x : log10(2)
41 fld %st // x-1 : x-1 : x : log10(2)
42 fabs // |x-1| : x-1 : x : log10(2)
43 fcompl MO(limit) // x-1 : x : log10(2)
44 fnstsw // x-1 : x : log10(2)
52 fabs // log10(1) is +0 in all rounding modes.
53 5: fstp %st(1) // x-1 : log10(2)
57 2: fstp %st(0) // x : log10(2)
61 3: jp 4b // in case x is ±Inf
65 END (__ieee754_log10f)
66 libm_alias_finite (__ieee754_log10f, __log10f)