* [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI
@ 2016-02-29 17:48 Kyrill Tkachov
2016-03-02 15:10 ` Christophe Lyon
2016-03-07 4:50 ` Ramana Radhakrishnan
0 siblings, 2 replies; 3+ messages in thread
From: Kyrill Tkachov @ 2016-02-29 17:48 UTC (permalink / raw)
To: GCC Patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
Hi all,
Now that we've moved to pragmas guarding the various intrinsics in arm_neon.h I think we should still
throw a #error if someone tries to include the header while compiling for -mfloat-abi=soft.
This gives a more helpful error message when someone has a compiler configured --with-float=soft
and forgets to add an appropriate -mfloat-abi option on the command line.
Currently we'll just give tons of error messages whereas with this patch we just
show a simple clean message.
Tested on arm. This could be argued to be a user experience regression fix.
Ok for trunk?
Thanks,
Kyrill
2016-02-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm_neon.h: Show error if using with soft-float ABI.
[-- Attachment #2: arm-neon-soft.patch --]
[-- Type: text/x-patch, Size: 618 bytes --]
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 47816d52187b979b92d7592991d29e4cbe8f9357..6a880235d24759e9938fb08365eaddff77d60f0e 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -27,6 +27,10 @@
#ifndef _GCC_ARM_NEON_H
#define _GCC_ARM_NEON_H 1
+#ifndef __ARM_FP
+#error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softp or -mfloat-abi=hard"
+#else
+
#pragma GCC push_options
#pragma GCC target ("fpu=neon")
@@ -14833,3 +14837,4 @@ vmull_high_p64 (poly64x2_t __a, poly64x2_t __b)
#pragma GCC pop_options
#endif
+#endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI
2016-02-29 17:48 [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI Kyrill Tkachov
@ 2016-03-02 15:10 ` Christophe Lyon
2016-03-07 4:50 ` Ramana Radhakrishnan
1 sibling, 0 replies; 3+ messages in thread
From: Christophe Lyon @ 2016-03-02 15:10 UTC (permalink / raw)
To: Kyrill Tkachov; +Cc: GCC Patches, Ramana Radhakrishnan, Richard Earnshaw
On 29 February 2016 at 18:48, Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi all,
>
> Now that we've moved to pragmas guarding the various intrinsics in
> arm_neon.h I think we should still
> throw a #error if someone tries to include the header while compiling for
> -mfloat-abi=soft.
>
> This gives a more helpful error message when someone has a compiler
> configured --with-float=soft
> and forgets to add an appropriate -mfloat-abi option on the command line.
> Currently we'll just give tons of error messages whereas with this patch we
> just
> show a simple clean message.
>
> Tested on arm. This could be argued to be a user experience regression fix.
Agreed :)
> Ok for trunk?
>
> Thanks,
> Kyrill
>
> 2016-02-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/arm/arm_neon.h: Show error if using with soft-float ABI.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI
2016-02-29 17:48 [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI Kyrill Tkachov
2016-03-02 15:10 ` Christophe Lyon
@ 2016-03-07 4:50 ` Ramana Radhakrishnan
1 sibling, 0 replies; 3+ messages in thread
From: Ramana Radhakrishnan @ 2016-03-07 4:50 UTC (permalink / raw)
To: Kyrill Tkachov; +Cc: GCC Patches, Ramana Radhakrishnan, Richard Earnshaw
On Mon, Feb 29, 2016 at 5:48 PM, Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi all,
>
> Now that we've moved to pragmas guarding the various intrinsics in
> arm_neon.h I think we should still
> throw a #error if someone tries to include the header while compiling for
> -mfloat-abi=soft.
>
> This gives a more helpful error message when someone has a compiler
> configured --with-float=soft
> and forgets to add an appropriate -mfloat-abi option on the command line.
> Currently we'll just give tons of error messages whereas with this patch we
> just
> show a simple clean message.
>
> Tested on arm. This could be argued to be a user experience regression fix.
> Ok for trunk?
OK.
thanks,
Ramana
>
> Thanks,
> Kyrill
>
> 2016-02-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/arm/arm_neon.h: Show error if using with soft-float ABI.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-07 4:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 17:48 [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI Kyrill Tkachov
2016-03-02 15:10 ` Christophe Lyon
2016-03-07 4:50 ` Ramana Radhakrishnan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).