1156cd587Sjoerg//===-- subsf3vfp.S - Implement subsf3vfp ---------------------------------===// 2156cd587Sjoerg// 3156cd587Sjoerg// The LLVM Compiler Infrastructure 4156cd587Sjoerg// 5156cd587Sjoerg// This file is dual licensed under the MIT and the University of Illinois Open 6156cd587Sjoerg// Source Licenses. See LICENSE.TXT for details. 7156cd587Sjoerg// 8156cd587Sjoerg//===----------------------------------------------------------------------===// 9156cd587Sjoerg 10156cd587Sjoerg#include "../assembly.h" 11156cd587Sjoerg 12156cd587Sjoerg// 13156cd587Sjoerg// extern float __subsf3vfp(float a, float b); 14156cd587Sjoerg// 15156cd587Sjoerg// Returns the difference between two single precision floating point numbers 16156cd587Sjoerg// using the Darwin calling convention where single arguments are passsed 17156cd587Sjoerg// like 32-bit ints. 18156cd587Sjoerg// 19156cd587Sjoerg .syntax unified 20*61f2f256Sjoerg .p2align 2 21156cd587SjoergDEFINE_COMPILERRT_FUNCTION(__subsf3vfp) 22156cd587Sjoerg vmov s14, r0 // move first param from r0 into float register 23156cd587Sjoerg vmov s15, r1 // move second param from r1 into float register 24156cd587Sjoerg vsub.f32 s14, s14, s15 25156cd587Sjoerg vmov r0, s14 // move result back to r0 26156cd587Sjoerg bx lr 27156cd587SjoergEND_COMPILERRT_FUNCTION(__subsf3vfp) 28