Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/addsf3vfp.S
35291 views
//===-- addsf3vfp.S - Implement addsf3vfp ---------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "../assembly.h"910//11// extern float __addsf3vfp(float a, float b);12//13// Adds two single precision floating point numbers using the Darwin14// calling convention where single arguments are passsed in GPRs15//16.syntax unified17.p2align 218DEFINE_COMPILERRT_FUNCTION(__addsf3vfp)19#if defined(COMPILER_RT_ARMHF_TARGET)20vadd.f32 s0, s0, s121#else22vmov s14, r0 // move first param from r0 into float register23vmov s15, r1 // move second param from r1 into float register24vadd.f32 s14, s14, s1525vmov r0, s14 // move result back to r026#endif27bx lr28END_COMPILERRT_FUNCTION(__addsf3vfp)2930NO_EXEC_STACK_DIRECTIVE31323334