]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c
ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library
[mirror_edk2.git] / ArmPkg / Library / ArmSoftFloatLib / Arm / __aeabi_fcmpun.c
CommitLineData
1dbda2b4
AB
1/* $NetBSD: __aeabi_fcmpun.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */\r
2\r
3/** @file\r
4*\r
5* Copyright (c) 2013 - 2014, ARM Limited. All rights reserved.\r
6*\r
4059386c 7* SPDX-License-Identifier: BSD-2-Clause-Patent\r
1dbda2b4
AB
8*\r
9**/\r
10\r
11/*\r
12 * Written by Richard Earnshaw, 2003. This file is in the Public Domain.\r
13 */\r
14\r
15#include "softfloat-for-gcc.h"\r
16#include "milieu.h"\r
17#include "softfloat.h"\r
18\r
1dbda2b4
AB
19#if defined(LIBC_SCCS) && !defined(lint)\r
20__RCSID("$NetBSD: __aeabi_fcmpun.c,v 1.1 2013/04/16 10:37:39 matt Exp $");\r
21#endif /* LIBC_SCCS and not lint */\r
22\r
23int __aeabi_fcmpun(float32, float32);\r
24\r
25int\r
26__aeabi_fcmpun(float32 a, float32 b)\r
27{\r
28 /*\r
29 * The comparison is unordered if either input is a NaN.\r
30 * Test for this by comparing each operand with itself.\r
31 * We must perform both comparisons to correctly check for\r
32 * signalling NaNs.\r
33 */\r
34 return !float32_eq(a, a) || !float32_eq(b, b);\r
35}\r