fxsrintrin.h revision 288943
1356290Sjkim/*===---- fxsrintrin.h - FXSR intrinsic ------------------------------------=== 296593Smarkm * 396593Smarkm * Permission is hereby granted, free of charge, to any person obtaining a copy 4142429Snectar * of this software and associated documentation files (the "Software"), to deal 596593Smarkm * in the Software without restriction, including without limitation the rights 696593Smarkm * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 796593Smarkm * copies of the Software, and to permit persons to whom the Software is 896593Smarkm * furnished to do so, subject to the following conditions: 996593Smarkm * 1096593Smarkm * The above copyright notice and this permission notice shall be included in 1196593Smarkm * all copies or substantial portions of the Software. 1296593Smarkm * 1396593Smarkm * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1496593Smarkm * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1596593Smarkm * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1696593Smarkm * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1796593Smarkm * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1896593Smarkm * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1996593Smarkm * THE SOFTWARE. 20215698Ssimon * 21215698Ssimon *===-----------------------------------------------------------------------=== 22215698Ssimon */ 23215698Ssimon 24215698Ssimon#ifndef __IMMINTRIN_H 2596593Smarkm#error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead." 2696593Smarkm#endif 2796593Smarkm 2896593Smarkm#ifndef __FXSRINTRIN_H 2996593Smarkm#define __FXSRINTRIN_H 3096593Smarkm 3196593Smarkm#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) 3296593Smarkm 3396593Smarkmstatic __inline__ void __DEFAULT_FN_ATTRS 3496593Smarkm_fxsave(void *__p) { 3596593Smarkm return __builtin_ia32_fxsave(__p); 3696593Smarkm} 3796593Smarkm 3896593Smarkmstatic __inline__ void __DEFAULT_FN_ATTRS 3996593Smarkm_fxsave64(void *__p) { 4096593Smarkm return __builtin_ia32_fxsave64(__p); 41276861Sjkim} 42276861Sjkim 4396593Smarkmstatic __inline__ void __DEFAULT_FN_ATTRS 4496593Smarkm_fxrstor(void *__p) { 45215698Ssimon return __builtin_ia32_fxrstor(__p); 46215698Ssimon} 47215698Ssimon 48215698Ssimonstatic __inline__ void __DEFAULT_FN_ATTRS 49312826Sjkim_fxrstor64(void *__p) { 50215698Ssimon return __builtin_ia32_fxrstor64(__p); 51142429Snectar} 52142429Snectar 53276861Sjkim#undef __DEFAULT_FN_ATTRS 54276861Sjkim 55276861Sjkim#endif 5696593Smarkm