116e7d684SNick Desaulniers //===-- Implementation of stdc_first_trailing_zero_ull --------------------===// 216e7d684SNick Desaulniers // 316e7d684SNick Desaulniers // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 416e7d684SNick Desaulniers // See https://llvm.org/LICENSE.txt for license information. 516e7d684SNick Desaulniers // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 616e7d684SNick Desaulniers // 716e7d684SNick Desaulniers //===----------------------------------------------------------------------===// 816e7d684SNick Desaulniers 916e7d684SNick Desaulniers #include "src/stdbit/stdc_first_trailing_zero_ull.h" 1016e7d684SNick Desaulniers 1116e7d684SNick Desaulniers #include "src/__support/common.h" 12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 130ebf511aSNick Desaulniers #include "src/__support/math_extras.h" 1416e7d684SNick Desaulniers 15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 1616e7d684SNick Desaulniers 1716e7d684SNick Desaulniers LLVM_LIBC_FUNCTION(unsigned, stdc_first_trailing_zero_ull, 1816e7d684SNick Desaulniers (unsigned long long value)) { 190ebf511aSNick Desaulniers return static_cast<unsigned>(first_trailing_zero(value)); 2016e7d684SNick Desaulniers } 2116e7d684SNick Desaulniers 22*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 23