Okay, then here is an updated patch updated ChangeLog entry: 2011-07-26 Kirill Yukhin <[email protected]>
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 <[email protected]> wrote:
> On Wed, Jul 27, 2011 at 9:49 AM, Uros Bizjak <[email protected]> wrote:
>> On Wed, Jul 27, 2011 at 6:12 PM, Kirill Yukhin <[email protected]>
>> 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 <[email protected]> wrote:
>>>> On Wed, Jul 27, 2011 at 8:45 AM, Kirill Yukhin <[email protected]>
>>>> 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.
>
lzcnt-4.gcc.patch
Description: Binary data
