brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 3360d20 Raw
39 lines · c
1/*===---- clwbintrin.h - CLWB intrinsic ------------------------------------===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 10#ifndef __IMMINTRIN_H11#error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."12#endif13 14#ifndef __CLWBINTRIN_H15#define __CLWBINTRIN_H16 17/* Define the default attributes for the functions in this file. */18#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("clwb")))19 20/// Writes back to memory the cache line (if modified) that contains the21/// linear address specified in \a __p from any level of the cache hierarchy in22/// the cache coherence domain23///24/// \headerfile <immintrin.h>25///26/// This intrinsic corresponds to the <c> CLWB </c> instruction.27///28/// \param __p29///    A pointer to the memory location used to identify the cache line to be30///    written back.31static __inline__ void __DEFAULT_FN_ATTRS32_mm_clwb(void const *__p) {33  __builtin_ia32_clwb(__p);34}35 36#undef __DEFAULT_FN_ATTRS37 38#endif39