2011-10-15 03:41:47 +00:00
|
|
|
/*
|
|
|
|
* Public domain.
|
|
|
|
*
|
|
|
|
* Adapted for i686 instructions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <machine/asm.h>
|
2019-07-16 15:17:22 +00:00
|
|
|
#include <libm-alias-finite.h>
|
2011-10-15 03:41:47 +00:00
|
|
|
|
|
|
|
.text
|
|
|
|
ENTRY(__ieee754_log)
|
|
|
|
fldln2 // log(2)
|
|
|
|
fldl 4(%esp) // x : log(2)
|
|
|
|
fucomi %st
|
|
|
|
jp 3f
|
|
|
|
fyl2x // log(x)
|
|
|
|
ret
|
|
|
|
|
|
|
|
3: fstp %st(1)
|
|
|
|
ret
|
|
|
|
END (__ieee754_log)
|
|
|
|
|
|
|
|
ENTRY(__log_finite)
|
|
|
|
fldln2 // log(2)
|
|
|
|
fldl 4(%esp) // x : log(2)
|
2011-10-16 02:21:53 +00:00
|
|
|
fyl2x // log(x)
|
2011-10-15 03:41:47 +00:00
|
|
|
ret
|
|
|
|
END(__log_finite)
|
2019-07-16 15:17:22 +00:00
|
|
|
libm_alias_finite (__log_finite, __log)
|