public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c
@ 2015-01-30 15:07 Szabolcs Nagy
  2015-01-30 15:26 ` Richard Earnshaw
  2015-01-30 20:13 ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Szabolcs Nagy @ 2015-01-30 15:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: ramana.radhakrishnan, marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Hello,

When running natively on AArch64 the preprocessor did not use the
AdvSIMD optimized search_line_fast function, because it was ifdefed
around by __ARM_NEON__ instead of __ARM_NEON.

(The ARM C Language Extensions specifies the __ARM_NEON macro, but not
__ARM_NEON__ which is legacy and thus not defined on AArch64)

Tested on aarch64-unknown-linux-gnu, is this ok?


2015-01-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>

libcpp/Changelog

   * lex.c (search_line_fast): Change __ARM_NEON__ to __ARM_NEON.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libcpp-neon.diff --]
[-- Type: text/x-patch; name=libcpp-neon.diff, Size: 324 bytes --]

diff --git a/libcpp/lex.c b/libcpp/lex.c
index bc1947d..4638510 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -731,7 +731,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
   }
 }
 
-#elif defined (__ARM_NEON__)
+#elif defined (__ARM_NEON)
 #include "arm_neon.h"
 
 static const uchar *

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c
  2015-01-30 15:07 [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c Szabolcs Nagy
@ 2015-01-30 15:26 ` Richard Earnshaw
  2015-01-30 20:13 ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Earnshaw @ 2015-01-30 15:26 UTC (permalink / raw)
  To: Szabolcs Nagy, gcc-patches; +Cc: Ramana Radhakrishnan, Marcus Shawcroft

On 30/01/15 12:52, Szabolcs Nagy wrote:
> Hello,
> 
> When running natively on AArch64 the preprocessor did not use the
> AdvSIMD optimized search_line_fast function, because it was ifdefed
> around by __ARM_NEON__ instead of __ARM_NEON.
> 
> (The ARM C Language Extensions specifies the __ARM_NEON macro, but not
> __ARM_NEON__ which is legacy and thus not defined on AArch64)
> 
> Tested on aarch64-unknown-linux-gnu, is this ok?
> 
> 
> 2015-01-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>
> 
> libcpp/Changelog
> 
>    * lex.c (search_line_fast): Change __ARM_NEON__ to __ARM_NEON.
> 
> 

I think this is trivial enough to go in now.

OK.

R.

> libcpp-neon.diff
> 
> 
> diff --git a/libcpp/lex.c b/libcpp/lex.c
> index bc1947d..4638510 100644
> --- a/libcpp/lex.c
> +++ b/libcpp/lex.c
> @@ -731,7 +731,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
>    }
>  }
>  
> -#elif defined (__ARM_NEON__)
> +#elif defined (__ARM_NEON)
>  #include "arm_neon.h"
>  
>  static const uchar *
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c
  2015-01-30 15:07 [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c Szabolcs Nagy
  2015-01-30 15:26 ` Richard Earnshaw
@ 2015-01-30 20:13 ` Richard Henderson
  2015-02-02 15:34   ` Szabolcs Nagy
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2015-01-30 20:13 UTC (permalink / raw)
  To: Szabolcs Nagy, gcc-patches; +Cc: ramana.radhakrishnan, marcus.shawcroft

On 01/30/2015 04:52 AM, Szabolcs Nagy wrote:
> When running natively on AArch64 the preprocessor did not use the
> AdvSIMD optimized search_line_fast function, because it was ifdefed
> around by __ARM_NEON__ instead of __ARM_NEON.

Yes, sorry I didn't follow up on that from September:

  https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00149.html

You also want to change to use vaddvq_u16 instead of
the current vpadd and vget_lane reduction.

I was going to wait until stage1 to resubmit this.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c
  2015-01-30 20:13 ` Richard Henderson
@ 2015-02-02 15:34   ` Szabolcs Nagy
  2015-02-02 15:43     ` Richard Earnshaw
  0 siblings, 1 reply; 5+ messages in thread
From: Szabolcs Nagy @ 2015-02-02 15:34 UTC (permalink / raw)
  To: Richard Henderson, gcc-patches; +Cc: Ramana Radhakrishnan, Marcus Shawcroft



On 30/01/15 19:14, Richard Henderson wrote:
> On 01/30/2015 04:52 AM, Szabolcs Nagy wrote:
>> When running natively on AArch64 the preprocessor did not use the
>> AdvSIMD optimized search_line_fast function, because it was ifdefed
>> around by __ARM_NEON__ instead of __ARM_NEON.
>
> Yes, sorry I didn't follow up on that from September:
>
>    https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00149.html
>
> You also want to change to use vaddvq_u16 instead of
> the current vpadd and vget_lane reduction.
>
> I was going to wait until stage1 to resubmit this.
>


that's a bigger change, can it be a separate patch
or do you plan to do it together with the ifdef fix?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c
  2015-02-02 15:34   ` Szabolcs Nagy
@ 2015-02-02 15:43     ` Richard Earnshaw
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Earnshaw @ 2015-02-02 15:43 UTC (permalink / raw)
  To: Szabolcs Nagy, Richard Henderson, gcc-patches
  Cc: Ramana Radhakrishnan, Marcus Shawcroft

On 02/02/15 15:34, Szabolcs Nagy wrote:
> 
> 
> On 30/01/15 19:14, Richard Henderson wrote:
>> On 01/30/2015 04:52 AM, Szabolcs Nagy wrote:
>>> When running natively on AArch64 the preprocessor did not use the
>>> AdvSIMD optimized search_line_fast function, because it was ifdefed
>>> around by __ARM_NEON__ instead of __ARM_NEON.
>>
>> Yes, sorry I didn't follow up on that from September:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00149.html
>>
>> You also want to change to use vaddvq_u16 instead of
>> the current vpadd and vget_lane reduction.
>>
>> I was going to wait until stage1 to resubmit this.
>>
> 
> 
> that's a bigger change, can it be a separate patch
> or do you plan to do it together with the ifdef fix?
> 
> 
> 

I think the two should be separated.  The existing code will work on
AArch64, even though it could be improved upon.

R.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-02 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 15:07 [PATCH] Change __ARM_NEON__ to __ARM_NEON in libcpp/lex.c Szabolcs Nagy
2015-01-30 15:26 ` Richard Earnshaw
2015-01-30 20:13 ` Richard Henderson
2015-02-02 15:34   ` Szabolcs Nagy
2015-02-02 15:43     ` Richard Earnshaw

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).