1*0a6a1f1dSLionel Sambuc//===-- subsf3vfp.S - Implement subsf3vfp ---------------------------------===// 2*0a6a1f1dSLionel Sambuc// 3*0a6a1f1dSLionel Sambuc// The LLVM Compiler Infrastructure 4*0a6a1f1dSLionel Sambuc// 5*0a6a1f1dSLionel Sambuc// This file is dual licensed under the MIT and the University of Illinois Open 6*0a6a1f1dSLionel Sambuc// Source Licenses. See LICENSE.TXT for details. 7*0a6a1f1dSLionel Sambuc// 8*0a6a1f1dSLionel Sambuc//===----------------------------------------------------------------------===// 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc#include "../assembly.h" 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc// 13*0a6a1f1dSLionel Sambuc// extern float __subsf3vfp(float a, float b); 14*0a6a1f1dSLionel Sambuc// 15*0a6a1f1dSLionel Sambuc// Returns the difference between two single precision floating point numbers 16*0a6a1f1dSLionel Sambuc// using the Darwin calling convention where single arguments are passsed 17*0a6a1f1dSLionel Sambuc// like 32-bit ints. 18*0a6a1f1dSLionel Sambuc// 19*0a6a1f1dSLionel Sambuc .syntax unified 20*0a6a1f1dSLionel Sambuc .p2align 2 21*0a6a1f1dSLionel SambucDEFINE_COMPILERRT_FUNCTION(__subsf3vfp) 22*0a6a1f1dSLionel Sambuc vmov s14, r0 // move first param from r0 into float register 23*0a6a1f1dSLionel Sambuc vmov s15, r1 // move second param from r1 into float register 24*0a6a1f1dSLionel Sambuc vsub.f32 s14, s14, s15 25*0a6a1f1dSLionel Sambuc vmov r0, s14 // move result back to r0 26*0a6a1f1dSLionel Sambuc bx lr 27*0a6a1f1dSLionel SambucEND_COMPILERRT_FUNCTION(__subsf3vfp) 28