39 lines · c
1/*===----------------------- clzerointrin.h - CLZERO ----------------------===2 *3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4 * See https://llvm.org/LICENSE.txt for license information.5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6 *7 *===-----------------------------------------------------------------------===8 */9#ifndef __X86INTRIN_H10#error "Never use <clzerointrin.h> directly; include <x86intrin.h> instead."11#endif12 13#ifndef __CLZEROINTRIN_H14#define __CLZEROINTRIN_H15 16/* Define the default attributes for the functions in this file. */17#define __DEFAULT_FN_ATTRS \18 __attribute__((__always_inline__, __nodebug__, __target__("clzero")))19 20/// Zeroes out the cache line for the address \a __line. This uses a21/// non-temporal store. Calling \c _mm_sfence() afterward might be needed22/// to enforce ordering.23///24/// \headerfile <x86intrin.h>25///26/// This intrinsic corresponds to the \c CLZERO instruction.27///28/// \param __line29/// An address within the cache line to zero out.30static __inline__ void __DEFAULT_FN_ATTRS31_mm_clzero (void * __line)32{33 __builtin_ia32_clzero ((void *)__line);34}35 36#undef __DEFAULT_FN_ATTRS37 38#endif /* __CLZEROINTRIN_H */39