1/* 2 * Public domain. 3 * 4 * Adapted for i686 instructions. 5 */ 6 7#include <machine/asm.h> 8#include <libm-alias-finite.h> 9 10 .text 11ENTRY(__ieee754_log) 12 fldln2 // log(2) 13 fldl 4(%esp) // x : log(2) 14 fucomi %st 15 jp 3f 16 fyl2x // log(x) 17 ret 18 193: fstp %st(1) 20 ret 21END (__ieee754_log) 22 23ENTRY(__log_finite) 24 fldln2 // log(2) 25 fldl 4(%esp) // x : log(2) 26 fyl2x // log(x) 27 ret 28END(__log_finite) 29libm_alias_finite (__log_finite, __log) 30