xref: /llvm-project/compiler-rt/lib/builtins/divdf3.c (revision 0e90d8d4fed8c8cac70700acfdef6fc2ca2d482d)
1a6b264b5SAlexey Samsonov //===-- lib/divdf3.c - Double-precision division ------------------*- C -*-===//
2a6b264b5SAlexey Samsonov //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6a6b264b5SAlexey Samsonov //
7a6b264b5SAlexey Samsonov //===----------------------------------------------------------------------===//
8a6b264b5SAlexey Samsonov //
9a6b264b5SAlexey Samsonov // This file implements double-precision soft-float division
10a6b264b5SAlexey Samsonov // with the IEEE-754 default rounding (to nearest, ties to even).
11a6b264b5SAlexey Samsonov //
12a6b264b5SAlexey Samsonov //===----------------------------------------------------------------------===//
13a6b264b5SAlexey Samsonov 
14a6b264b5SAlexey Samsonov #define DOUBLE_PRECISION
15a6b264b5SAlexey Samsonov 
16*0e90d8d4SAnatoly Trosinenko #define NUMBER_OF_HALF_ITERATIONS 3
17*0e90d8d4SAnatoly Trosinenko #define NUMBER_OF_FULL_ITERATIONS 1
18a6b264b5SAlexey Samsonov 
19*0e90d8d4SAnatoly Trosinenko #include "fp_div_impl.inc"
20a6b264b5SAlexey Samsonov 
__divdf3(fp_t a,fp_t b)21*0e90d8d4SAnatoly Trosinenko COMPILER_RT_ABI fp_t __divdf3(fp_t a, fp_t b) { return __divXf3__(a, b); }
2236ac5ddfSSaleem Abdulrasool 
2336ac5ddfSSaleem Abdulrasool #if defined(__ARM_EABI__)
240d586d06SEli Friedman #if defined(COMPILER_RT_ARMHF_TARGET)
__aeabi_ddiv(fp_t a,fp_t b)25082b89b2SPetr Hosek AEABI_RTABI fp_t __aeabi_ddiv(fp_t a, fp_t b) { return __divdf3(a, b); }
260d586d06SEli Friedman #else
2784da0e1bSPetr Hosek COMPILER_RT_ALIAS(__divdf3, __aeabi_ddiv)
2836ac5ddfSSaleem Abdulrasool #endif
290d586d06SEli Friedman #endif
30