ptwriteintrin.h revision 341825
11592Srgrimes/*===------------ ptwriteintrin.h - PTWRITE intrinsic --------------------=== 21592Srgrimes * 31592Srgrimes * Permission is hereby granted, free of charge, to any person obtaining a copy 41592Srgrimes * of this software and associated documentation files (the "Software"), to deal 51592Srgrimes * in the Software without restriction, including without limitation the rights 61592Srgrimes * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 71592Srgrimes * copies of the Software, and to permit persons to whom the Software is 81592Srgrimes * furnished to do so, subject to the following conditions: 91592Srgrimes * 101592Srgrimes * The above copyright notice and this permission notice shall be included in 111592Srgrimes * all copies or substantial portions of the Software. 121592Srgrimes * 131592Srgrimes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 141592Srgrimes * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 151592Srgrimes * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 161592Srgrimes * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 171592Srgrimes * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 181592Srgrimes * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 191592Srgrimes * THE SOFTWARE. 201592Srgrimes * 211592Srgrimes *===-----------------------------------------------------------------------=== 221592Srgrimes */ 231592Srgrimes 241592Srgrimes#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H 251592Srgrimes#error "Never use <ptwriteintrin.h> directly; include <x86intrin.h> instead." 261592Srgrimes#endif 271592Srgrimes 281592Srgrimes#ifndef __PTWRITEINTRIN_H 291592Srgrimes#define __PTWRITEINTRIN_H 301592Srgrimes 311592Srgrimes/* Define the default attributes for the functions in this file. */ 321592Srgrimes#define __DEFAULT_FN_ATTRS \ 331592Srgrimes __attribute__((__always_inline__, __nodebug__, __target__("ptwrite"))) 341592Srgrimes 351592Srgrimesstatic __inline__ void __DEFAULT_FN_ATTRS 361592Srgrimes_ptwrite32(unsigned int __value) { 371592Srgrimes __builtin_ia32_ptwrite32(__value); 381592Srgrimes} 391592Srgrimes 401592Srgrimes#ifdef __x86_64__ 411592Srgrimes 421592Srgrimesstatic __inline__ void __DEFAULT_FN_ATTRS 431592Srgrimes_ptwrite64(unsigned long long __value) { 4431329Scharnier __builtin_ia32_ptwrite64(__value); 451592Srgrimes} 4631329Scharnier 4731329Scharnier#endif /* __x86_64__ */ 4850476Speter 491592Srgrimes#undef __DEFAULT_FN_ATTRS 501592Srgrimes 511592Srgrimes#endif /* __PTWRITEINTRIN_H */ 521592Srgrimes