Drop NEON assembly for HRSS.

Since we build Chrome with -mfpu=neon anyway, this isn't currently
needed. Additionally, I had included poly3_invert_vec in the assembly
but hadn't gotten around to wiring it up yet. That assembly referenced a
couple of functions in the C code that had been renamed. Surprisingly,
the NDK linker didn't have a problem with the undefined symbols since it
could statically find them to be unreachable.

But that isn't true everywhere. Some builds did fail because of the
undefined symbols although we're not sure what's different about them.
(Different NDK version perhaps?)

Change-Id: Ibac4724d24df05d6f6007499e1cd884e59889101
Reviewed-on: https://boringssl-review.googlesource.com/c/33604
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
Adam Langley 2018-12-13 09:27:28 -08:00 committed by CQ bot account: commit-bot@chromium.org
parent d6e1f230b3
commit 35a66d4aae
4 changed files with 0 additions and 2983 deletions

View File

@ -105,7 +105,6 @@ if(${ARCH} STREQUAL "arm")
chacha/chacha-armv4.${ASM_EXT}
curve25519/asm/x25519-asm-arm.S
poly1305/poly1305_arm_asm.S
hrss/asm/poly_mul_vec_armv7_neon.S
)
endif()

File diff suppressed because it is too large Load Diff

View File

@ -1395,17 +1395,6 @@ extern void poly_Rq_mul(struct poly *r, const struct poly *a,
const struct poly *b);
#endif
// The file cannot always be built with -mfpu=neon on ARMv7 because that would
// enable NEON instructions everywhere, not just in functions guarded by a
// runtime check for NEON capability. Therefore on ARMv7, if -mfpu=neon isn't
// used, a version of the vector code that has been precompiled and checked-in
// as assembly sources is used. (For AArch64, NEON is assumed to be provided.)
#if defined(OPENSSL_ARM) && !defined(HRSS_HAVE_VECTOR_UNIT)
// poly_mul_vec is defined in assembly.
extern void poly_mul_vec(struct poly *out, const struct poly *x,
const struct poly *y);
#endif
static void poly_mul(struct poly *r, const struct poly *a,
const struct poly *b) {
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_SMALL) && \
@ -1424,14 +1413,6 @@ static void poly_mul(struct poly *r, const struct poly *a,
}
#endif
#if defined(OPENSSL_ARM) && !defined(HRSS_HAVE_VECTOR_UNIT)
// See above about this call.
if (CRYPTO_is_NEON_capable()) {
poly_mul_vec(r, a, b);
return;
}
#endif
// Fallback, non-vector case.
poly_mul_novec(r, a, b);
}

View File

@ -43,7 +43,6 @@ NON_PERL_FILES = {
('linux', 'arm'): [
'src/crypto/curve25519/asm/x25519-asm-arm.S',
'src/crypto/poly1305/poly1305_arm_asm.S',
'src/crypto/hrss/asm/poly_mul_vec_armv7_neon.S',
],
('linux', 'x86_64'): [
'src/crypto/hrss/asm/poly_rq_mul.S',