10b57cec5SDimitry Andric //===-- lib/divdf3.c - Double-precision division ------------------*- C -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file implements double-precision soft-float division 100b57cec5SDimitry Andric // with the IEEE-754 default rounding (to nearest, ties to even). 110b57cec5SDimitry Andric // 120b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric #define DOUBLE_PRECISION 150b57cec5SDimitry Andric 16*e8d8bef9SDimitry Andric #define NUMBER_OF_HALF_ITERATIONS 3 17*e8d8bef9SDimitry Andric #define NUMBER_OF_FULL_ITERATIONS 1 180b57cec5SDimitry Andric 19*e8d8bef9SDimitry Andric #include "fp_div_impl.inc" 200b57cec5SDimitry Andric __divdf3(fp_t a,fp_t b)21*e8d8bef9SDimitry AndricCOMPILER_RT_ABI fp_t __divdf3(fp_t a, fp_t b) { return __divXf3__(a, b); } 220b57cec5SDimitry Andric 230b57cec5SDimitry Andric #if defined(__ARM_EABI__) 240b57cec5SDimitry Andric #if defined(COMPILER_RT_ARMHF_TARGET) __aeabi_ddiv(fp_t a,fp_t b)250b57cec5SDimitry AndricAEABI_RTABI fp_t __aeabi_ddiv(fp_t a, fp_t b) { return __divdf3(a, b); } 260b57cec5SDimitry Andric #else 270b57cec5SDimitry Andric COMPILER_RT_ALIAS(__divdf3, __aeabi_ddiv) 280b57cec5SDimitry Andric #endif 290b57cec5SDimitry Andric #endif 30