diff options
author | attilio <attilio@FreeBSD.org> | 2011-06-04 22:05:20 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-06-04 22:05:20 +0000 |
commit | 8e66ca1ff16b21df31a40fa743f8df3844507305 (patch) | |
tree | 7235c316aab81a86e3bfc131b1abae5475040624 /contrib/compiler-rt/lib/addsf3.c | |
parent | 91525e4ff96713dd3149a3477069cc7213d0abae (diff) | |
parent | 786c89f781c52e7423abdc562256ef0830f60be6 (diff) | |
download | FreeBSD-src-8e66ca1ff16b21df31a40fa743f8df3844507305.zip FreeBSD-src-8e66ca1ff16b21df31a40fa743f8df3844507305.tar.gz |
MFC
Diffstat (limited to 'contrib/compiler-rt/lib/addsf3.c')
-rw-r--r-- | contrib/compiler-rt/lib/addsf3.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/contrib/compiler-rt/lib/addsf3.c b/contrib/compiler-rt/lib/addsf3.c index fec14e8..20610ef 100644 --- a/contrib/compiler-rt/lib/addsf3.c +++ b/contrib/compiler-rt/lib/addsf3.c @@ -1,20 +1,24 @@ -//===-- lib/addsf3.c - Single-precision addition and subtraction --*- C -*-===// +//===-- lib/addsf3.c - Single-precision addition ------------------*- C -*-===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // -// This file implements single-precision soft-float addition and subtraction -// with the IEEE-754 default rounding (to nearest, ties to even). +// This file implements single-precision soft-float addition with the IEEE-754 +// default rounding (to nearest, ties to even). // //===----------------------------------------------------------------------===// +#include "abi.h" + #define SINGLE_PRECISION #include "fp_lib.h" +ARM_EABI_FNALIAS(fadd, addsf3); + fp_t __addsf3(fp_t a, fp_t b) { rep_t aRep = toRep(a); @@ -147,18 +151,3 @@ fp_t __addsf3(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 __subsf3(fp_t a, fp_t b) { - return __addsf3(a, fromRep(toRep(b) ^ signBit)); -} - - - - - - - - - - |