shithub: riscv

ref: 1647696236f2d10e70cd8a0fc2a04fabfa5f63a6
dir: /sys/src/libc/386/387/sqrt.s/

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

	FTST
	WAIT
	FSTSW	AX
	SAHF
	JLO	bad

	FSQRT
	RET

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