Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/floatunssisfvfp.S
35291 views
//===-- floatunssisfvfp.S - Implement floatunssisfvfp ---------------------===//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 __floatunssisfvfp(unsigned int a);12//13// Converts single precision float to a 32-bit int rounding towards zero.14// Uses Darwin calling convention where a single precision result is15// return in a GPR..16//17.syntax unified18.p2align 219DEFINE_COMPILERRT_FUNCTION(__floatunssisfvfp)20#if defined(COMPILER_RT_ARMHF_TARGET)21vmov s0, r022vcvt.f32.u32 s0, s023#else24vmov s15, r0 // move int to float register s1525vcvt.f32.u32 s15, s15 // convert 32-bit int in s15 to float in s1526vmov r0, s15 // move s15 to result register27#endif28bx lr29END_COMPILERRT_FUNCTION(__floatunssisfvfp)3031NO_EXEC_STACK_DIRECTIVE32333435