xref: /llvm-project/libc/src/math/generic/fromfpx.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
1b2822597SOverMighty //===-- Implementation of fromfpx function --------------------------------===//
2b2822597SOverMighty //
3b2822597SOverMighty // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4b2822597SOverMighty // See https://llvm.org/LICENSE.txt for license information.
5b2822597SOverMighty // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6b2822597SOverMighty //
7b2822597SOverMighty //===----------------------------------------------------------------------===//
8b2822597SOverMighty 
9b2822597SOverMighty #include "src/math/fromfpx.h"
10b2822597SOverMighty #include "src/__support/FPUtil/NearestIntegerOperations.h"
11b2822597SOverMighty #include "src/__support/common.h"
12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
13b2822597SOverMighty 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
15b2822597SOverMighty 
16b2822597SOverMighty LLVM_LIBC_FUNCTION(double, fromfpx, (double x, int rnd, unsigned int width)) {
17b2822597SOverMighty   return fputil::fromfpx</*IsSigned=*/true>(x, rnd, width);
18b2822597SOverMighty }
19b2822597SOverMighty 
20*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
21