This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] A new meta intrinsic header file for current and future x86 instrinsics.
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Chris Lattner" <clattner at apple dot com>
- Cc: "rajagopal, dwarak" <dwarak dot rajagopal at amd dot com>, "Uros Bizjak" <ubizjak at gmail dot com>, "Richard Guenther" <richard dot guenther at gmail dot com>, "Guo, Xuepeng" <xuepeng dot guo at intel dot com>, gcc-patches at gcc dot gnu dot org, jakub at redhat dot com, "Ye, Joey" <joey dot ye at intel dot com>, "Lin, Weiliang" <weiliang dot lin at intel dot com>, "Harle, Christophe" <christophe dot harle at amd dot com>, "Sebastian Pop" <sebpop at gmail dot com>
- Date: Fri, 21 Nov 2008 17:36:27 -0800
- Subject: Re: [PATCH] A new meta intrinsic header file for current and future x86 instrinsics.
- References: <820531547ADB6847AF89CC220F6128F1737F@pdsmsx001.ccr.corp.intel.com> <EDA71DF9-E597-4F94-BE64-B3C9CA6E4BCE@apple.com> <firstname.lastname@example.org> <5659869B-5D04-44A3-A1B5-FD125FDDF765@apple.com> <email@example.com> <4613DBA9-BF19-429F-9B8F-57F8F967940B@apple.com> <firstname.lastname@example.org> <CA9EADC1-DA94-4025-8CB3-796FF65FD0E5@apple.com> <email@example.com> <07F78718-6245-4951-8479-3AB811BBEC80@apple.com>
On Fri, Nov 21, 2008 at 4:22 PM, Chris Lattner <firstname.lastname@example.org> wrote:
> On Nov 21, 2008, at 4:20 PM, H.J. Lu wrote:
>>>>> So "immintrin.h" is defined as "the header you #include for AVX", not
>>>>> "the header you #include to get current and future intel features"?
>>>> What difference does it make?
>>> If AMD or another X86 vendor supports AVX some day, we need a header for
>>> AVX. This header should be AVX only, not "random stuff intel has added
>>> the last 10 years".
>> Please take a look at what in gcc trunk today. The current structure
>> it with a 2 line change.
>>> This is exactly the situation with the xmmintrin.h headers. What problem
>>> are you trying to solve by deviating from the standard and established
>> The standard and established practice is to add a new
>> Xmmintrin.h, which is immintrin.h, for a new ISA extension.
> If your answer to the previous question is "immintrin.h is the header for
> AVX, and when we add new [non-"AVX 1"] stuff to the ISA it won't go in
> immintrin.h" then I have no objection to adding immintrin.h.
Let me clarify a few things:
1. We didn't add a new file. We just renamed gmmintrin.h to
2. Including <immintrin.h> itself doesn't enable any ISA extensions.
3. You need to use -mXXX to get the XXX extension from
<immintrin.h>. It applies to -mmmx, -msse, ... -mavx.
4. We will add future new ISA intrinics to a new header file
and include it from <immintrin.h>.
You can enable any suitable sets of current and future ISA
extensions by including <immintrin.h> and proper combinations
No, -mavx -msse5 will be disallowed: