[openssl/openssl] 811061: Don't use __ARMEL__/__ARMEB__ in aarch64 assembly
David Benjamin
noreply at github.com
Thu Oct 5 18:06:26 UTC 2023
Branch: refs/heads/openssl-3.0
Home: https://github.com/openssl/openssl
Commit: 8110612b21a6ceb6ae9291067142594b2a11f01d
https://github.com/openssl/openssl/commit/8110612b21a6ceb6ae9291067142594b2a11f01d
Author: David Benjamin <davidben at google.com>
Date: 2023-10-05 (Thu, 05 Oct 2023)
Changed paths:
M crypto/aes/asm/aesv8-armx.pl
M crypto/arm_arch.h
M crypto/modes/asm/ghashv8-armx.pl
M crypto/poly1305/asm/poly1305-armv8.pl
Log Message:
-----------
Don't use __ARMEL__/__ARMEB__ in aarch64 assembly
GCC's __ARMEL__ and __ARMEB__ defines denote little- and big-endian arm,
respectively. They are not defined on aarch64, which instead use
__AARCH64EL__ and __AARCH64EB__.
However, OpenSSL's assembly originally used the 32-bit defines on both
platforms and even define __ARMEL__ and __ARMEB__ in arm_arch.h. This is
less portable and can even interfere with other headers, which use
__ARMEL__ to detect little-endian arm.
Over time, the aarch64 assembly has switched to the correct defines,
such as in 32bbb62ea634239e7cb91d6450ba23517082bab6. This commit
finishes the job: poly1305-armv8.pl needed a fix and the dual-arch
armx.pl files get one more transform to convert from 32-bit to 64-bit.
(There is an even more official endianness detector, __ARM_BIG_ENDIAN in
the Arm C Language Extensions. But I've stuck with the GCC ones here as
that would be a larger change.)
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
(Merged from https://github.com/openssl/openssl/pull/22176)
More information about the openssl-commits
mailing list