blob: c5c1a41c3611a51eb254caca3d0853764a182da9 [file] [log] [blame]
Daniel Dunbarf3798a32011-03-21 23:30:19 +00001//===-- lib/addsf3.c - Single-precision addition ------------------*- C -*-===//
Stephen Canon74eaf1f2010-07-01 17:58:24 +00002//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnant5b791f62010-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 Canon74eaf1f2010-07-01 17:58:24 +00007//
8//===----------------------------------------------------------------------===//
9//
Daniel Dunbarf3798a32011-03-21 23:30:19 +000010// This file implements single-precision soft-float addition with the IEEE-754
11// default rounding (to nearest, ties to even).
Stephen Canon74eaf1f2010-07-01 17:58:24 +000012//
13//===----------------------------------------------------------------------===//
Stephen Canonb1fdde12010-07-01 15:52:42 +000014
15#define SINGLE_PRECISION
Joerg Sonnenbergerd21cd142014-05-28 15:06:25 +000016#include "fp_add_impl.inc"
Stephen Canonb1fdde12010-07-01 15:52:42 +000017
Joerg Sonnenbergerd21cd142014-05-28 15:06:25 +000018COMPILER_RT_ABI float __addsf3(float a, float b) {
19 return __addXf3__(a, b);
Stephen Canonb1fdde12010-07-01 15:52:42 +000020}
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000021
22#if defined(__ARM_EABI__)
Eli Friedman0d586d02017-10-03 21:25:07 +000023#if defined(COMPILER_RT_ARMHF_TARGET)
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000024AEABI_RTABI float __aeabi_fadd(float a, float b) {
25 return __addsf3(a, b);
26}
Eli Friedman0d586d02017-10-03 21:25:07 +000027#else
28AEABI_RTABI float __aeabi_fadd(float a, float b) COMPILER_RT_ALIAS(__addsf3);
Saleem Abdulrasool36ac5dd2017-05-16 16:41:37 +000029#endif
Eli Friedman0d586d02017-10-03 21:25:07 +000030#endif