divdf3vfp.S revision 236011
1310184Smm//===-- divdf3vfp.S - Implement divdf3vfp ---------------------------------===//
2310184Smm//
3310184Smm//                     The LLVM Compiler Infrastructure
4310184Smm//
5310184Smm// This file is dual licensed under the MIT and the University of Illinois Open
6310184Smm// Source Licenses. See LICENSE.TXT for details.
7310184Smm//
8310184Smm//===----------------------------------------------------------------------===//
9310184Smm
10310184Smm#include "../assembly.h"
11310184Smm
12310184Smm//
13310184Smm// extern double __divdf3vfp(double a, double b);
14310184Smm//
15310184Smm// Divides two double precision floating point numbers using the Darwin
16310184Smm// calling convention where double arguments are passsed in GPR pairs
17310184Smm//
18310184Smm	.syntax unified
19310184Smm	.align 2
20310184SmmDEFINE_COMPILERRT_FUNCTION(__divdf3vfp)
21310184Smm	vmov	d6, r0, r1		// move first param from r0/r1 pair into d6
22310184Smm	vmov	d7, r2, r3		// move second param from r2/r3 pair into d7
23310184Smm	vdiv.f64 d5, d6, d7
24310184Smm	vmov	r0, r1, d5		// move result back to r0/r1 pair
25358088Smm	bx	lr
26310184Smm