aeabi floating compare ops are different from the normal gcc softfloat ones.

This commit is contained in:
matt 2013-04-16 10:37:39 +00:00
parent 215e9630c0
commit 9be231ea7c
12 changed files with 286 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_dcmpeq.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. This file is in the Public Domain.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: __aeabi_dcmpeq.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "softfloat-for-gcc.h"
#include "milieu.h"
#include "softfloat.h"
int __aeabi_dcmpeq(float64, float64);
int
__aeabi_dcmpeq(float64 a, float64 b)
{
return float64_eq(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_dcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_dcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_dcmpge(float64, float64);
int
__aeabi_dcmpge(float64 a, float64 b)
{
return !float64_lt(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_dcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_dcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_dcmpgt(float64, float64);
int
__aeabi_dcmpgt(float64 a, float64 b)
{
return !float64_le(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_dcmple.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_dcmple.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_dcmple(float64, float64);
int
__aeabi_dcmple(float64 a, float64 b)
{
return float64_le(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_dcmplt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_dcmplt.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_dcmplt(float64, float64);
int
__aeabi_dcmplt(float64 a, float64 b)
{
return float64_lt(a, b);
}

View File

@ -0,0 +1,28 @@
/* $NetBSD: __aeabi_dcmpun.c,v 1.1 2013/04/16 10:37:39 matt 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: __aeabi_dcmpun.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_dcmpun(float64, float64);
int
__aeabi_dcmpun(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 !float64_eq(a, a) || !float64_eq(b, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_fcmpeq.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. This file is in the Public Domain.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: __aeabi_fcmpeq.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "softfloat-for-gcc.h"
#include "milieu.h"
#include "softfloat.h"
int __aeabi_fcmpeq(float32, float32);
int
__aeabi_fcmpeq(float32 a, float32 b)
{
return float32_eq(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_fcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_fcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_fcmpge(float32, float32);
int
__aeabi_fcmpge(float32 a, float32 b)
{
return !float32_lt(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_fcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_fcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_fcmpgt(float32, float32);
int
__aeabi_fcmpgt(float32 a, float32 b)
{
return !float32_le(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_fcmple.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_fcmple.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_fcmple(float32, float32);
int
__aeabi_fcmple(float32 a, float32 b)
{
return float32_le(a, b);
}

View File

@ -0,0 +1,23 @@
/* $NetBSD: __aeabi_fcmplt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */
/*
* Written by Ben Harris, 2000. 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: __aeabi_fcmplt.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_fcmplt(float32, float32);
int
__aeabi_fcmplt(float32 a, float32 b)
{
return float32_lt(a, b);
}

View File

@ -0,0 +1,28 @@
/* $NetBSD: __aeabi_fcmpun.c,v 1.1 2013/04/16 10:37:39 matt 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: __aeabi_fcmpun.c,v 1.1 2013/04/16 10:37:39 matt Exp $");
#endif /* LIBC_SCCS and not lint */
int __aeabi_fcmpun(float32, float32);
int
__aeabi_fcmpun(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 !float32_eq(a, a) || !float32_eq(b, b);
}