11.1Sjtc/*
21.7Ssalo * Written by J.T. Conklin <jtc@NetBSD.org>.
31.3Sjtc * Public domain.
41.1Sjtc */
51.1Sjtc
61.1Sjtc#include <machine/asm.h>
71.1Sjtc
81.8SriastradRCSID("$NetBSD: s_finite.S,v 1.8 2024/05/08 01:04:03 riastradh Exp $")
91.2Sjtc
101.8SriastradWEAK_ALIAS(finite, _finite)
111.8Sriastrad
121.8SriastradENTRY(_finite)
131.6Sfvdl#ifdef __i386__
141.1Sjtc	movl	8(%esp),%eax
151.1Sjtc	andl	$0x7ff00000, %eax
161.1Sjtc	cmpl	$0x7ff00000, %eax
171.5Sjtc	setne	%al
181.1Sjtc	andl	$0x000000ff, %eax
191.6Sfvdl#else
201.6Sfvdl	xorl	%eax,%eax
211.6Sfvdl	movq	$0x7ff0000000000000,%rsi
221.6Sfvdl	movq	%rsi,%rdi
231.6Sfvdl	movsd	%xmm0,-8(%rsp)
241.6Sfvdl	andq	-8(%rsp),%rsi
251.6Sfvdl	cmpq	%rdi,%rsi
261.6Sfvdl	setne	%al
271.6Sfvdl#endif
281.1Sjtc	ret
291.8SriastradEND(_finite)
30