10b57cec5SDimitry Andric //===-- lib/adddf3.c - Double-precision subtraction ---------------*- 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 // 9*68d75effSDimitry Andric // This file implements double-precision soft-float subtraction. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #define DOUBLE_PRECISION 140b57cec5SDimitry Andric #include "fp_lib.h" 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric // Subtraction; flip the sign bit of b and add. __subdf3(fp_t a,fp_t b)170b57cec5SDimitry AndricCOMPILER_RT_ABI fp_t __subdf3(fp_t a, fp_t b) { 180b57cec5SDimitry Andric return __adddf3(a, fromRep(toRep(b) ^ signBit)); 190b57cec5SDimitry Andric } 200b57cec5SDimitry Andric 210b57cec5SDimitry Andric #if defined(__ARM_EABI__) 220b57cec5SDimitry Andric #if defined(COMPILER_RT_ARMHF_TARGET) __aeabi_dsub(fp_t a,fp_t b)230b57cec5SDimitry AndricAEABI_RTABI fp_t __aeabi_dsub(fp_t a, fp_t b) { return __subdf3(a, b); } 240b57cec5SDimitry Andric #else 250b57cec5SDimitry Andric COMPILER_RT_ALIAS(__subdf3, __aeabi_dsub) 260b57cec5SDimitry Andric #endif 270b57cec5SDimitry Andric #endif 28