diff options
| -rw-r--r-- | .github/workflows/linux.yml | 2 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | crypto/Makefile.am.elf-mips | 1 | ||||
| -rw-r--r-- | crypto/arch/mips/crypto_arch.h | 18 | ||||
| -rw-r--r-- | crypto/bn/arch/mips/bn_arch.h | 19 | ||||
| -rwxr-xr-x | scripts/test | 9 | ||||
| -rwxr-xr-x | update.sh | 1 |
7 files changed, 44 insertions, 8 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a2a85e7..06dda17 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml | |||
| @@ -68,7 +68,7 @@ jobs: | |||
| 68 | packages+=(qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu) | 68 | packages+=(qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu) |
| 69 | ;; | 69 | ;; |
| 70 | mips32) | 70 | mips32) |
| 71 | packages+=(qemu-user-static binfmt-support g++-mips-linux-gnu) | 71 | packages+=(qemu-user-static binfmt-support g++-mipsel-linux-gnu) |
| 72 | ;; | 72 | ;; |
| 73 | mips64) | 73 | mips64) |
| 74 | packages+=(qemu-user-static binfmt-support g++-mips64el-linux-gnuabi64) | 74 | packages+=(qemu-user-static binfmt-support g++-mips64el-linux-gnuabi64) |
diff --git a/configure.ac b/configure.ac index 12703dd..7c6ac98 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -95,7 +95,7 @@ AS_CASE([$host_cpu], | |||
| 95 | [*amd64*], [host_cpu=x86_64 HOSTARCH=intel], | 95 | [*amd64*], [host_cpu=x86_64 HOSTARCH=intel], |
| 96 | [i?86], [host_cpu=i386 HOSTARCH=intel enable_asm=no], | 96 | [i?86], [host_cpu=i386 HOSTARCH=intel enable_asm=no], |
| 97 | [mips64*], [host_cpu=mips64 enable_asm=${enable_asm-no}], | 97 | [mips64*], [host_cpu=mips64 enable_asm=${enable_asm-no}], |
| 98 | [mips*], [host_cpu=mips enable_asm=no], | 98 | [mips*], [host_cpu=mips enable_asm=${enable_asm-no}], |
| 99 | [powerpc*], [host_cpu=powerpc], | 99 | [powerpc*], [host_cpu=powerpc], |
| 100 | [ppc64*], [host_cpu=powerpc64], | 100 | [ppc64*], [host_cpu=powerpc64], |
| 101 | [x86_64], [HOSTARCH=intel] | 101 | [x86_64], [HOSTARCH=intel] |
diff --git a/crypto/Makefile.am.elf-mips b/crypto/Makefile.am.elf-mips index 2276991..682fb5e 100644 --- a/crypto/Makefile.am.elf-mips +++ b/crypto/Makefile.am.elf-mips | |||
| @@ -2,7 +2,6 @@ ASM_MIPS_ELF = aes/aes-mips.S | |||
| 2 | ASM_MIPS_ELF += bn/bn-mips.S | 2 | ASM_MIPS_ELF += bn/bn-mips.S |
| 3 | ASM_MIPS_ELF += bn/mont-mips.S | 3 | ASM_MIPS_ELF += bn/mont-mips.S |
| 4 | ASM_MIPS_ELF += sha/sha1-mips.S | 4 | ASM_MIPS_ELF += sha/sha1-mips.S |
| 5 | ASM_MIPS_ELF += sha/sha512-mips.S | ||
| 6 | ASM_MIPS_ELF += sha/sha256-mips.S | 5 | ASM_MIPS_ELF += sha/sha256-mips.S |
| 7 | 6 | ||
| 8 | EXTRA_DIST += $(ASM_MIPS_ELF) | 7 | EXTRA_DIST += $(ASM_MIPS_ELF) |
diff --git a/crypto/arch/mips/crypto_arch.h b/crypto/arch/mips/crypto_arch.h index 274879c..2407503 100644 --- a/crypto/arch/mips/crypto_arch.h +++ b/crypto/arch/mips/crypto_arch.h | |||
| @@ -18,4 +18,22 @@ | |||
| 18 | #ifndef HEADER_CRYPTO_ARCH_H | 18 | #ifndef HEADER_CRYPTO_ARCH_H |
| 19 | #define HEADER_CRYPTO_ARCH_H | 19 | #define HEADER_CRYPTO_ARCH_H |
| 20 | 20 | ||
| 21 | #ifndef OPENSSL_NO_ASM | ||
| 22 | |||
| 23 | #ifdef LIBRESSL_USE_AES_ASSEMBLY | ||
| 24 | #define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
| 25 | #define HAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
| 26 | #define HAVE_AES_ENCRYPT_INTERNAL | ||
| 27 | #define HAVE_AES_DECRYPT_INTERNAL | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #ifdef LIBRESSL_USE_SHA_ASSEMBLY | ||
| 31 | #define HAVE_SHA1_BLOCK_DATA_ORDER | ||
| 32 | #define HAVE_SHA1_BLOCK_GENERIC | ||
| 33 | #define HAVE_SHA256_BLOCK_DATA_ORDER | ||
| 34 | #define HAVE_SHA256_BLOCK_GENERIC | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #endif | ||
| 38 | |||
| 21 | #endif | 39 | #endif |
diff --git a/crypto/bn/arch/mips/bn_arch.h b/crypto/bn/arch/mips/bn_arch.h index 4d6571f..a14b83b 100644 --- a/crypto/bn/arch/mips/bn_arch.h +++ b/crypto/bn/arch/mips/bn_arch.h | |||
| @@ -20,5 +20,24 @@ | |||
| 20 | 20 | ||
| 21 | #ifndef OPENSSL_NO_ASM | 21 | #ifndef OPENSSL_NO_ASM |
| 22 | 22 | ||
| 23 | #ifdef LIBRESSL_USE_BN_ASSEMBLY | ||
| 24 | |||
| 25 | #define HAVE_BN_ADD_WORDS | ||
| 26 | |||
| 27 | #define HAVE_BN_DIV_WORDS | ||
| 28 | #define HAVE_BN_DIV_3_WORDS | ||
| 29 | |||
| 30 | #define HAVE_BN_MUL_COMBA4 | ||
| 31 | #define HAVE_BN_MUL_COMBA8 | ||
| 32 | #define HAVE_BN_MULW_ADD_WORDS | ||
| 33 | #define HAVE_BN_MULW_WORDS | ||
| 34 | |||
| 35 | #define HAVE_BN_SQR_COMBA4 | ||
| 36 | #define HAVE_BN_SQR_COMBA8 | ||
| 37 | |||
| 38 | #define HAVE_BN_SUB_WORDS | ||
| 39 | |||
| 40 | #endif | ||
| 41 | |||
| 23 | #endif | 42 | #endif |
| 24 | #endif | 43 | #endif |
diff --git a/scripts/test b/scripts/test index 6d573e3..b3386a8 100755 --- a/scripts/test +++ b/scripts/test | |||
| @@ -173,11 +173,12 @@ elif [ "$ARCH" = "riscv64" ]; then | |||
| 173 | 173 | ||
| 174 | elif [ "$ARCH" = "mips32" ] || [ "$ARCH" = "mips64" ]; then | 174 | elif [ "$ARCH" = "mips32" ] || [ "$ARCH" = "mips64" ]; then |
| 175 | if [ "$ARCH" = "mips32" ]; then | 175 | if [ "$ARCH" = "mips32" ]; then |
| 176 | sudo ln -sf /usr/mips-linux-gnu/lib/ld.so.1 /lib/ | 176 | sudo ln -sf /usr/mipsel-linux-gnu/lib/ld.so.1 /lib/ |
| 177 | setup_cross_compiler mips-linux-gnu | 177 | setup_cross_compiler mipsel-linux-gnu |
| 178 | 178 | ||
| 179 | ./configure --host=mips-linux-gnu | 179 | # MIPS32 assembly is disabled by default, so enable it for CI coverage. |
| 180 | LD_LIBRARY_PATH=/usr/mips-linux-gnu/lib make -j 4 check | 180 | ./configure --host=mipsel-linux-gnu --enable-asm |
| 181 | LD_LIBRARY_PATH=/usr/mipsel-linux-gnu/lib make -j 4 check | ||
| 181 | else | 182 | else |
| 182 | sudo ln -sf /usr/mips64el-linux-gnuabi64/lib64/ld.so.1 /lib64 | 183 | sudo ln -sf /usr/mips64el-linux-gnuabi64/lib64/ld.so.1 /lib64 |
| 183 | setup_cross_compiler mips64el-linux-gnuabi64 | 184 | setup_cross_compiler mips64el-linux-gnuabi64 |
| @@ -248,7 +248,6 @@ gen_asm_mips o32 bn mips bn-mips | |||
| 248 | gen_asm_mips o32 bn mips-mont mont-mips | 248 | gen_asm_mips o32 bn mips-mont mont-mips |
| 249 | gen_asm_mips o32 sha sha1-mips sha1-mips | 249 | gen_asm_mips o32 sha sha1-mips sha1-mips |
| 250 | gen_asm_mips o32 sha sha512-mips sha256-mips | 250 | gen_asm_mips o32 sha sha512-mips sha256-mips |
| 251 | gen_asm_mips o32 sha sha512-mips sha512-mips | ||
| 252 | 251 | ||
| 253 | echo generating mips64 ASM source for elf | 252 | echo generating mips64 ASM source for elf |
| 254 | gen_asm_mips 64 aes aes-mips aes-mips64 | 253 | gen_asm_mips 64 aes aes-mips aes-mips64 |
