]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c
ArmPkg/ArmSoftFloatLib: add support for RVCT
[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
7* This program and the accompanying materials\r
8* are licensed and made available under the terms and conditions of the BSD License\r
9* which accompanies this distribution. The full text of the license may be found at\r
10* http://opensource.org/licenses/bsd-license.php\r
11*\r
12* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14*\r
15**/\r
16\r
17/*\r
18 * Written by Richard Earnshaw, 2003. This file is in the Public Domain.\r
19 */\r
20\r
21#include "softfloat-for-gcc.h"\r
22#include "milieu.h"\r
23#include "softfloat.h"\r
24\r
1dbda2b4
AB
25#if defined(LIBC_SCCS) && !defined(lint)\r
26__RCSID("$NetBSD: __aeabi_fcmpun.c,v 1.1 2013/04/16 10:37:39 matt Exp $");\r
27#endif /* LIBC_SCCS and not lint */\r
28\r
29int __aeabi_fcmpun(float32, float32);\r
30\r
31int\r
32__aeabi_fcmpun(float32 a, float32 b)\r
33{\r
34 /*\r
35 * The comparison is unordered if either input is a NaN.\r
36 * Test for this by comparing each operand with itself.\r
37 * We must perform both comparisons to correctly check for\r
38 * signalling NaNs.\r
39 */\r
40 return !float32_eq(a, a) || !float32_eq(b, b);\r
41}\r