Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/extendsfdf2vfp.S
35292 views
//===-- extendsfdf2vfp.S - Implement extendsfdf2vfp -----------------------===//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 double __extendsfdf2vfp(float a);12//13// Converts single precision float to double precision result.14// Uses Darwin calling convention where a single precision parameter is15// passed in a GPR and a double precision result is returned in R0/R1 pair.16//17.syntax unified18.p2align 219DEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp)20#if defined(COMPILER_RT_ARMHF_TARGET)21vcvt.f64.f32 d0, s022#else23vmov s15, r0 // load float register from R024vcvt.f64.f32 d7, s15 // convert single to double25vmov r0, r1, d7 // return result in r0/r1 pair26#endif27bx lr28END_COMPILERRT_FUNCTION(__extendsfdf2vfp)2930NO_EXEC_STACK_DIRECTIVE31323334