16c973036SOverMighty //===-- Implementation of copysignf16 function ----------------------------===// 26c973036SOverMighty // 36c973036SOverMighty // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 46c973036SOverMighty // See https://llvm.org/LICENSE.txt for license information. 56c973036SOverMighty // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 66c973036SOverMighty // 76c973036SOverMighty //===----------------------------------------------------------------------===// 86c973036SOverMighty 96c973036SOverMighty #include "src/math/copysignf16.h" 106c973036SOverMighty #include "src/__support/FPUtil/ManipulationFunctions.h" 116c973036SOverMighty #include "src/__support/common.h" 125ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 136c973036SOverMighty 145ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 156c973036SOverMighty 166c973036SOverMighty LLVM_LIBC_FUNCTION(float16, copysignf16, (float16 x, float16 y)) { 17*70843bf6SOverMighty #ifdef __LIBC_MISC_MATH_BASIC_OPS_OPT 18*70843bf6SOverMighty return __builtin_copysignf16(x, y); 19*70843bf6SOverMighty #else 206c973036SOverMighty return fputil::copysign(x, y); 21*70843bf6SOverMighty #endif 226c973036SOverMighty } 236c973036SOverMighty 245ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 25