1994-08-19 07:56:44 +04:00
|
|
|
/*
|
2003-07-26 23:24:24 +04:00
|
|
|
* Written by J.T. Conklin <jtc@NetBSD.org>.
|
1995-04-29 02:43:31 +04:00
|
|
|
* Public domain.
|
1994-08-19 07:56:44 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
2003-07-26 23:24:24 +04:00
|
|
|
RCSID("$NetBSD: s_finitef.S,v 1.6 2003/07/26 19:25:01 salo Exp $")
|
1994-08-19 07:56:44 +04:00
|
|
|
|
|
|
|
ENTRY(finitef)
|
2001-06-19 04:26:29 +04:00
|
|
|
#ifdef __i386__
|
1994-08-19 07:56:44 +04:00
|
|
|
movl 4(%esp),%eax
|
1996-06-04 22:00:34 +04:00
|
|
|
andl $0x7f800000, %eax
|
|
|
|
cmpl $0x7f800000, %eax
|
|
|
|
setne %al
|
1994-08-19 07:56:44 +04:00
|
|
|
andl $0x000000ff, %eax
|
2001-06-19 04:26:29 +04:00
|
|
|
#else
|
|
|
|
xorl %eax,%eax
|
|
|
|
movl $0x7ff00000,%esi
|
|
|
|
movss %xmm0,-4(%rsp)
|
|
|
|
andl -4(%rsp),%esi
|
|
|
|
cmpl $0x7ff00000,%esi
|
|
|
|
setne %al
|
|
|
|
#endif
|
1994-08-19 07:56:44 +04:00
|
|
|
ret
|