-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation/link fixes for iOS/arm #423
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
0001-Allow-static-detection-of-NEON-on-non-Android-ARMv7-.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 321b79f10adec70f0e3922869668998f34be4326 Mon Sep 17 00:00:00 2001 | ||
From: Brian Smith <[email protected]> | ||
Date: Tue, 24 Jan 2017 11:54:54 -1000 | ||
Subject: [PATCH] Allow static detection of NEON on non-Android ARMv7 targets. | ||
|
||
This should allow armv7-apple-ios targets to use NEON without any | ||
runtime checks. | ||
--- | ||
include/openssl/cpu.h | 12 ++++++------ | ||
1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/include/openssl/cpu.h b/include/openssl/cpu.h | ||
index 04926e31c237faa0b4de246abdb7284e39ba5cb9..9583b867eba3cec544762cded826aaf2f77d4cd1 100644 | ||
--- a/include/openssl/cpu.h | ||
+++ b/include/openssl/cpu.h | ||
@@ -118,12 +118,12 @@ OPENSSL_EXPORT char GFp_is_NEON_capable_at_runtime(void); | ||
/* GFp_is_NEON_capable returns true if the current CPU has a NEON unit. If | ||
* this is known statically then it returns one immediately. */ | ||
static inline int GFp_is_NEON_capable(void) { | ||
- /* Only statically skip the runtime lookup on aarch64. On arm, one CPU is | ||
- * known to have a broken NEON unit which is known to fail with on some | ||
- * hand-written NEON assembly. For now, continue to apply the workaround even | ||
- * when the compiler is instructed to freely emit NEON code. See | ||
- * https://crbug.com/341598 and https://crbug.com/606629. */ | ||
-#if defined(__ARM_NEON__) && !defined(OPENSSL_ARM) | ||
+ /* On 32-bit ARM, one CPU is known to have a broken NEON unit which is known | ||
+ * to fail with on some hand-written NEON assembly. Assume that non-Android | ||
+ * applications will not use that buggy CPU but still support Android users | ||
+ * that do, even when the compiler is instructed to freely emit NEON code. | ||
+ * See https://crbug.com/341598 and https://crbug.com/606629. */ | ||
+#if defined(__ARM_NEON__) && (!defined(OPENSSL_ARM) || !defined(__ANROID__)) | ||
return 1; | ||
#else | ||
return GFp_is_NEON_capable_at_runtime(); | ||
-- | ||
2.9.3.windows.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the
.global
directive need to have an underscore prefix added too?