]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[aarch64][libstdc++] Use __ARM_BIG_ENDIAN instead of __AARCH64EB__ in opt_random.h
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 20 Dec 2017 10:28:13 +0000 (10:28 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 20 Dec 2017 10:28:13 +0000 (10:28 +0000)
As has been spotted at https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01289.html
we check the __AARCH64EB__ macro for aarch64 big-endian
detection in config/cpu/aarch64/opt/ext/opt_random.h.
That works just fine with GCC but the standardised ACLE[1] macro
for that purpose is __ARM_BIG_ENDIAN so there is a possibility
that non-GCC compilers that include this header are not aware
of this predefine.

So this patch changes the use of __AARCH64EB__ to
the more portable __ARM_BIG_ENDIAN.

Tested on aarch64-none-elf and aarch64_be-none-elf.

Preapproved by Jeff at https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01326.html

* config/cpu/aarch64/opt/ext/opt_random.h (__VEXT): Check
__ARM_BIG_ENDIAN instead of __AARCH64EB__.

From-SVN: r255857

libstdc++-v3/ChangeLog
libstdc++-v3/config/cpu/aarch64/opt/ext/opt_random.h

index 84119ccf1d11a0987b8c1474d91dead834356428..abfd05671d61374621fd92713f9f3cc738abe053 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * config/cpu/aarch64/opt/ext/opt_random.h (__VEXT): Check
+       __ARM_BIG_ENDIAN instead of __AARCH64EB__.
+
 2017-12-18  François Dumont  <fdumont@gcc.gnu.org>
 
        PR libstdc++/80761
index 330050fc7f79c42deafe592bebf54f7a2175d72a..7c824809b78073a435a772e7336750d39f79ac70 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifdef __ARM_NEON
 
-#ifdef __AARCH64EB__
+#ifdef __ARM_BIG_ENDIAN
 # define __VEXT(_A,_B,_C) __builtin_shuffle (_A, _B, (__Uint8x16_t) \
     {16-_C, 17-_C, 18-_C, 19-_C, 20-_C, 21-_C, 22-_C, 23-_C, \
      24-_C, 25-_C, 26-_C, 27-_C, 28-_C, 29-_C, 30-_C, 31-_C})