1168404Spjd//===-- adddf3vfp.S - Implement adddf3vfp ---------------------------------===//
2168404Spjd//
3168404Spjd//                     The LLVM Compiler Infrastructure
4168404Spjd//
5168404Spjd// This file is dual licensed under the MIT and the University of Illinois Open
6168404Spjd// Source Licenses. See LICENSE.TXT for details.
7168404Spjd//
8168404Spjd//===----------------------------------------------------------------------===//
9168404Spjd
10168404Spjd#include "../assembly.h"
11168404Spjd
12168404Spjd//
13168404Spjd// double __adddf3vfp(double a, double b) { return a + b; }
14168404Spjd//
15168404Spjd// Adds two double precision floating point numbers using the Darwin
16168404Spjd// calling convention where double arguments are passsed in GPR pairs
17168404Spjd//
18168404Spjd	.syntax unified
19168404Spjd	.align 2
20168404SpjdDEFINE_COMPILERRT_FUNCTION(__adddf3vfp)
21236884Smm	vmov	d6, r0, r1		// move first param from r0/r1 pair into d6
22168404Spjd	vmov	d7, r2, r3		// move second param from r2/r3 pair into d7
23219089Spjd	vadd.f64 d6, d6, d7
24285202Savg	vmov	r0, r1, d6		// move result back to r0/r1 pair
25168404Spjd	bx	lr
26168404Spjd