1276789Sdim//===-- divdf3vfp.S - Implement divdf3vfp ---------------------------------===//
2276789Sdim//
3276789Sdim//                     The LLVM Compiler Infrastructure
4276789Sdim//
5276789Sdim// This file is dual licensed under the MIT and the University of Illinois Open
6276789Sdim// Source Licenses. See LICENSE.TXT for details.
7276789Sdim//
8276789Sdim//===----------------------------------------------------------------------===//
9276789Sdim
10276789Sdim#include "../assembly.h"
11276789Sdim
12276789Sdim//
13276789Sdim// extern double __divdf3vfp(double a, double b);
14276789Sdim//
15276789Sdim// Divides two double precision floating point numbers using the Darwin
16276789Sdim// calling convention where double arguments are passsed in GPR pairs
17276789Sdim//
18276789Sdim	.syntax unified
19276789Sdim	.p2align 2
20276789SdimDEFINE_COMPILERRT_FUNCTION(__divdf3vfp)
21276789Sdim	vmov	d6, r0, r1		// move first param from r0/r1 pair into d6
22276789Sdim	vmov	d7, r2, r3		// move second param from r2/r3 pair into d7
23276789Sdim	vdiv.f64 d5, d6, d7
24276789Sdim	vmov	r0, r1, d5		// move result back to r0/r1 pair
25276789Sdim	bx	lr
26276789SdimEND_COMPILERRT_FUNCTION(__divdf3vfp)
27