1*0b57cec5SDimitry Andric//===-- adddf3vfp.S - Implement adddf3vfp ---------------------------------===// 2*0b57cec5SDimitry Andric// 3*0b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric// 7*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric 9*0b57cec5SDimitry Andric#include "../assembly.h" 10*0b57cec5SDimitry Andric 11*0b57cec5SDimitry Andric// double __adddf3vfp(double a, double b) { return a + b; } 12*0b57cec5SDimitry Andric// 13*0b57cec5SDimitry Andric// Adds two double precision floating point numbers using the Darwin 14*0b57cec5SDimitry Andric// calling convention where double arguments are passsed in GPR pairs 15*0b57cec5SDimitry Andric 16*0b57cec5SDimitry Andric .syntax unified 17*0b57cec5SDimitry Andric .p2align 2 18*0b57cec5SDimitry AndricDEFINE_COMPILERRT_FUNCTION(__adddf3vfp) 19*0b57cec5SDimitry Andric#if defined(COMPILER_RT_ARMHF_TARGET) 20*0b57cec5SDimitry Andric vadd.f64 d0, d0, d1 21*0b57cec5SDimitry Andric#else 22*0b57cec5SDimitry Andric vmov d6, r0, r1 // move first param from r0/r1 pair into d6 23*0b57cec5SDimitry Andric vmov d7, r2, r3 // move second param from r2/r3 pair into d7 24*0b57cec5SDimitry Andric vadd.f64 d6, d6, d7 25*0b57cec5SDimitry Andric vmov r0, r1, d6 // move result back to r0/r1 pair 26*0b57cec5SDimitry Andric#endif 27*0b57cec5SDimitry Andric bx lr 28*0b57cec5SDimitry AndricEND_COMPILERRT_FUNCTION(__adddf3vfp) 29*0b57cec5SDimitry Andric 30*0b57cec5SDimitry AndricNO_EXEC_STACK_DIRECTIVE 31*0b57cec5SDimitry Andric 32