Imported Upstream version 6.12.0.86

Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-07-10 08:44:59 +00:00
parent 92747312ea
commit 0b380204a4
812 changed files with 26901 additions and 9053 deletions

View File

@@ -0,0 +1,20 @@
Mono uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Core software.
Attributions and license notices for test cases originally authored by
third parties can be found in the respective test directories.
In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:
dotnet@microsoft.com
The attached notices are provided for information only.
License notice for Code Project
--------------------------------
Title: Thread Local Storage - The C++ Way
Content: https://www.codeproject.com/Articles/8113/Thread-Local-Storage-The-C-Way
Reference: https://github.com/mono/boringssl/blob/eec2ca7e76c04ca41ef5bfc875ee3b0374cb7a94/crypto/thread_win.c#L138-L148
License: https://www.codeproject.com/info/EULA.aspx

View File

@@ -51,15 +51,7 @@ $code=<<___;
.text
___
$code.=<<___ if ($flavour =~ /64/);
#if !defined(__clang__)
.arch armv8-a+crypto
#elif defined(ANDROID) && defined(__clang__)
#if __clang_major__ > 3
.arch armv8-a+crypto
#else
.arch armv8-a+crypto,+neon
#endif
#endif
___
$code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/);
#^^^^^^ this is done to simplify adoption by not depending

View File

@@ -25,6 +25,48 @@
extern uint32_t OPENSSL_armcap_P;
#if defined(__FreeBSD__)
#include <stdlib.h>
#include <sys/types.h>
#include <machine/armreg.h>
// Support for older version of armreg.h
#ifndef ID_AA64ISAR0_AES_VAL
#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES
#endif
#ifndef ID_AA64ISAR0_SHA1_VAL
#define ID_AA64ISAR0_SHA1_VAL ID_AA64ISAR0_SHA1
#endif
#ifndef ID_AA64ISAR0_SHA2_VAL
#define ID_AA64ISAR0_SHA2_VAL ID_AA64ISAR0_SHA2
#endif
void OPENSSL_cpuid_setup(void) {
if (getenv("QEMU_EMULATING") != NULL) {
return;
}
uint64_t isar0_val = READ_SPECIALREG(id_aa64isar0_el1);
OPENSSL_armcap_P |= ARMV7_NEON;
if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_BASE) {
OPENSSL_armcap_P |= ARMV8_PMULL;
}
if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_PMULL) {
OPENSSL_armcap_P |= ARMV8_PMULL;
}
if (ID_AA64ISAR0_SHA1_VAL(isar0_val) >= ID_AA64ISAR0_SHA1_BASE) {
OPENSSL_armcap_P |= ARMV8_SHA1;
}
if (ID_AA64ISAR0_SHA2_VAL(isar0_val) >= ID_AA64ISAR0_SHA2_BASE) {
OPENSSL_armcap_P |= ARMV8_SHA256;
}
}
#else // linux
void OPENSSL_cpuid_setup(void) {
unsigned long hwcap = getauxval(AT_HWCAP);
@@ -58,4 +100,6 @@ void OPENSSL_cpuid_setup(void) {
}
}
#endif
#endif /* OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP */

View File

@@ -59,15 +59,7 @@ $code=<<___;
.text
___
$code.=<<___ if ($flavour =~ /64/);
#if !defined(__clang__)
.arch armv8-a+crypto
#elif defined(ANDROID) && defined(__clang__)
#if __clang_major__ > 3
.arch armv8-a+crypto
#else
.arch armv8-a+crypto,+neon
#endif
#endif
___
$code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/);