diff options
author | tmsriram <tmsriram@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-23 06:15:19 +0000 |
---|---|---|
committer | tmsriram <tmsriram@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-23 06:15:19 +0000 |
commit | ef21d40e1ef4c72997688d5716a6f4ef5a72b499 (patch) | |
tree | bcbdec95b4f436d90004456b20b84ef68cf1e7c8 /gcc/config/i386/tmmintrin.h | |
parent | 60777f693d3ac0ad238b9c009f6d094d2a550d24 (diff) | |
download | gcc-ef21d40e1ef4c72997688d5716a6f4ef5a72b499.tar.gz |
Allow mmintrin headers to work with function specific target opts. Please
see discussion here:
http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00740.html
* config/i386/i386.c (ix86_pragma_target_parse): Restore target
when current target options does not apply.
* config/i386/i386-protos.h (ix86_reset_previous_fndecl): New function.
* config/i386/i386.c (ix86_reset_previous_fndecl): Ditto.
* config/i386/bmiintrin.h: Pass appropriate target attributes to header.
* config/i386/mmintrin.h: Ditto.
* config/i386/nmmintrin.h: Ditto.
* config/i386/avx2intrin.h: Ditto.
* config/i386/fxsrintrin.h: Ditto.
* config/i386/tbmintrin.h: Ditto.
* config/i386/xsaveintrin.h: Ditto.
* config/i386/f16cintrin.h: Ditto.
* config/i386/xtestintrin.h: Ditto.
* config/i386/xsaveoptintrin.h: Ditto.
* config/i386/bmi2intrin.h: Ditto.
* config/i386/lzcntintrin.h: Ditto.
* config/i386/smmintrin.h: Ditto.
* config/i386/wmmintrin.h: Ditto.
* config/i386/x86intrin.h: Remove all header include guards.
* config/i386/prfchwintrin.h: Ditto.
* config/i386/pmmintrin.h: Ditto.
* config/i386/tmmintrin.h: Ditto.
* config/i386/xmmintrin.h: Ditto.
* config/i386/popcntintrin.h: Ditto.
* config/i386/rdseedintrin.h: Ditto.
* config/i386/ammintrin.h: Ditto.
* config/i386/emmintrin.h: Ditto.
* config/i386/immintrin.h: Remove all header include guards.
* config/i386/fma4intrin.h: Ditto.
* config/i386/lwpintrin.h: Ditto.
* config/i386/xopintrin.h: Ditto.
* config/i386/ia32intrin.h: Ditto.
* config/i386/avxintrin.h: Ditto.
* config/i386/rtmintrin.h: Ditto.
* config/i386/fmaintrin.h: Ditto.
* config/i386/mm3dnow.h: Ditto.
* testsuite/gcc.target/i386/intrinsics_1.c: New test.
* testsuite/gcc.target/i386/intrinsics_2.c: Ditto.
* testsuite/gcc.target/i386/intrinsics_3.c: Ditto.
* testsuite/gcc.target/i386/intrinsics_4.c: Ditto.
* testsuite/gcc.target/i386/intrinsics_5.c: Ditto.
* testsuite/gcc.target/i386/intrinsics_6.c: Ditto.
* testsuite/gcc.target/i386/avx-1.c: Provide macros for builtins
needing immediate arguments in f16cintrin.h and rtmintrin.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/tmmintrin.h')
-rw-r--r-- | gcc/config/i386/tmmintrin.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/config/i386/tmmintrin.h b/gcc/config/i386/tmmintrin.h index 767b199d3c4..3f63b4f8934 100644 --- a/gcc/config/i386/tmmintrin.h +++ b/gcc/config/i386/tmmintrin.h @@ -27,13 +27,15 @@ #ifndef _TMMINTRIN_H_INCLUDED #define _TMMINTRIN_H_INCLUDED -#ifndef __SSSE3__ -# error "SSSE3 instruction set not enabled" -#else - /* We need definitions from the SSE3, SSE2 and SSE header files*/ #include <pmmintrin.h> +#ifndef __SSSE3__ +#pragma GCC push_options +#pragma GCC target("ssse3") +#define __DISABLE_SSSE3__ +#endif /* __SSSE3__ */ + extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_hadd_epi16 (__m128i __X, __m128i __Y) { @@ -239,6 +241,9 @@ _mm_abs_pi32 (__m64 __X) return (__m64) __builtin_ia32_pabsd ((__v2si)__X); } -#endif /* __SSSE3__ */ +#ifdef __DISABLE_SSSE3__ +#undef __DISABLE_SSSE3__ +#pragma GCC pop_options +#endif /* __DISABLE_SSSE3__ */ #endif /* _TMMINTRIN_H_INCLUDED */ |