190792Sgshapiro//===-- divsf3vfp.S - Implement divsf3vfp ---------------------------------===//
2261363Sgshapiro//
390792Sgshapiro//                     The LLVM Compiler Infrastructure
490792Sgshapiro//
590792Sgshapiro// This file is dual licensed under the MIT and the University of Illinois Open
690792Sgshapiro// Source Licenses. See LICENSE.TXT for details.
790792Sgshapiro//
890792Sgshapiro//===----------------------------------------------------------------------===//
990792Sgshapiro
1090792Sgshapiro#include "../assembly.h"
11266692Sgshapiro
1290792Sgshapiro//
1390792Sgshapiro// extern float __divsf3vfp(float a, float b);
1490792Sgshapiro//
1590792Sgshapiro// Divides two single precision floating point numbers using the Darwin
1690792Sgshapiro// calling convention where single arguments are passsed like 32-bit ints.
1790792Sgshapiro//
1890792Sgshapiro	.syntax unified
1990792Sgshapiro	.align 2
20203004SgshapiroDEFINE_COMPILERRT_FUNCTION(__divsf3vfp)
21203004Sgshapiro	vmov	s14, r0		// move first param from r0 into float register
22203004Sgshapiro	vmov	s15, r1		// move second param from r1 into float register
23203004Sgshapiro	vdiv.f32 s13, s14, s15
2490792Sgshapiro	vmov	r0, s13		// move result back to r0
2590792Sgshapiro	bx	lr
2690792Sgshapiro