brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · d4b418e Raw
39 lines · c
1//===-- floatundisf.c - Implement __floatundisf ---------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file implements __floatundisf for the compiler_rt library.10//11//===----------------------------------------------------------------------===//12 13// Returns: convert a to a float, rounding toward even.14 15// Assumption: float is a IEEE 32 bit floating point type16//            du_int is a 64 bit integral type17 18// seee eeee emmm mmmm mmmm mmmm mmmm mmmm19 20#include "int_lib.h"21 22#define SRC_U6423#define DST_SINGLE24#include "int_to_fp_impl.inc"25 26COMPILER_RT_ABI float __floatundisf(du_int a) { return __floatXiYf__(a); }27 28#if defined(__ARM_EABI__)29#if defined(COMPILER_RT_ARMHF_TARGET)30AEABI_RTABI float __aeabi_ul2f(du_int a) { return __floatundisf(a); }31#else32COMPILER_RT_ALIAS(__floatundisf, __aeabi_ul2f)33#endif34#endif35 36#if defined(__MINGW32__) && defined(__arm__)37COMPILER_RT_ALIAS(__floatundisf, __u64tos)38#endif39