This is the mail archive of the
mailing list for the GCC project.
Re: [arm][patch] fix arm_neon_ok check on !arm_arch7
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: "Stubbs, Andrew" <Andrew_Stubbs at mentor dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>
- Cc: Richard Earnshaw <Richard dot Earnshaw at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 15 Oct 2014 17:34:44 +0100
- Subject: Re: [arm][patch] fix arm_neon_ok check on !arm_arch7
- Authentication-results: sourceware.org; auth=none
- References: <5414B99D dot 3020202 at codesourcery dot com> <5416B580 dot 9070208 at arm dot com> <5416C5C3 dot 8070603 at codesourcery dot com>,<20140923082716 dot GA28745 at arm dot com> <A54A6A507A368D45AE3F44455B628046E94DA025 at EU-MBX-04 dot mgc dot mentorg dot com>
On 23/09/14 16:22, Stubbs, Andrew wrote:
Maybe the original patch is better? Or maybe it should reconfigure the FPU instead of erroring out? But reconfigure it to what?
are you still working on this?
a bunch of tests on my local environment failed because of the reason James mentioned. for example gcc.target/arm/xor-and.c etc.
gcc.target/arm/xor-and.c:1:0: error: target CPU does not support NEON
From: James Greenhalgh [firstname.lastname@example.org]
Sent: 23 September 2014 09:27
To: Stubbs, Andrew
Cc: Richard Earnshaw; email@example.com
Subject: Re: [arm][patch] fix arm_neon_ok check on !arm_arch7
On Mon, Sep 15, 2014 at 11:56:03AM +0100, Andrew Stubbs wrote:
On 15/09/14 10:46, Richard Earnshaw wrote:
Hmm, I wonder if arm_override_options should reject neon + (arch < 7).
Is this more to your taste?
Is this really such a good idea? It causes carnage throughout the
testsuite if you have configured with support for Neon and the testcase
is written with dg-options for a pre-armv7-a -march value.
For example in:
Which forces -march=armv5.
Perhaps you just have to fix the effective-target-ok tests - but then
we lose swathes of test coverage.
P.S. arm_override_options was renamed in 2010.
2014-09-15 Andrew Stubbs <firstname.lastname@example.org>
* gcc/config/arm/arm.c (arm_option_override): Reject -mfpu=neon
when architecture is older than ARMv7.
--- gcc/config/arm/arm.c (revision 215228)
+++ gcc/config/arm/arm.c (working copy)
@@ -2845,6 +2845,9 @@
arm_fpu_desc = &all_fpus[arm_fpu_index];
+ if (TARGET_NEON && !arm_arch7)
+ error ("target CPU does not support NEON");