shithub: riscv

ref: 8a4a2dea70aa77475a50968f4c5bd6cdab5d2fb1
dir: /sys/src/libc/386/387/log.s/

View raw version
TEXT	log(SB), $0
	FMOVD	$0.69314718055994530941, F0
	FMOVD	a+0(FP), F0

	FTST
	WAIT
	FSTSW	AX
	SAHF
	JLO	bad

	FYL2X
	RET

TEXT	log10(SB), $0
	FMOVD	$0.30102999566398119521, F0
	FMOVD	a+0(FP), F0

	FTST
	WAIT
	FSTSW	AX
	SAHF
	JLO	bad

	FYL2X
	RET

bad:
	FMOVDP	F0, F0
	FMOVDP	F0, F0
	CALL	NaN(SB)
	RET