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.8 2024/05/08 01:04:03 riastradh Exp $") 9 10WEAK_ALIAS(finite, _finite) 11 12ENTRY(_finite) 13#ifdef __i386__ 14 movl 8(%esp),%eax 15 andl $0x7ff00000, %eax 16 cmpl $0x7ff00000, %eax 17 setne %al 18 andl $0x000000ff, %eax 19#else 20 xorl %eax,%eax 21 movq $0x7ff0000000000000,%rsi 22 movq %rsi,%rdi 23 movsd %xmm0,-8(%rsp) 24 andq -8(%rsp),%rsi 25 cmpq %rdi,%rsi 26 setne %al 27#endif 28 ret 29END(_finite) 30