This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, i386, testsuite] Fix for PR49547, new tescases for lzcnt instruction
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Mike Stump <mikestump at comcast dot net>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, "Jagasia, Harsha" <harsha dot jagasia at amd dot com>
- Date: Mon, 1 Aug 2011 12:21:50 +0400
- Subject: Re: [Patch, i386, testsuite] Fix for PR49547, new tescases for lzcnt instruction
- References: <CAGs3RfvUaj4vN9+GxFzP+v8x3xYT_EafU0sDC7RZFGZ+CWp0zw@mail.gmail.com> <5BFC83DD-D8C5-4025-9DC4-41A277CD781D@comcast.net> <CAFULd4bSZsmdGjumbXK_rvu7cSc7JWshfjvBQPVPXESzs-8i-w@mail.gmail.com> <CAGs3RfvwZYv+iZ8Yv_7S55ti+Y3k70KSnvQsuz1he_O9TsO8yA@mail.gmail.com> <CAFULd4b-Rf6AsOETQghsYCK1Ae3G40Xp3j4vJuO24Vzt-34fgQ@mail.gmail.com> <CAGs3Rfv1JFGcMLLSzYnUvZaVaj6fTi4yuiX3v0gVsZA5T5-MXA@mail.gmail.com> <CAFULd4bZzPyJicMZX0k1in+nLrXsHu=NX1F9a4UppU4Vie1whw@mail.gmail.com> <CAGs3Rfs1qkt0JvOziCPnEBv82nhprXPAdPFtjP5Ug6a4pJsTmg@mail.gmail.com> <CAMe9rOqVeeVpkVsE4rU3mqWCjYxQC6heO+OCq+WpkpYco49_UA@mail.gmail.com> <CAGs3RfvTpWZ58m_ueFUZzE7RF_XgkezeRngXzbdUckEmnxSPFg@mail.gmail.com> <CAMe9rOr8Cy=Ww_6Xi1yYd6P3z7AeHF85jwT9=zDww9eHDhbTBQ@mail.gmail.com> <CAGs3Rfs6reAWjPynf2CeO7aQ_7fj3Ytzxvu3szdsnfE3k7khrA@mail.gmail.com> <CAFULd4ZXnbSd9A8sDxs4Ehi9DJcw=DrY6Rb3P0MxWTn-So=MHA@mail.gmail.com> <CAMe9rOqqgwR+RowQGoK9+dVGqAvO_adCoYSELPxNct94ATTpmQ@mail.gmail.com> <CAGs3RfvaHULeo-665d9fVt=_-=ECHNn=87+kOv3-tJULjuce+g@mail.gmail.com>
Ping.
--
K
On Wed, Jul 27, 2011 at 10:23 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Okay, then here is an updated patch
>
> updated ChangeLog entry:
> 2011-07-26 ?Kirill Yukhin ?<kirill.yukhin@intel.com>
>
> ? ? ? ?PR target/49547
> ? ? ? ?* config.gcc (i[34567]86-*-*): Replace abmintrin.h with
> ? ? ? ?lzcntintrin.h.
> ? ? ? ?(x86_64-*-*): Likewise.
> ? ? ? ?* config/i386/i386.opt (mlzcnt): New.
> ? ? ? ?* config/i386/abmintrin.h: File removed.
> ? ? ? ?(__lzcnt_u16, __lzcnt, __lzcnt_u64): Moved to ...
> ? ? ? ?* config/i386/lzcntintrin.h: ... here. New file.
> ? ? ? ?(__lzcnt): Rename to ...
> ? ? ? ?(__lzcnt32): ... this.
> ? ? ? ?* config/i386/bmiintrin.h (head): Update copyright year.
> ? ? ? ?(__lzcnt_u16): Removed.
> ? ? ? ?(__lzcnt_u32): Likewise.
> ? ? ? ?(__lzcnt_u64): Likewise.
> ? ? ? ?* config/i386/x86intrin.h: Include lzcntintrin.h when __LZCNT__
> ? ? ? ?is defined, remove abmintrin.h.
> ? ? ? ?* config/i386/cpuid.h: New define.
> ? ? ? ?* config/i386/driver-i386.c (host_detect_local_cpu): Detect
> ? ? ? ?LZCNT feature.
> ? ? ? ?* config/i386/i386-c.c (ix86_target_macros_internal): Define
> ? ? ? ?__LZCNT__ if needed.
> ? ? ? ?* config/i386/i386.c (ix86_target_string): New option -mlzcnt.
> ? ? ? ?(ix86_option_override_internal): Handle LZCNT option.
> ? ? ? ?(ix86_valid_target_attribute_inner_p): Likewise.
> ? ? ? ?(struct builtin_description bdesc_args) <IX86_BUILTIN_CLZS>: Update.
> ? ? ? ?* config/i386/i386.h (TARGET_LZCNT): New.
> ? ? ? ?(CLZ_DEFINED_VALUE_AT_ZERO): Update.
> ? ? ? ?* config/i386/i386.md (clz<mode>2): Update insn constraint.
> ? ? ? ?(clz<mode>2_lzcnt): Likewise.
> ? ? ? ?* doc/invoke.texi: Mention -mlzcnt option.
> ? ? ? ?* doc/extend.texi: Likewise.
>
> Bootstrapped successfully.
> Ok?
>
> K
>
> On Wed, Jul 27, 2011 at 8:51 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Wed, Jul 27, 2011 at 9:49 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>>> On Wed, Jul 27, 2011 at 6:12 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>>>> Than as it is ABM header, it should include two headers: lzcntinrin.h
>>>> and popcntintrin.h
>>>>
>>>> But again, it seems useless to me. If we cannot remove empty header,
>>>> let it stay empty...
>>>>
>>>> K
>>>>
>>>> On Wed, Jul 27, 2011 at 7:53 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>>> On Wed, Jul 27, 2011 at 8:45 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>>>>>> Just have a closer look to ABM intrinsics support in GCC
>>>>>> Seems, we have popcnt support in separate file: popcntintrin.h
>>>>>>
>>>>>> So, after I move lzcnt intrinsics to lzcntintrin.h, abmintrin will
>>>>>> become useless and have to be removed at all
>>>>>
>>>>> We can't remove an installed header file. ?It should just include
>>>>> other header files.
>>>
>>> ambintrin.h has:
>>>
>>> #ifndef _X86INTRIN_H_INCLUDED
>>> # error "Never use <abmintrin.h> directly; include <x86intrin.h> instead."
>>> #endif
>>>
>>> I see no problem in removing this header. It is not possible to
>>> #include it directly.
>>>
>>
>> Sounds good to me.
>>
>> --
>> H.J.
>>
>