160d7bf3dSlntue //===-- Implementation of lrintf128 function ------------------------------===// 260d7bf3dSlntue // 360d7bf3dSlntue // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 460d7bf3dSlntue // See https://llvm.org/LICENSE.txt for license information. 560d7bf3dSlntue // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 660d7bf3dSlntue // 760d7bf3dSlntue //===----------------------------------------------------------------------===// 860d7bf3dSlntue 960d7bf3dSlntue #include "src/math/lrintf128.h" 1060d7bf3dSlntue #include "src/__support/FPUtil/NearestIntegerOperations.h" 1160d7bf3dSlntue #include "src/__support/common.h" 12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 1360d7bf3dSlntue 14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 1560d7bf3dSlntue 1660d7bf3dSlntue LLVM_LIBC_FUNCTION(long, lrintf128, (float128 x)) { 1760d7bf3dSlntue return fputil::round_to_signed_integer_using_current_rounding_mode<float128, 1860d7bf3dSlntue long>(x); 1960d7bf3dSlntue } 2060d7bf3dSlntue 21*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 22