GCC-3 requires a libcall to support testing for unordered.
This commit is contained in:
parent
7d8f3e39e7
commit
033db35cb2
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.2 2002/05/21 23:51:05 bjh21 Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.3 2003/05/06 08:58:20 rearnsha Exp $
|
||||
|
||||
SOFTFLOAT_BITS?=64
|
||||
.PATH: ${ARCHDIR}/softfloat \
|
||||
|
@ -13,4 +13,5 @@ SRCS+= fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \
|
|||
fpgetsticky.c fpsetsticky.c
|
||||
|
||||
SRCS+= eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \
|
||||
eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c
|
||||
eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \
|
||||
unordsf2.c unorddf2.c
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/* $NetBSD: unorddf2.c,v 1.1 2003/05/06 08:58:19 rearnsha Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Richard Earnshaw, 2003. This file is in the Public Domain.
|
||||
*/
|
||||
|
||||
#include "softfloat-for-gcc.h"
|
||||
#include "milieu.h"
|
||||
#include "softfloat.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: unorddf2.c,v 1.1 2003/05/06 08:58:19 rearnsha Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
flag __unorddf2(float64, float64);
|
||||
|
||||
flag
|
||||
__unorddf2(float64 a, float64 b)
|
||||
{
|
||||
/*
|
||||
* The comparison is unordered if either input is a NaN.
|
||||
* Test for this by comparing each operand with itself.
|
||||
* We must perform both comparisons to correctly check for
|
||||
* signalling NaNs.
|
||||
*/
|
||||
return 1 ^ (float64_eq(a, a) & float64_eq(b, b));
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/* $NetBSD: unordsf2.c,v 1.1 2003/05/06 08:58:20 rearnsha Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Richard Earnshaw, 2003. This file is in the Public Domain.
|
||||
*/
|
||||
|
||||
#include "softfloat-for-gcc.h"
|
||||
#include "milieu.h"
|
||||
#include "softfloat.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: unordsf2.c,v 1.1 2003/05/06 08:58:20 rearnsha Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
flag __unordsf2(float32, float32);
|
||||
|
||||
flag
|
||||
__unordsf2(float32 a, float32 b)
|
||||
{
|
||||
/*
|
||||
* The comparison is unordered if either input is a NaN.
|
||||
* Test for this by comparing each operand with itself.
|
||||
* We must perform both comparisons to correctly check for
|
||||
* signalling NaNs.
|
||||
*/
|
||||
return 1 ^ (float32_eq(a, a) & float32_eq(b, b));
|
||||
}
|
Loading…
Reference in New Issue