1 /*===---- prfchiintrin.h - PREFETCHI intrinsic -----------------------------===
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
7 *===-----------------------------------------------------------------------===
10 #ifndef __PRFCHIINTRIN_H
11 #define __PRFCHIINTRIN_H
15 /* Define the default attributes for the functions in this file. */
16 #define __DEFAULT_FN_ATTRS \
17 __attribute__((__always_inline__, __nodebug__, __target__("prefetchi")))
19 /// Loads an instruction sequence containing the specified memory address into
22 /// Note that the effect of this intrinsic is dependent on the processor
25 /// \headerfile <x86intrin.h>
27 /// This intrinsic corresponds to the \c PREFETCHIT0 instruction.
30 /// A pointer specifying the memory address to be prefetched.
31 static __inline__
void __DEFAULT_FN_ATTRS
32 _m_prefetchit0(volatile const void *__P
) {
33 #pragma clang diagnostic push
34 #pragma clang diagnostic ignored "-Wcast-qual"
35 __builtin_ia32_prefetchi((const void *)__P
, 3 /* _MM_HINT_T0 */);
36 #pragma clang diagnostic pop
39 /// Loads an instruction sequence containing the specified memory address into
40 /// all but the first-level cache.
42 /// Note that the effect of this intrinsic is dependent on the processor
45 /// \headerfile <x86intrin.h>
47 /// This intrinsic corresponds to the \c PREFETCHIT1 instruction.
50 /// A pointer specifying the memory address to be prefetched.
51 static __inline__
void __DEFAULT_FN_ATTRS
52 _m_prefetchit1(volatile const void *__P
) {
53 #pragma clang diagnostic push
54 #pragma clang diagnostic ignored "-Wcast-qual"
55 __builtin_ia32_prefetchi((const void *)__P
, 2 /* _MM_HINT_T1 */);
56 #pragma clang diagnostic pop
58 #endif /* __x86_64__ */
59 #undef __DEFAULT_FN_ATTRS
61 #endif /* __PRFCHWINTRIN_H */