diff options
author | ed <ed@FreeBSD.org> | 2011-06-02 20:02:42 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-06-02 20:02:42 +0000 |
commit | ee2dbb0f7e84d908ac62aecc178992c9be1ca636 (patch) | |
tree | 51db692a6c937b68c7180d996af6bb7952b4b55d /lib/adddf3.c | |
parent | cbbb7af7461cc897920c5924c6bdc1fe3b86a7e5 (diff) | |
download | FreeBSD-src-ee2dbb0f7e84d908ac62aecc178992c9be1ca636.zip FreeBSD-src-ee2dbb0f7e84d908ac62aecc178992c9be1ca636.tar.gz |
Import compiler-rt r132478.
Diffstat (limited to 'lib/adddf3.c')
-rw-r--r-- | lib/adddf3.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/adddf3.c b/lib/adddf3.c index c401356..3cc997b 100644 --- a/lib/adddf3.c +++ b/lib/adddf3.c @@ -1,4 +1,4 @@ -//===-- lib/adddf3.c - Double-precision addition and subtraction --*- C -*-===// +//===-- lib/adddf3.c - Double-precision addition ------------------*- C -*-===// // // The LLVM Compiler Infrastructure // @@ -7,15 +7,20 @@ // //===----------------------------------------------------------------------===// // -// This file implements double-precision soft-float addition and subtraction -// with the IEEE-754 default rounding (to nearest, ties to even). +// This file implements double-precision soft-float addition with the IEEE-754 +// default rounding (to nearest, ties to even). // //===----------------------------------------------------------------------===// +#include "abi.h" + #define DOUBLE_PRECISION #include "fp_lib.h" -fp_t __adddf3(fp_t a, fp_t b) { +ARM_EABI_FNALIAS(dadd, adddf3); + +COMPILER_RT_ABI fp_t +__adddf3(fp_t a, fp_t b) { rep_t aRep = toRep(a); rep_t bRep = toRep(b); @@ -147,8 +152,3 @@ fp_t __adddf3(fp_t a, fp_t b) { if (roundGuardSticky == 0x4) result += result & 1; return fromRep(result); } - -// Subtraction; flip the sign bit of b and add. -fp_t __subdf3(fp_t a, fp_t b) { - return __adddf3(a, fromRep(toRep(b) ^ signBit)); -} |