[PATCH][ARM] Implement CRC32 intrinsics for AArch32 in ARMv8-A

Kyrill Tkachov kyrylo.tkachov@arm.com
Fri Dec 20 13:56:00 GMT 2013


On 19/12/13 17:58, Kyrill Tkachov wrote:
> On 18/12/13 15:32, Ramana Radhakrishnan wrote:
>> On Tue, Dec 3, 2013 at 1:46 PM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>>> Ping?
>>> http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02351.html
>>>
>>> Thanks,
>>> Kyrill
>> Ok if no objections in 24 hours.
> Thanks Ramana, I've committed it as r206128 together with this obvious change
> that sets the conds attribute on the md pattern.

I just noticed that I committed the first version of the patch posted at:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02250.html

instead of the second version posted at:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02351.html

that was approved. The difference is only that the second one has underscores 
under the variable names in arm_acle.h.

I've committed the attached patch to add them as obvious with r206149. Tested 
arm-none-eabi on a model.

Sorry for the noise,
Kyrill

2013-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/arm/arm_acle.h: Add underscores before variables.

>
> Kyrill
>
>
>> Ramana
>>
>>> On 26/11/13 09:44, Kyrill Tkachov wrote:
>>>> Ping?
>>>>
>>>> Thanks,
>>>> Kyrill
>>>>
>>>> On 19/11/13 17:04, Kyrill Tkachov wrote:
>>>>> On 19/11/13 16:26, Joseph S. Myers wrote:
>>>>>> In any target header installed for user use, such as arm_acle.h, you
>>>>>> need
>>>>>> to be namespace-clean.  In this case, that means you need to use
>>>>>> implementation-namespace identifiers such as __a, __b and __d in case
>>>>>> the
>>>>>> user has defined macros with names such as a, b and d (unless the ACLE
>>>>>> says that identifiers a, b and d are in the implementation's namespace
>>>>>> when this header is included, which would be a very odd thing for it to
>>>>>> do).
>>>>>>
>>>>> Hi Joseph,
>>>>>
>>>>> Thanks for the catch. ACLE doesn't expect a,b,d to be in the
>>>>> implementation
>>>>> namespace. I've added underscores before them.
>>>>>
>>>>> Made sure tests pass.
>>>>>
>>>>> Revised patch attached.
>>>>> How's this?
>>>>>
>>>>> Kyrill
>>>>>
>>>>> gcc/
>>>>> 2013-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>>>
>>>>>          * Makefile.in (TEXI_GCC_FILES): Add arm-acle-intrinsics.texi.
>>>>>          * config.gcc (extra_headers): Add arm_acle.h.
>>>>>          * config/arm/arm.c (FL_CRC32): Define.
>>>>>          (arm_have_crc): Likewise.
>>>>>          (arm_option_override): Set arm_have_crc.
>>>>>          (arm_builtins): Add CRC32 builtins.
>>>>>          (bdesc_2arg): Likewise.
>>>>>          (arm_init_crc32_builtins): New function.
>>>>>          (arm_init_builtins): Initialise CRC32 builtins.
>>>>>          (arm_file_start): Handle architecture extensions.
>>>>>          * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define
>>>>> __ARM_FEATURE_CRC32.
>>>>>          Define __ARM_32BIT_STATE.
>>>>>          (TARGET_CRC32): Define.
>>>>>          * config/arm/arm-arches.def: Add armv8-a+crc.
>>>>>          * config/arm/arm-tables.opt: Regenerate.
>>>>>          * config/arm/arm.md (type): Add crc.
>>>>>          (<crc_variant>): New insn.
>>>>>          * config/arm/arm_acle.h: New file.
>>>>>          * config/arm/iterators.md (CRC): New int iterator.
>>>>>          (crc_variant, crc_mode): New int attributes.
>>>>>          * confg/arm/unspecs.md (UNSPEC_CRC32B, UNSPEC_CRC32H,
>>>>> UNSPEC_CRC32W,
>>>>>          UNSPEC_CRC32CB, UNSPEC_CRC32CH, UNSPEC_CRC32CW): New unspecs.
>>>>>          * doc/invoke.texi: Document -march=armv8-a+crc option.
>>>>>          * doc/extend.texi: Document ACLE intrinsics.
>>>>>          * doc/arm-acle-intrinsics.texi: New.
>>>>>
>>>>>
>>>>> gcc/testsuite
>>>>> 2013-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>>>
>>>>>          * lib/target-supports.exp (add_options_for_arm_crc): New
>>>>> procedure.
>>>>>          (check_effective_target_arm_crc_ok_nocache): Likewise.
>>>>>          (check_effective_target_arm_crc_ok): Likewise.
>>>>>          * gcc.target/arm/acle/: New directory.
>>>>>          * gcc.target/arm/acle/acle.exp: New.
>>>>>          * gcc.target/arm/acle/crc32b.c: New test.
>>>>>          * gcc.target/arm/acle/crc32h.c: Likewise.
>>>>>          * gcc.target/arm/acle/crc32w.c: Likewise.
>>>>>          * gcc.target/arm/acle/crc32d.c: Likewise.
>>>>>          * gcc.target/arm/acle/crc32cb.c: Likewise.
>>>>>          * gcc.target/arm/acle/crc32ch.c: Likewise.
>>>>>          * gcc.target/arm/acle/crc32cw.c: Likewise.
>>>>>          * gcc.target/arm/acle/crc32cd.c: Likewise.
>> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crc-fixup.patch
Type: text/x-patch
Size: 2461 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131220/4301b094/attachment.bin>


More information about the Gcc-patches mailing list