subsf3.c revision 222625
1222625Sed//===-- lib/subsf3.c - Single-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 single-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 SINGLE_PRECISION 17222625Sed#include "fp_lib.h" 18222625Sed 19222625Sedfp_t COMPILER_RT_ABI __addsf3(fp_t a, fp_t b); 20222625Sed 21222625SedARM_EABI_FNALIAS(fsub, subsf3); 22222625Sed 23222625Sed// Subtraction; flip the sign bit of b and add. 24222625SedCOMPILER_RT_ABI fp_t 25222625Sed__subsf3(fp_t a, fp_t b) { 26222625Sed return __addsf3(a, fromRep(toRep(b) ^ signBit)); 27222625Sed} 28222625Sed 29222625Sed/* FIXME: rsub for ARM EABI */ 30