From owner-svn-src-projects@freebsd.org Tue Aug 18 19:04:10 2015 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4A7F9BC15B for ; Tue, 18 Aug 2015 19:04:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0EB13A1; Tue, 18 Aug 2015 19:04:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7IJ4AXu080266; Tue, 18 Aug 2015 19:04:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7IJ40A1080227; Tue, 18 Aug 2015 19:04:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201508181904.t7IJ40A1080227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 18 Aug 2015 19:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r286896 - projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2015 19:04:11 -0000 Author: dim Date: Tue Aug 18 19:03:59 2015 New Revision: 286896 URL: https://svnweb.freebsd.org/changeset/base/286896 Log: Import r243925 from the upstream clang release_37 branch: Reverting r239883 and r240720: ------------------------------------------------------------------------ r239883 | echristo | 2015-06-17 00:09:32 -0700 (Wed, 17 Jun 2015) | 16 lines Update the intel intrinsic headers to use the target attribute support. This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r240720 | silvas | 2015-06-25 16:22:11 -0700 (Thu, 25 Jun 2015) | 6 lines Remove `requires` for x86 CPU features. Ever since the target attributes change, we don't need to guard these headers with `requires`. Actually it's a bit worse, because if we do then they are included textually under the covers, causing declarations to appear in submodules they aren't supposed to be in. ------------------------------------------------------------------------ This reverts the changes to the intrinsics headers in trunk, which could result in some ports' configure scripts misdetecting SSE (and higher) support. Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/adxintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/ammintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avxintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/emmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/immintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/module.modulemap projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/nmmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/shaintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/smmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/x86intrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/xopintrin.h Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h Tue Aug 18 19:03:59 2015 (r286896) @@ -25,8 +25,12 @@ #include +#if !defined (__AES__) +# error "AES instructions not enabled" +#else + /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("aes"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_aesenc_si128(__m128i __V, __m128i __R) @@ -63,4 +67,6 @@ _mm_aesimc_si128(__m128i __V) #undef __DEFAULT_FN_ATTRS +#endif + #endif /* _WMMINTRIN_AES_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h Tue Aug 18 19:03:59 2015 (r286896) @@ -23,8 +23,12 @@ #ifndef _WMMINTRIN_PCLMUL_H #define _WMMINTRIN_PCLMUL_H +#if !defined (__PCLMUL__) +# error "PCLMUL instruction is not enabled" +#else #define _mm_clmulepi64_si128(__X, __Y, __I) \ ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(__X), \ (__v2di)(__m128i)(__Y), (char)(__I))) +#endif #endif /* _WMMINTRIN_PCLMUL_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/adxintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/adxintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/adxintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -32,7 +32,8 @@ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* Intrinsics that are available only if __ADX__ defined */ -static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx"))) +#ifdef __ADX__ +static __inline unsigned char __DEFAULT_FN_ATTRS _addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y, unsigned int *__p) { @@ -40,13 +41,14 @@ _addcarryx_u32(unsigned char __cf, unsig } #ifdef __x86_64__ -static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx"))) +static __inline unsigned char __DEFAULT_FN_ATTRS _addcarryx_u64(unsigned char __cf, unsigned long long __x, unsigned long long __y, unsigned long long *__p) { return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p); } #endif +#endif /* Intrinsics that are also available if __ADX__ undefined */ static __inline unsigned char __DEFAULT_FN_ATTRS Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/ammintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/ammintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/ammintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,10 +24,14 @@ #ifndef __AMMINTRIN_H #define __AMMINTRIN_H +#ifndef __SSE4A__ +#error "SSE4A instruction set not enabled" +#else + #include /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4a"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /// \brief Extracts the specified bits from the lower 64 bits of the 128-bit /// integer vector operand at the index idx and of the length len. @@ -206,4 +210,6 @@ _mm_stream_ss(float *__p, __m128 __a) #undef __DEFAULT_FN_ATTRS +#endif /* __SSE4A__ */ + #endif /* __AMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -29,7 +29,7 @@ #define __AVX2INTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx2"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* SSE4 Multiple Packed Sums of Absolute Difference. */ #define _mm256_mpsadbw_epu8(X, Y, M) __builtin_ia32_mpsadbw256((X), (Y), (M)) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -34,7 +34,7 @@ typedef char __v64qi __attribute__ ((__v typedef short __v32hi __attribute__ ((__vector_size__ (64))); /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512bw"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline __v64qi __DEFAULT_FN_ATTRS _mm512_setzero_qi (void) { Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -29,7 +29,7 @@ #define __AVX512DQINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512dq"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_mullo_epi64 (__m512i __A, __m512i __B) { Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -47,7 +47,7 @@ typedef unsigned short __mmask16; #define _MM_FROUND_CUR_DIRECTION 0x04 /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512f"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* Create vectors with repeated elements */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -29,7 +29,7 @@ #define __AVX512VLBWINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512bw"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* Integer compare */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -29,7 +29,7 @@ #define __AVX512VLDQINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512dq"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_mullo_epi64 (__m256i __A, __m256i __B) { Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -29,7 +29,7 @@ #define __AVX512VLINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vl"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* Integer compare */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avxintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avxintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/avxintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -40,7 +40,7 @@ typedef double __m256d __attribute__((__ typedef long long __m256i __attribute__((__vector_size__(32))); /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* Arithmetic */ static __inline __m256d __DEFAULT_FN_ATTRS Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmi2intrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -25,11 +25,15 @@ #error "Never use directly; include instead." #endif +#ifndef __BMI2__ +# error "BMI2 instruction set not enabled" +#endif /* __BMI2__ */ + #ifndef __BMI2INTRIN_H #define __BMI2INTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ unsigned int __DEFAULT_FN_ATTRS _bzhi_u32(unsigned int __X, unsigned int __Y) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -25,6 +25,10 @@ #error "Never use directly; include instead." #endif +#ifndef __BMI__ +# error "BMI instruction set not enabled" +#endif /* __BMI__ */ + #ifndef __BMIINTRIN_H #define __BMIINTRIN_H @@ -37,7 +41,7 @@ #define _tzcnt_u32(a) (__tzcnt_u32((a))) /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ unsigned short __DEFAULT_FN_ATTRS __tzcnt_u16(unsigned short __X) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/emmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,6 +24,10 @@ #ifndef __EMMINTRIN_H #define __EMMINTRIN_H +#ifndef __SSE2__ +#error "SSE2 instruction set not enabled" +#else + #include typedef double __m128d __attribute__((__vector_size__(16))); @@ -36,7 +40,7 @@ typedef short __v8hi __attribute__((__ve typedef char __v16qi __attribute__((__vector_size__(16))); /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse2"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_add_sd(__m128d __a, __m128d __b) @@ -1471,4 +1475,6 @@ _mm_pause(void) #define _MM_SHUFFLE2(x, y) (((x) << 1) | (y)) +#endif /* __SSE2__ */ + #endif /* __EMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -25,6 +25,10 @@ #error "Never use directly; include instead." #endif +#ifndef __F16C__ +# error "F16C instruction is not enabled" +#endif /* __F16C__ */ + #ifndef __F16CINTRIN_H #define __F16CINTRIN_H @@ -32,7 +36,7 @@ typedef float __v8sf __attribute__ ((__v typedef float __m256 __attribute__ ((__vector_size__ (32))); /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("f16c"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) #define _mm_cvtps_ph(a, imm) __extension__ ({ \ __m128 __a = (a); \ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -28,10 +28,14 @@ #ifndef __FMA4INTRIN_H #define __FMA4INTRIN_H +#ifndef __FMA4__ +# error "FMA4 instruction set is not enabled" +#else + #include /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fma4"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_macc_ps(__m128 __A, __m128 __B, __m128 __C) @@ -227,4 +231,6 @@ _mm256_msubadd_pd(__m256d __A, __m256d _ #undef __DEFAULT_FN_ATTRS +#endif /* __FMA4__ */ + #endif /* __FMA4INTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -28,8 +28,12 @@ #ifndef __FMAINTRIN_H #define __FMAINTRIN_H +#ifndef __FMA__ +# error "FMA instruction set is not enabled" +#else + /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fma"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_fmadd_ps(__m128 __A, __m128 __B, __m128 __C) @@ -225,4 +229,6 @@ _mm256_fmsubadd_pd(__m256d __A, __m256d #undef __DEFAULT_FN_ATTRS +#endif /* __FMA__ */ + #endif /* __FMAINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/immintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/immintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/immintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,123 +24,175 @@ #ifndef __IMMINTRIN_H #define __IMMINTRIN_H +#ifdef __MMX__ #include +#endif +#ifdef __SSE__ #include +#endif +#ifdef __SSE2__ #include +#endif +#ifdef __SSE3__ #include +#endif +#ifdef __SSSE3__ #include +#endif +#if defined (__SSE4_2__) || defined (__SSE4_1__) #include +#endif +#if defined (__AES__) || defined (__PCLMUL__) #include +#endif +#ifdef __AVX__ #include +#endif +#ifdef __AVX2__ #include +#endif +#ifdef __BMI__ #include +#endif +#ifdef __BMI2__ #include +#endif +#ifdef __LZCNT__ #include +#endif +#ifdef __FMA__ #include +#endif +#ifdef __AVX512F__ #include +#endif +#ifdef __AVX512VL__ #include +#endif +#ifdef __AVX512BW__ #include +#endif +#ifdef __AVX512CD__ #include +#endif +#ifdef __AVX512DQ__ #include +#endif +#if defined (__AVX512VL__) && defined (__AVX512BW__) #include +#endif +#if defined (__AVX512VL__) && defined (__AVX512DQ__) #include +#endif +#ifdef __AVX512ER__ #include +#endif -static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) +#ifdef __RDRND__ +static __inline__ int __attribute__((__always_inline__, __nodebug__)) _rdrand16_step(unsigned short *__p) { return __builtin_ia32_rdrand16_step(__p); } -static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) +static __inline__ int __attribute__((__always_inline__, __nodebug__)) _rdrand32_step(unsigned int *__p) { return __builtin_ia32_rdrand32_step(__p); } #ifdef __x86_64__ -static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) +static __inline__ int __attribute__((__always_inline__, __nodebug__)) _rdrand64_step(unsigned long long *__p) { return __builtin_ia32_rdrand64_step(__p); } #endif +#endif /* __RDRND__ */ +#ifdef __FSGSBASE__ #ifdef __x86_64__ -static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) _readfsbase_u32(void) { return __builtin_ia32_rdfsbase32(); } -static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) _readfsbase_u64(void) { return __builtin_ia32_rdfsbase64(); } -static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) _readgsbase_u32(void) { return __builtin_ia32_rdgsbase32(); } -static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) _readgsbase_u64(void) { return __builtin_ia32_rdgsbase64(); } -static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ void __attribute__((__always_inline__, __nodebug__)) _writefsbase_u32(unsigned int __V) { return __builtin_ia32_wrfsbase32(__V); } -static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ void __attribute__((__always_inline__, __nodebug__)) _writefsbase_u64(unsigned long long __V) { return __builtin_ia32_wrfsbase64(__V); } -static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ void __attribute__((__always_inline__, __nodebug__)) _writegsbase_u32(unsigned int __V) { return __builtin_ia32_wrgsbase32(__V); } -static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) +static __inline__ void __attribute__((__always_inline__, __nodebug__)) _writegsbase_u64(unsigned long long __V) { return __builtin_ia32_wrgsbase64(__V); } #endif +#endif /* __FSGSBASE__ */ +#ifdef __RTM__ #include +#endif +#ifdef __RTM__ #include +#endif +#ifdef __SHA__ #include +#endif #include Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/lzcntintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -25,11 +25,15 @@ #error "Never use directly; include instead." #endif +#ifndef __LZCNT__ +# error "LZCNT instruction is not enabled" +#endif /* __LZCNT__ */ + #ifndef __LZCNTINTRIN_H #define __LZCNTINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("lzcnt"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ unsigned short __DEFAULT_FN_ATTRS __lzcnt16(unsigned short __X) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h Tue Aug 18 19:03:59 2015 (r286896) @@ -30,7 +30,7 @@ typedef float __v2sf __attribute__((__vector_size__(8))); /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("3dnow"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ void __DEFAULT_FN_ATTRS _m_femms() { Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/mmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,6 +24,10 @@ #ifndef __MMINTRIN_H #define __MMINTRIN_H +#ifndef __MMX__ +#error "MMX instruction set not enabled" +#else + typedef long long __m64 __attribute__((__vector_size__(8))); typedef int __v2si __attribute__((__vector_size__(8))); @@ -31,7 +35,7 @@ typedef short __v4hi __attribute__((__ve typedef char __v8qi __attribute__((__vector_size__(8))); /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mmx"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ void __DEFAULT_FN_ATTRS _mm_empty(void) @@ -497,5 +501,7 @@ _mm_setr_pi8(char __b0, char __b1, char #define _m_pcmpgtw _mm_cmpgt_pi16 #define _m_pcmpgtd _mm_cmpgt_pi32 +#endif /* __MMX__ */ + #endif /* __MMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/module.modulemap ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/module.modulemap Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/module.modulemap Tue Aug 18 19:03:59 2015 (r286896) @@ -32,117 +32,142 @@ module _Builtin_intrinsics [system] [ext } explicit module cpuid { + requires x86 header "cpuid.h" } explicit module mmx { + requires mmx header "mmintrin.h" } explicit module f16c { + requires f16c header "f16cintrin.h" } explicit module sse { + requires sse export mmx export sse2 // note: for hackish dependency header "xmmintrin.h" } explicit module sse2 { + requires sse2 export sse header "emmintrin.h" } explicit module sse3 { + requires sse3 export sse2 header "pmmintrin.h" } explicit module ssse3 { + requires ssse3 export sse3 header "tmmintrin.h" } explicit module sse4_1 { + requires sse41 export ssse3 header "smmintrin.h" } explicit module sse4_2 { + requires sse42 export sse4_1 header "nmmintrin.h" } explicit module sse4a { + requires sse4a export sse3 header "ammintrin.h" } explicit module avx { + requires avx export sse4_2 header "avxintrin.h" } explicit module avx2 { + requires avx2 export avx header "avx2intrin.h" } explicit module avx512f { + requires avx512f export avx2 header "avx512fintrin.h" } explicit module avx512er { + requires avx512er header "avx512erintrin.h" } explicit module bmi { + requires bmi header "bmiintrin.h" } explicit module bmi2 { + requires bmi2 header "bmi2intrin.h" } explicit module fma { + requires fma header "fmaintrin.h" } explicit module fma4 { + requires fma4 export sse3 header "fma4intrin.h" } explicit module lzcnt { + requires lzcnt header "lzcntintrin.h" } explicit module popcnt { + requires popcnt header "popcntintrin.h" } explicit module mm3dnow { + requires mm3dnow header "mm3dnow.h" } explicit module xop { + requires xop export fma4 header "xopintrin.h" } explicit module aes_pclmul { + requires aes, pclmul header "wmmintrin.h" export aes export pclmul } explicit module aes { + requires aes header "__wmmintrin_aes.h" } explicit module pclmul { + requires pclmul header "__wmmintrin_pclmul.h" } } Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/nmmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/nmmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/nmmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,7 +24,12 @@ #ifndef _NMMINTRIN_H #define _NMMINTRIN_H +#ifndef __SSE4_2__ +#error "SSE4.2 instruction set not enabled" +#else + /* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h, just include it now then. */ #include +#endif /* __SSE4_2__ */ #endif /* _NMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,10 +24,14 @@ #ifndef __PMMINTRIN_H #define __PMMINTRIN_H +#ifndef __SSE3__ +#error "SSE3 instruction set not enabled" +#else + #include /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse3"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_lddqu_si128(__m128i const *__p) @@ -113,4 +117,6 @@ _mm_mwait(unsigned __extensions, unsigne #undef __DEFAULT_FN_ATTRS +#endif /* __SSE3__ */ + #endif /* __PMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -21,11 +21,15 @@ *===-----------------------------------------------------------------------=== */ +#ifndef __POPCNT__ +#error "POPCNT instruction set not enabled" +#endif + #ifndef _POPCNTINTRIN_H #define _POPCNTINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("popcnt"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ int __DEFAULT_FN_ATTRS _mm_popcnt_u32(unsigned int __A) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rdseedintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -28,8 +28,10 @@ #ifndef __RDSEEDINTRIN_H #define __RDSEEDINTRIN_H +#ifdef __RDSEED__ + /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rdseed"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ int __DEFAULT_FN_ATTRS _rdseed16_step(unsigned short *__p) @@ -53,4 +55,5 @@ _rdseed64_step(unsigned long long *__p) #undef __DEFAULT_FN_ATTRS +#endif /* __RDSEED__ */ #endif /* __RDSEEDINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/rtmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -38,7 +38,7 @@ #define _XABORT_CODE(x) (((x) >> 24) & 0xFF) /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rtm"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ unsigned int __DEFAULT_FN_ATTRS _xbegin(void) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/shaintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/shaintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/shaintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -28,8 +28,12 @@ #ifndef __SHAINTRIN_H #define __SHAINTRIN_H +#if !defined (__SHA__) +# error "SHA instructions not enabled" +#endif + /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sha"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) #define _mm_sha1rnds4_epu32(V1, V2, M) __extension__ ({ \ __builtin_ia32_sha1rnds4((V1), (V2), (M)); }) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/smmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/smmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/smmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,10 +24,14 @@ #ifndef _SMMINTRIN_H #define _SMMINTRIN_H +#ifndef __SSE4_1__ +#error "SSE4.1 instruction set not enabled" +#else + #include /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4.1"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) /* SSE4 Rounding macros. */ #define _MM_FROUND_TO_NEAREST_INT 0x00 @@ -375,13 +379,9 @@ _mm_minpos_epu16(__m128i __V) return (__m128i) __builtin_ia32_phminposuw128((__v8hi)__V); } -/* Handle the sse4.2 definitions here. */ - /* These definitions are normally in nmmintrin.h, but gcc puts them in here so we'll do the same. */ - -#undef __DEFAULT_FN_ATTRS -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) +#ifdef __SSE4_2__ /* These specify the type of data that we're comparing. */ #define _SIDD_UBYTE_OPS 0x00 @@ -481,4 +481,7 @@ _mm_crc32_u64(unsigned long long __C, un #include #endif +#endif /* __SSE4_2__ */ +#endif /* __SSE4_1__ */ + #endif /* _SMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -21,6 +21,10 @@ *===-----------------------------------------------------------------------=== */ +#ifndef __TBM__ +#error "TBM instruction set is not enabled" +#endif + #ifndef __X86INTRIN_H #error "Never use directly; include instead." #endif @@ -29,7 +33,7 @@ #define __TBMINTRIN_H /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("tbm"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) #define __bextri_u32(a, b) (__builtin_ia32_bextri_u32((a), (b))) Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,10 +24,14 @@ #ifndef __TMMINTRIN_H #define __TMMINTRIN_H +#ifndef __SSSE3__ +#error "SSSE3 instruction set not enabled" +#else + #include /* Define the default attributes for the functions in this file. */ -#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("ssse3"))) +#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_abs_pi8(__m64 __a) @@ -221,4 +225,6 @@ _mm_sign_pi32(__m64 __a, __m64 __b) #undef __DEFAULT_FN_ATTRS +#endif /* __SSSE3__ */ + #endif /* __TMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/wmmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -26,8 +26,17 @@ #include +#if !defined (__AES__) && !defined (__PCLMUL__) +# error "AES/PCLMUL instructions not enabled" +#else + +#ifdef __AES__ #include <__wmmintrin_aes.h> +#endif /* __AES__ */ +#ifdef __PCLMUL__ #include <__wmmintrin_pclmul.h> +#endif /* __PCLMUL__ */ +#endif /* __AES__ || __PCLMUL__ */ #endif /* _WMMINTRIN_H */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/x86intrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/x86intrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/x86intrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -28,29 +28,53 @@ #include +#ifdef __3dNOW__ #include +#endif +#ifdef __BMI__ #include +#endif +#ifdef __BMI2__ #include +#endif +#ifdef __LZCNT__ #include +#endif +#ifdef __POPCNT__ #include +#endif +#ifdef __RDSEED__ #include +#endif +#ifdef __PRFCHW__ #include +#endif +#ifdef __SSE4A__ #include +#endif +#ifdef __FMA4__ #include +#endif +#ifdef __XOP__ #include +#endif +#ifdef __TBM__ #include +#endif +#ifdef __F16C__ #include +#endif /* FIXME: LWP */ Modified: projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h ============================================================================== --- projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Tue Aug 18 18:54:45 2015 (r286895) +++ projects/clang-trunk/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h Tue Aug 18 19:03:59 2015 (r286896) @@ -24,6 +24,10 @@ #ifndef __XMMINTRIN_H #define __XMMINTRIN_H +#ifndef __SSE__ +#error "SSE instruction set not enabled" +#else + #include typedef int __v4si __attribute__((__vector_size__(16))); @@ -37,7 +41,7 @@ typedef float __m128 __attribute__((__ve #endif /* Define the default attributes for the functions in this file. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***