This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GCC][ARM] Ensure dotproduct is only enabled on armv8 neon
- From: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, Sam Tebbs <Sam dot Tebbs at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, "nickc at redhat dot com" <nickc at redhat dot com>, nd <nd at arm dot com>
- Date: Fri, 30 Nov 2018 14:48:52 +0000
- Subject: Re: [PATCH][GCC][ARM] Ensure dotproduct is only enabled on armv8 neon
- References: <436f6db7-a64d-c271-27e8-f54c7bd3c943@arm.com> <5C0146E9.9020607@foss.arm.com>
On 30/11/2018 14:19, Kyrill Tkachov wrote:
>
> On 23/11/18 17:01, Sam Tebbs wrote:
>> Hi all,
>>
>> Currently on AArch32, invoking with -march=armv8.2-a+dotprod -mfpu=neon
>> incorrectly enables armv7 dotproduct. This patch restricts dotproduct
>> to armv8
>> to correct the issue.
>>
>> When using a float ABI different from that of the host platform,
>> including
>> /usr/include/gnu/stubs.h errors due to a non-existent stubs-soft.h
>> file, so
>> an inclusion of a standard header file is required to compile
>> successfully and
>> find the correct float ABI to select in
>> check_effective_target_arm_v8_2a_dotprod_neon_ok_nocache.
>>
>> Bootstrapped and regression tested on arm-none-linux-gnueabihf with no
>> regressions.
>>
>> OK for trunk?
>>
>
> Ok. I'd hope it's a niche usecase as the -mfpu=auto is the recommended
> way these days.
>
Hmm, this should work in the same way as removing the fp16 or fp16fml
extensions. So why doesn't specifying -mfpu=neon cause that bit to be
cleared from the feature sets?
R.
> Thanks,
> Kyrill
>
>> gcc/ChangeLog:
>>
>> 2018-11-23 Sam Tebbs<sam.tebbs@arm.com>
>>
>> * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2018-11-23 Sam Tebbs<sam.tebbs@arm.com>
>>
>> * gcc.target/arm/neon-dotprod-restriction.c: New file.
>> * lib/target-supports.exp
>> (check_effective_target_arm_v8_2a_dotprod_neon_ok_nocache):
>> Include stdint.h.
>>
>