subdf3.c revision 222625
1222625Sed//===-- lib/adddf3.c - Double-precision subtraction ---------------*- C -*-===// 2222625Sed// 3222625Sed// The LLVM Compiler Infrastructure 4222625Sed// 5222625Sed// This file is dual licensed under the MIT and the University of Illinois Open 6222625Sed// Source Licenses. See LICENSE.TXT for details. 7222625Sed// 8222625Sed//===----------------------------------------------------------------------===// 9222625Sed// 10222625Sed// This file implements double-precision soft-float subtraction with the 11222625Sed// IEEE-754 default rounding (to nearest, ties to even). 12222625Sed// 13222625Sed//===----------------------------------------------------------------------===// 14222625Sed#include "abi.h" 15222625Sed 16222625Sed#define DOUBLE_PRECISION 17222625Sed#include "fp_lib.h" 18222625Sed 19222625Sedfp_t COMPILER_RT_ABI __adddf3(fp_t a, fp_t b); 20222625Sed 21222625Sed 22222625SedARM_EABI_FNALIAS(dsub, subdf3); 23222625Sed 24222625Sed// Subtraction; flip the sign bit of b and add. 25222625SedCOMPILER_RT_ABI fp_t 26222625Sed__subdf3(fp_t a, fp_t b) { 27222625Sed return __adddf3(a, fromRep(toRep(b) ^ signBit)); 28222625Sed} 29222625Sed 30222625Sed/* FIXME: rsub for ARM EABI */ 31