This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC and x86intrin.h header
- From: Ian Lance Taylor <iant at google dot com>
- To: Erotavlas_turbo at libero dot it
- Cc: "gcc" <gcc at gcc dot gnu dot org>
- Date: Tue, 21 Feb 2012 06:33:26 -0800
- Subject: Re: GCC and x86intrin.h header
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@google.com designates 10.229.77.76 as permitted sender) smtp.mail=iant@google.com; dkim=pass header.i=iant@google.com
- References: <LZR0A2$63877CF48EA24B2F8C6BDC58D550A29A@libero.it>
Erotavlas_turbo@libero.it writes:
> I read in the manual of GCC the following line:
> <x86intrin.h> // new intrinsic header file, it should be included before using any IA-32/x86-64 intrinsics.
> What does it mean? I have to explicitly include this library in my code if I want to use the intrinsic functions like ssex or mcrc32 etc.
This question would be more appropriate for the mailing list
gcc-help@gcc.gnu.org than for gcc@. The gcc@ mailing list is for
discussions related to the development of gcc itself. Please take any
followups to gcc-help. Thanks.
To answer your question: the <x86intrin.h> header file provides
definitions for all intrinsic functions which are relevant to the target
processor. The intrinsic functions are the ones with names like
_mm_crc32_u8. You are not required to #include <x86intrin.h>. But it
is a more reliable mechanism than the older one of remembering that
_mm_crc32_u8 is defined in <smmintrin.h>.
Ian