Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1613238 - POWER SHA-2 digest vector acceleration. r=jcj,kjacobs
Differential Revision: https://phabricator.services.mozilla.com/D70519 --HG-- extra : moz-landing-system : lando
- Loading branch information
Showing
11 changed files
with
1,940 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef PPC_CRYPTO_H | ||
#define PPC_CRYPTO_H 1 | ||
|
||
#if defined(__powerpc64__) && !defined(NSS_DISABLE_ALTIVEC) | ||
#include "altivec-types.h" | ||
|
||
/* The ghash freebl test tries to use this in C++, and gcc defines conflict. */ | ||
#ifdef __cplusplus | ||
#undef pixel | ||
#undef vector | ||
#undef bool | ||
#endif | ||
|
||
/* | ||
* PPC CRYPTO requires at least gcc 8 or clang. The LE check is purely | ||
* because it's only been tested on LE. If you're interested in BE, | ||
* please send a patch. | ||
*/ | ||
#if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 8)) && \ | ||
defined(IS_LITTLE_ENDIAN) | ||
#define USE_PPC_CRYPTO | ||
#endif | ||
|
||
#endif /* defined(__powerpc64__) && !defined(NSS_DISABLE_ALTIVEC) */ | ||
|
||
#endif |
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,36 @@ | ||
Copyright (c) 2006, CRYPTOGAMS by <appro@openssl.org> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
|
||
* Redistributions of source code must retain copyright notices, | ||
this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials | ||
provided with the distribution. | ||
|
||
* Neither the name of the CRYPTOGAMS nor the names of its | ||
copyright holder and contributors may be used to endorse or | ||
promote products derived from this software without specific | ||
prior written permission. | ||
|
||
ALTERNATIVELY, provided that this notice is retained in full, this | ||
product may be distributed under the terms of the GNU General Public | ||
License (GPL), in which case the provisions of the GPL apply INSTEAD OF | ||
those given above. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,19 @@ | ||
#!/bin/sh | ||
# | ||
# Run the scripts in this folder, generating the assembly, | ||
# | ||
|
||
perl sha512p8-ppc.pl linux64le sha512-p8.s | ||
|
||
# Add the license mention | ||
cat > hdr << "EOF" | ||
# Copyright (c) 2006, CRYPTOGAMS by <appro@openssl.org> | ||
# All rights reserved. | ||
# See the full LICENSE under scripts/. | ||
EOF | ||
|
||
cat hdr sha512-p8.s > ../sha512-p8.s | ||
|
||
# Cleanup | ||
rm hdr sha512-p8.s |
Oops, something went wrong.