blob: 29c17be4145fb1210eac83f1ddeacd50cc3ca5a9 [file] [log] [blame]
Stephen Canonb6d4e2e2010-07-03 00:56:03 +00001//===-- lib/negsf2.c - single-precision negation ------------------*- C -*-===//
Stephen Canon5c6d2ec2010-07-01 17:58:24 +00002//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnant9ad441f2010-11-16 22:13:33 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Stephen Canon5c6d2ec2010-07-01 17:58:24 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file implements single-precision soft-float negation.
11//
12//===----------------------------------------------------------------------===//
Stephen Canone5086322010-07-01 15:52:42 +000013
14#define SINGLE_PRECISION
15#include "fp_lib.h"
16
Chandler Carruth0193b742012-06-22 21:09:15 +000017ARM_EABI_FNALIAS(fneg, negsf2)
Anton Korobeynikov37b97d12011-04-19 17:51:24 +000018
Anton Korobeynikov1c5f89b2011-04-19 17:52:09 +000019COMPILER_RT_ABI fp_t
20__negsf2(fp_t a) {
Stephen Canone5086322010-07-01 15:52:42 +000021 return fromRep(toRep(a) ^ signBit);
22}