1f01ed3bcSlntue //===-- Implementation of roundlr function --------------------------------===// 2f01ed3bcSlntue // 3f01ed3bcSlntue // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4f01ed3bcSlntue // See https://llvm.org/LICENSE.txt for license information. 5f01ed3bcSlntue // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6f01ed3bcSlntue // 7f01ed3bcSlntue //===----------------------------------------------------------------------===// 8f01ed3bcSlntue 9f01ed3bcSlntue #include "roundlr.h" 10f01ed3bcSlntue #include "src/__support/common.h" 11f01ed3bcSlntue #include "src/__support/fixed_point/fx_bits.h" 12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 13f01ed3bcSlntue 14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 15f01ed3bcSlntue 16f01ed3bcSlntue LLVM_LIBC_FUNCTION(long fract, roundlr, (long fract x, int n)) { 17f01ed3bcSlntue return fixed_point::round(x, n); 18f01ed3bcSlntue } 19f01ed3bcSlntue 20*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 21