Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/floatunssidfvfp.S
35292 views
//===-- floatunssidfvfp.S - Implement floatunssidfvfp ---------------------===//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 __floatunssidfvfp(unsigned int a);12//13// Converts a 32-bit int to a double precision float.14// Uses Darwin calling convention where a double precision result is15// return in GPR register pair.16//17.syntax unified18.p2align 219DEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp)20#if defined(COMPILER_RT_ARMHF_TARGET)21vmov s0, r022vcvt.f64.u32 d0, s023#else24vmov s15, r0 // move int to float register s1525vcvt.f64.u32 d7, s15 // convert 32-bit int in s15 to double in d726vmov r0, r1, d7 // move d7 to result register pair r0/r127#endif28bx lr29END_COMPILERRT_FUNCTION(__floatunssidfvfp)3031NO_EXEC_STACK_DIRECTIVE32333435