This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC does not support *mmintrin.h with function specific opts


On Sat, May 18, 2013 at 6:00 AM, Sriraman Tallam <tmsriram@google.com> wrote:

>>> > I don't really understand why you made the change to x86intrin.h instead of
>>> > making it inside each *mmintrin.h header. The code would be the same size,
>>> > it would let us include smmintrin.h directly if we wanted to, and
>>> > x86intrin.h would also automatically work.
>>>
>>> Right, I should have done that instead!
>>
>> Yeah, definitely.  For the standalone headers, which have currently
>> __<FEATURE>__ guards inside of it, please replace it by the larger snippets
>> involving #pragma, and in the x86intrin.h/immintrin.h headers include those
>> unconditionally, instead of just if __<FEATURE>__ is defined.
>> For the non-standalone headers (newer ones like avxintrin.h), replace
>> the #ifdef __<FEATURE>__ in immintrin.h/x86intrin.h with larger snippets.
>
>
> * I did mostly as suggested except that even for avx and avx2 headers
> I did not see the harm in doing it in the header itself.  AVX header
> did not have the "#ifndef _AVXINTRIN_H_INCLUDED" which I added before
> doing this. I have added test cases to show it is doing the right
> thing  for avx.
> * I also found that when the caller to these intrinsics do not have
> the right target attribute, an error is raised in -O2 mode but not in
> -O0 mode.  I have fixed this with a patch to ipa-inline.c, please see
> if this is alright. Test case intrinsics_5.c checks if an error is
> raised.
> * LZCNT needed to be handled which is done now.

* common/config/i386/i386-common.c: Handle LZCNT.

The above part is OK for mainline and release patches. Please commit
LZCNT part as a separate patch to mainline.

Also, please get middle-end part reviewed and committed before we
proceed with target-dependent part.

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]