s_finite.S revision 1.6
11.1Sjtc/*
21.3Sjtc * 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.6SfvdlRCSID("$NetBSD: s_finite.S,v 1.6 2001/06/19 00:26:30 fvdl Exp $")
91.2Sjtc
101.1SjtcENTRY(finite)
111.6Sfvdl#ifdef __i386__
121.1Sjtc	movl	8(%esp),%eax
131.1Sjtc	andl	$0x7ff00000, %eax
141.1Sjtc	cmpl	$0x7ff00000, %eax
151.5Sjtc	setne	%al
161.1Sjtc	andl	$0x000000ff, %eax
171.6Sfvdl#else
181.6Sfvdl	xorl	%eax,%eax
191.6Sfvdl	movq	$0x7ff0000000000000,%rsi
201.6Sfvdl	movq	%rsi,%rdi
211.6Sfvdl	movsd	%xmm0,-8(%rsp)
221.6Sfvdl	andq	-8(%rsp),%rsi
231.6Sfvdl	cmpq	%rdi,%rsi
241.6Sfvdl	setne	%al
251.6Sfvdl#endif
261.1Sjtc	ret
27