negdf2.c revision 1.3
1155131Srwatson//===-- lib/negdf2.c - double-precision negation ------------------*- C -*-===//
2155131Srwatson//
3155131Srwatson//                     The LLVM Compiler Infrastructure
4155131Srwatson//
5155131Srwatson// This file is dual licensed under the MIT and the University of Illinois Open
6155131Srwatson// Source Licenses. See LICENSE.TXT for details.
7155131Srwatson//
8155131Srwatson//===----------------------------------------------------------------------===//
9155131Srwatson//
10155131Srwatson// This file implements double-precision soft-float negation.
11155131Srwatson//
12155131Srwatson//===----------------------------------------------------------------------===//
13155131Srwatson
14155131Srwatson#define DOUBLE_PRECISION
15155131Srwatson#include "fp_lib.h"
16155131Srwatson
17155131SrwatsonCOMPILER_RT_ABI fp_t
18155131Srwatson__negdf2(fp_t a) {
19155131Srwatson    return fromRep(toRep(a) ^ signBit);
20155131Srwatson}
21155131Srwatson
22155131Srwatson#if defined(__ARM_EABI__)
23155131Srwatson#if defined(COMPILER_RT_ARMHF_TARGET)
24155131SrwatsonAEABI_RTABI fp_t __aeabi_dneg(fp_t a) {
25155131Srwatson  return __negdf2(a);
26155131Srwatson}
27155131Srwatson#else
28155131SrwatsonAEABI_RTABI fp_t __aeabi_dneg(fp_t a) COMPILER_RT_ALIAS(__negdf2);
29156283Srwatson#endif
30155131Srwatson#endif
31155131Srwatson