blob: 5744c015240b68a09511d02433d1db4cb9db009d [file] [log] [blame]
Stephen Canonef005a02010-07-04 06:15:44 +00001//===-- lib/divsf3.c - Single-precision division ------------------*- C -*-===//
2//
Chandler Carruth9d304d22019-01-19 10:56:40 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Stephen Canonef005a02010-07-04 06:15:44 +00006//
7//===----------------------------------------------------------------------===//
8//
9// This file implements single-precision soft-float division
10// with the IEEE-754 default rounding (to nearest, ties to even).
11//
Stephen Canonef005a02010-07-04 06:15:44 +000012//===----------------------------------------------------------------------===//
13
14#define SINGLE_PRECISION
Stephen Canonef005a02010-07-04 06:15:44 +000015
Anatoly Trosinenkod20c9b42020-09-01 19:03:29 +030016#define NUMBER_OF_HALF_ITERATIONS 0
17#define NUMBER_OF_FULL_ITERATIONS 3
18#define USE_NATIVE_FULL_ITERATIONS
Yi Kong86c08122018-12-10 22:52:59 +000019
Anatoly Trosinenkod20c9b42020-09-01 19:03:29 +030020#include "fp_div_impl.inc"
Yi Kong86c08122018-12-10 22:52:59 +000021
Anatoly Trosinenkod20c9b42020-09-01 19:03:29 +030022COMPILER_RT_ABI fp_t __divsf3(fp_t a, fp_t b) { return __divXf3__(a, b); }
Saleem Abdulrasoolae9985e2017-05-16 16:41:37 +000023
24#if defined(__ARM_EABI__)
Eli Friedman8e363af2017-10-03 21:25:07 +000025#if defined(COMPILER_RT_ARMHF_TARGET)
Petr Hoseka3567d52019-04-28 21:53:32 +000026AEABI_RTABI fp_t __aeabi_fdiv(fp_t a, fp_t b) { return __divsf3(a, b); }
Eli Friedman8e363af2017-10-03 21:25:07 +000027#else
Petr Hosek30cd6362019-04-29 00:46:23 +000028COMPILER_RT_ALIAS(__divsf3, __aeabi_fdiv)
Saleem Abdulrasoolae9985e2017-05-16 16:41:37 +000029#endif
Eli Friedman8e363af2017-10-03 21:25:07 +000030#endif