This is the mail archive of the
gcc-patches@gcc.gnu.org
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: "dwarak rajagopal" <dwarak dot rajagopal at amd dot com>, "Uros Bizjak" <ubizjak at gmail dot com>, "Richard Guenther" <richard dot guenther at gmail dot com>, "Xuepeng Guo" <xuepeng dot guo at intel dot com>, "Gcc Patch List" <gcc-patches at gcc dot gnu dot org>, "Jakub Jelinek" <jakub at redhat dot com>, "Joey Ye" <joey dot ye at intel dot com>, "Weiliang Lin" <weiliang dot lin at intel dot com>, "Christophe Harle" <christophe dot harle at amd dot com>, "Sebastian Pop" <sebpop at gmail dot com>
- Date: Wed, 26 Nov 2008 06:25:42 -0800
- Subject: Re: [PATCH] A new meta intrinsic header file for current and future x86 instrinsics.
- References: <820531547ADB6847AF89CC220F6128F1737F@pdsmsx001.ccr.corp.intel.com> <07F78718-6245-4951-8479-3AB811BBEC80@apple.com> <6dc9ffc80811211736j58cfa602m6f2189cc79b0e491@mail.gmail.com> <CB19A7AB-D9F7-4CDE-ACA3-9DAE86CA2F28@apple.com> <6dc9ffc80811211754t7c983d3q7628937519c80666@mail.gmail.com> <2A0B48A2-F0E5-4BAC-8D3B-6170F813EFE6@apple.com> <6dc9ffc80811212351i1a871155t356028e84279a3f2@mail.gmail.com> <E5B626AE-195A-4A46-8237-8838F06AFDC7@apple.com> <6dc9ffc80811252134na19522blb85c5835b9716d50@mail.gmail.com> <80F3BAFE-12E0-41AE-A57E-95EABF100771@apple.com>
On Tue, Nov 25, 2008 at 9:46 PM, Chris Lattner <clattner@apple.com> wrote:
> On Nov 25, 2008, at 9:34 PM, H.J. Lu wrote:
>>>
>>> My understanding is that you're proposing to break this long-standing
>>> tradition by adding new ISA features to an existing header over time.
>>> This
>>> will break this very valuable property of existing practice.
>>
>> The content of <immintrin.h> is controlled by -mXXX. If you don't put
>> -mXXX at command line and use XXX features in your program, you will
>> get an error at compile/link time. If you don't want XXX, you have to use
>> -mno-XXX if XXX is enabled by default. In this case, even if you don't
>> include <immintrin.h>, gcc may still use XXX feature. So you don't lose
>> much with a single <immintrin.h>.
>
> This is another deviation from historical practice. Previous headers (e.g.
> xmmintrin.h) #error out if you don't use the right -m option:
>
> #ifndef __SSE__
> # error "SSE instruction set not enabled"
> #else
That is correct. Now you won't get an error if you don't use XXX feature.
>
>>> Does this description make sense? If so, why do you want to break
>>> existing
>>> practice here? If not, what can I do to make this any more clear?
>>>
>>
>> <immtrin.h> is used by icc.
>
> There are more compilers in the world than just ICC and GCC.
>
> Beyond that, is your entire explanation "icc did it this way"? If so, are
> you claiming that GCC should emulate everything ICC does?
>
Yes, those intrinsics are defined by icc.
--
H.J.