subdf3.c revision 276789
1276789Sdim//===-- lib/adddf3.c - Double-precision subtraction ---------------*- C -*-===// 2276789Sdim// 3276789Sdim// The LLVM Compiler Infrastructure 4276789Sdim// 5276789Sdim// This file is dual licensed under the MIT and the University of Illinois Open 6276789Sdim// Source Licenses. See LICENSE.TXT for details. 7276789Sdim// 8276789Sdim//===----------------------------------------------------------------------===// 9276789Sdim// 10276789Sdim// This file implements double-precision soft-float subtraction with the 11276789Sdim// IEEE-754 default rounding (to nearest, ties to even). 12276789Sdim// 13276789Sdim//===----------------------------------------------------------------------===// 14276789Sdim 15276789Sdim#define DOUBLE_PRECISION 16276789Sdim#include "fp_lib.h" 17276789Sdim 18276789SdimARM_EABI_FNALIAS(dsub, subdf3) 19276789Sdim 20276789Sdim// Subtraction; flip the sign bit of b and add. 21276789SdimCOMPILER_RT_ABI fp_t 22276789Sdim__subdf3(fp_t a, fp_t b) { 23276789Sdim return __adddf3(a, fromRep(toRep(b) ^ signBit)); 24276789Sdim} 25276789Sdim 26276789Sdim/* FIXME: rsub for ARM EABI */ 27