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: "rajagopal, dwarak" <dwarak dot rajagopal at amd dot com>
- Cc: "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, "Lu, Hongjiu" <hongjiu dot lu at intel 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>, "Chris Lattner" <clattner at apple dot com>, "Jan Hubicka" <jh at suse dot cz>
- Date: Mon, 8 Dec 2008 08:34:20 -0800
- Subject: Re: [PATCH] A new meta intrinsic header file for current and future x86 instrinsics.
- References: <820531547ADB6847AF89CC220F6128F1737F@pdsmsx001.ccr.corp.intel.com> <4923023C.3090106@gmail.com> <9E1304B144EBEB4C97F4162BFAC4788602D3A6CD@SAUSEXMB2.amd.com> <84fc9c000811191244h1b66a720m97c05aa211d45408@mail.gmail.com> <F3FBCD4755B65C4A958DE1A4B963C499FFE4@SAUSEXMB2.amd.com> <6dc9ffc80812030806w150cd434u21c57eedc68850db@mail.gmail.com> <6dc9ffc80812031350u51f40b0bvca6a17ff7fbfdb3e@mail.gmail.com> <49382171.9010703@gmail.com> <F3FBCD4755B65C4A958DE1A4B963C4990BB53B@SAUSEXMB2.amd.com>
On Mon, Dec 8, 2008 at 8:00 AM, rajagopal, dwarak
<dwarak.rajagopal@amd.com> wrote:
>
>>
>> H.J. Lu wrote:
>> > On Wed, Dec 3, 2008 at 8:06 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> >
>> >> On Wed, Dec 3, 2008 at 8:03 AM, rajagopal, dwarak
>> >> <dwarak.rajagopal@amd.com> wrote:
>> >>
>> >>>> Dwarak, can you based on the ideas in
>> >>>> immintrin.h
>> >>>> provide an implementation of x86intrin.h we can add to GCC?
>> >>>>
>> >>>>
>> >>> Attached is a patch that implements x86intrin.h. I'll add
>> "x86intrin.h"
>> >>> to gcc.target tests if this patch is Ok?
>> >>>
>> >>>
>> >> Why not just include <immintrin.h> for MMX, SSE, SSE2, SSE3, SSSE4
> and
>> AVX?
>> >>
>> >>
>> >>
>> >
>> > Will this patch work?
>> >
>>
>> This patch is OK (with the ChangeLog) if there are no other objections
>> within 24h.
>>
>> Thanks,
>> Uros.
>>
>
> Hi Uros,
> Why do we need to add "immintrin.h" which contains all intrinsics
> supported by Intel, instead of having MMX, SSE, SSE2, SSE3, SSSE4 and
> AVX in the x86intrin.h file? Why do we think this is a better approach
> than just including all the instruction set specific files in
> x86intrin.h? Isn't it simpler and clearer to have all the *intrin.h
> files included directly in x86intrin.h.
>
Well, <immintrin.h> is required for AVX intrinsics, which is true for icc, gcc
and MSVC. Since <immintrin.h> also supports MMX, SSE, SSE2, SSE3 and
SSSE4, we don't need to include other Xmmintrin.h individually.
--
H.J.