zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

clflushoptintrin.h (1193B) - Raw


      1 /*===---- clflushoptintrin.h - CLFLUSHOPT 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-exception
      6  *
      7  *===-----------------------------------------------------------------------===
      8  */
      9 
     10 #ifndef __IMMINTRIN_H
     11 #error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
     12 #endif
     13 
     14 #ifndef __CLFLUSHOPTINTRIN_H
     15 #define __CLFLUSHOPTINTRIN_H
     16 
     17 /* Define the default attributes for the functions in this file. */
     18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("clflushopt")))
     19 
     20 /// Invalidates all levels of the cache hierarchy and flushes modified data to
     21 ///    memory for the cache line specified by the address \a __m.
     22 ///
     23 /// \headerfile <immintrin.h>
     24 ///
     25 /// This intrinsic corresponds to the \c CLFLUSHOPT instruction.
     26 ///
     27 /// \param __m
     28 ///    An address within the cache line to flush and invalidate.
     29 static __inline__ void __DEFAULT_FN_ATTRS
     30 _mm_clflushopt(void const * __m) {
     31   __builtin_ia32_clflushopt(__m);
     32 }
     33 
     34 #undef __DEFAULT_FN_ATTRS
     35 
     36 #endif