-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpu.rs: Refactor and Fix ARM/Aarch64 CPU features handling.
Presently on aarch64-apple-* `GFp_armcap_P` is always zero. That's wrong; the assembly language code needs it to be set correctly, or else the most optimized code paths (NEON and/or SHA-2 extensions) will never be chosen. Refactor the code so that `GFp_armcap_P` is set correctly, and to make it easier to understand and maintain. This will enable more optimized implementations on aarch64-apple-* targets, whereas before the lowest common denominator implementations were being used for any features that did the feature detection in assembly language code instead of Rust. Move the definition of `GFp_armcap_P` to Rust so wouldn't have to keep C and Rust code for it in sync. Remove the fallback definitions of `GFp_armcap_P` that use the ".comm"; they would always be set to zero if they were ever used, which wouldn't (necessarily) match the static feature set. Removing them makes it clearer that those definitions aren't used.
- Loading branch information
1 parent
49065e8
commit 0f7a0c0
Showing
7 changed files
with
111 additions
and
90 deletions.
There are no files selected for viewing
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
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