1276789Sdim//===-- lib/adddf3.c - Double-precision subtraction ---------------*- C -*-===// 2276789Sdim// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6276789Sdim// 7276789Sdim//===----------------------------------------------------------------------===// 8276789Sdim// 9360784Sdim// This file implements double-precision soft-float subtraction. 10276789Sdim// 11276789Sdim//===----------------------------------------------------------------------===// 12276789Sdim 13276789Sdim#define DOUBLE_PRECISION 14276789Sdim#include "fp_lib.h" 15276789Sdim 16276789Sdim// Subtraction; flip the sign bit of b and add. 17353358SdimCOMPILER_RT_ABI fp_t __subdf3(fp_t a, fp_t b) { 18353358Sdim return __adddf3(a, fromRep(toRep(b) ^ signBit)); 19276789Sdim} 20276789Sdim 21321369Sdim#if defined(__ARM_EABI__) 22327952Sdim#if defined(COMPILER_RT_ARMHF_TARGET) 23353358SdimAEABI_RTABI fp_t __aeabi_dsub(fp_t a, fp_t b) { return __subdf3(a, b); } 24327952Sdim#else 25353358SdimCOMPILER_RT_ALIAS(__subdf3, __aeabi_dsub) 26321369Sdim#endif 27327952Sdim#endif 28