@@ -1211,6 +1211,11 @@ then
12111211 AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-armasm] )
12121212 fi
12131213
1214+ if test "$enable_ppc32_asm" = "no"
1215+ then
1216+ AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc32-asm] )
1217+ fi
1218+
12141219 case "$host_cpu" in
12151220 *x86_64*|*amd64*)
12161221 if test "$enable_intelasm" = ""
@@ -1240,6 +1245,14 @@ then
12401245 fi
12411246 fi
12421247 ;;
1248+ *powerpc64*)
1249+ ;;
1250+ *powerpc*)
1251+ if test "$enable_ppc32_asm" = ""
1252+ then
1253+ enable_ppc32_asm=yes
1254+ fi
1255+ ;;
12431256 esac
12441257fi
12451258
@@ -3525,6 +3538,49 @@ do
35253538done
35263539
35273540
3541+ # PPC32 Assembly
3542+ AC_ARG_ENABLE ( [ ppc32-asm] ,
3543+ [ AS_HELP_STRING ( [ --enable-ppc32-asm] ,[ Enable wolfSSL PowerPC 32-bit ASM support (default: disabled).] ) ] ,
3544+ [ ENABLED_PPC32_ASM=$enableval ] ,
3545+ [ ENABLED_PPC32_ASM=no ]
3546+ )
3547+
3548+
3549+ if test "$ENABLED_PPC32_ASM" != "no" && test "$ENABLED_ASM" = "yes"
3550+ then
3551+ ENABLED_PPC32_ASM_OPTS=$ENABLED_PPC32_ASM
3552+ for v in `echo $ENABLED_PPC32_ASM_OPTS | tr "," " "`
3553+ do
3554+ case $v in
3555+ yes)
3556+ ;;
3557+ inline)
3558+ ENABLED_PPC32_ASM_INLINE=yes
3559+ ;;
3560+ small)
3561+ ENABLED_PPC32_ASM_SMALL=yes
3562+ ;;
3563+ *)
3564+ AC_MSG_ERROR ( [ Invalid RISC-V option [ yes,inline,small] : $ENABLED_PPC32_ASM.] )
3565+ break
3566+ ;;
3567+ esac
3568+ done
3569+
3570+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM"
3571+ AC_MSG_NOTICE ( [ 32-bit PowerPC assembly for SHA-256] )
3572+ ENABLED_PPC32_ASM=yes
3573+ fi
3574+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes"; then
3575+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3576+ else
3577+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3578+ fi
3579+ if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3580+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3581+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3582+ fi
3583+
35283584# Xilinx hardened crypto
35293585AC_ARG_ENABLE ( [ xilinx] ,
35303586 [ AS_HELP_STRING ( [ --enable-xilinx] ,[ Enable wolfSSL support for Xilinx hardened crypto(default: disabled)] ) ] ,
@@ -10599,6 +10655,8 @@ AM_CONDITIONAL([BUILD_ARM_NONTHUMB],[test "$ENABLED_ARM_THUMB" != "yes" || test
1059910655AM_CONDITIONAL([ BUILD_ARM_32] ,[ test "$ENABLED_ARM_32" = "yes" || test "$ENABLED_USERSETTINGS" = "yes"] )
1060010656AM_CONDITIONAL([ BUILD_ARM_64] ,[ test "$ENABLED_ARM_64" = "yes" || test "$ENABLED_USERSETTINGS" = "yes"] )
1060110657AM_CONDITIONAL([ BUILD_RISCV_ASM] ,[ test "x$ENABLED_RISCV_ASM" = "xyes"] )
10658+ AM_CONDITIONAL([ BUILD_PPC32_ASM] ,[ test "x$ENABLED_PPC32_ASM" = "xyes"] )
10659+ AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE] ,[ test "x$ENABLED_PPC32_ASM_INLINE" = "xyes"] )
1060210660AM_CONDITIONAL([ BUILD_XILINX] ,[ test "x$ENABLED_XILINX" = "xyes"] )
1060310661AM_CONDITIONAL([ BUILD_AESNI] ,[ test "x$ENABLED_AESNI" = "xyes"] )
1060410662AM_CONDITIONAL([ BUILD_INTELASM] ,[ test "x$ENABLED_INTELASM" = "xyes"] )
@@ -11253,6 +11311,11 @@ echo " * ARM ASM: $ENABLED_ARMASM"
1125311311echo " * ARM ASM SHA512/SHA3 Crypto $ENABLED_ARMASM_SHA3"
1125411312echo " * ARM ASM SM3/SM4 Crypto $ENABLED_ARMASM_CRYPTO_SM4"
1125511313echo " * RISC-V ASM $ENABLED_RISCV_ASM"
11314+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes"
11315+ then
11316+ ENABLED_PPC32_ASM="inline C"
11317+ fi
11318+ echo " * PPC32 ASM $ENABLED_PPC32_ASM"
1125611319echo " * Write duplicate: $ENABLED_WRITEDUP"
1125711320echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
1125811321echo " * C89: $ENABLED_C89"
0 commit comments