1156cd587Sjoerg//===-- addsf3vfp.S - Implement addsf3vfp ---------------------------------===// 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 __addsf3vfp(float a, float b); 14156cd587Sjoerg// 15156cd587Sjoerg// Adds two single precision floating point numbers using the Darwin 16156cd587Sjoerg// calling convention where single arguments are passsed in GPRs 17156cd587Sjoerg// 18156cd587Sjoerg .syntax unified 19*61f2f256Sjoerg .p2align 2 20156cd587SjoergDEFINE_COMPILERRT_FUNCTION(__addsf3vfp) 21156cd587Sjoerg vmov s14, r0 // move first param from r0 into float register 22156cd587Sjoerg vmov s15, r1 // move second param from r1 into float register 23156cd587Sjoerg vadd.f32 s14, s14, s15 24156cd587Sjoerg vmov r0, s14 // move result back to r0 25156cd587Sjoerg bx lr 26156cd587SjoergEND_COMPILERRT_FUNCTION(__addsf3vfp) 27