1/* 2 * Written by J.T. Conklin <jtc@netbsd.org>. 3 * Public domain. 4 */ 5 6#include <machine/asm.h> 7 8RCSID("$NetBSD: s_finite.S,v 1.6 2001/06/19 00:26:30 fvdl Exp $") 9 10ENTRY(finite) 11#ifdef __i386__ 12 movl 8(%esp),%eax 13 andl $0x7ff00000, %eax 14 cmpl $0x7ff00000, %eax 15 setne %al 16 andl $0x000000ff, %eax 17#else 18 xorl %eax,%eax 19 movq $0x7ff0000000000000,%rsi 20 movq %rsi,%rdi 21 movsd %xmm0,-8(%rsp) 22 andq -8(%rsp),%rsi 23 cmpq %rdi,%rsi 24 setne %al 25#endif 26 ret 27