[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / builtins / floatuntitf.c
blob1c5998a40b9f7c5352bf00376d4b165660aaf75c
1 //===-- lib/floatuntitf.c - uint128 -> quad-precision conversion --*- C -*-===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements tu_int to quad-precision conversion for the
10 // compiler-rt library in the IEEE-754 default round-to-nearest, ties-to-even
11 // mode.
13 //===----------------------------------------------------------------------===//
15 #define QUAD_PRECISION
16 #include "fp_lib.h"
17 #include "int_lib.h"
19 #if defined(CRT_HAS_TF_MODE)
20 #define SRC_U128
21 #define DST_QUAD
22 #include "int_to_fp_impl.inc"
24 // Returns: convert a tu_int to a fp_t, rounding toward even.
26 // Assumption: fp_t is a IEEE 128 bit floating point type
27 // tu_int is a 128 bit integral type
29 // seee eeee eeee eeee mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm
30 // mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm
31 // mmmm mmmm mmmm
33 COMPILER_RT_ABI fp_t __floatuntitf(tu_int a) { return __floatXiYf__(a); }
35 #endif