about summary refs log tree commit diff
path: root/sysdeps/i386/i686/fpu/e_log.S
blob: 73060b088cbd8b193a3ad650b366f13c0884af82 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Written by J.T. Conklin <jtc@netbsd.org>.
 * Public domain.
 *
 * Adapted for i686 instructions.
 */

#include <machine/asm.h>


	.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)
	fyl2x			// log(x)
	ret
END(__log_finite)