@@ -1370,6 +1370,11 @@ then
13701370 AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc32-asm] )
13711371 fi
13721372
1373+ if test "$enable_ppc64_asm" = "no"
1374+ then
1375+ AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc64-asm] )
1376+ fi
1377+
13731378 case "$host_cpu" in
13741379 *x86_64*|*amd64*)
13751380 if test "$enable_intelasm" = ""
@@ -1400,6 +1405,10 @@ then
14001405 fi
14011406 ;;
14021407 *powerpc64*)
1408+ if test "$enable_ppc64_asm" = ""
1409+ then
1410+ enable_ppc64_asm=yes
1411+ fi
14031412 ;;
14041413 *powerpc*)
14051414 if test "$enable_ppc32_asm" = ""
@@ -3818,21 +3827,70 @@ then
38183827 AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM"
38193828 AC_MSG_NOTICE ( [ 32-bit PowerPC assembly for SHA-256] )
38203829 ENABLED_PPC32_ASM=yes
3830+
3831+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
3832+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3833+ else
3834+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3835+ fi
3836+ if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3837+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3838+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3839+ fi
3840+ if test "$ENABLED_PPC32_ASM_SPE" = "yes"; then
3841+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE"
3842+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE"
3843+ fi
38213844fi
3822- if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
3823- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3824- else
3825- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3845+
3846+ # PPC64 Assembly
3847+ AC_ARG_ENABLE ( [ ppc64-asm] ,
3848+ [ AS_HELP_STRING ( [ --enable-ppc64-asm] ,[ Enable wolfSSL PowerPC 64-bit ASM support (default: disabled).] ) ] ,
3849+ [ ENABLED_PPC64_ASM=$enableval ] ,
3850+ [ ENABLED_PPC64_ASM=no ]
3851+ )
3852+
3853+
3854+ if test "$ENABLED_PPC64_ASM" != "no" && test "$ENABLED_ASM" = "yes"
3855+ then
3856+ ENABLED_PPC64_ASM_OPTS=$ENABLED_PPC64_ASM
3857+ for v in `echo $ENABLED_PPC64_ASM_OPTS | tr "," " "`
3858+ do
3859+ case $v in
3860+ yes)
3861+ ;;
3862+ inline)
3863+ ENABLED_PPC64_ASM_INLINE=yes
3864+ ;;
3865+ inline-reg)
3866+ ENABLED_PPC64_ASM_INLINE_REG=yes
3867+ ;;
3868+ small)
3869+ ENABLED_PPC64_ASM_SMALL=yes
3870+ ;;
3871+ *)
3872+ AC_MSG_ERROR ( [ Invalid RISC-V option [ yes,inline,small] : $ENABLED_PPC64_ASM.] )
3873+ break
3874+ ;;
3875+ esac
3876+ done
3877+
3878+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM"
3879+ AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
3880+ AC_MSG_NOTICE ( [ 64-bit PowerPC assembly for AES] )
3881+ ENABLED_PPC64_ASM=yes
38263882fi
3827- if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3828- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3829- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3883+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes" || test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"; then
3884+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_INLINE"
3885+ else
3886+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM"
38303887fi
3831- if test "$ENABLED_PPC32_ASM_SPE " = "yes"; then
3832- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE "
3833- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE "
3888+ if test "$ENABLED_PPC64_ASM_SMALL " = "yes"; then
3889+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
3890+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
38343891fi
38353892
3893+
38363894# Xilinx hardened crypto
38373895AC_ARG_ENABLE ( [ xilinx] ,
38383896 [ AS_HELP_STRING ( [ --enable-xilinx] ,[ Enable wolfSSL support for Xilinx hardened crypto(default: disabled)] ) ] ,
@@ -11132,6 +11190,9 @@ AM_CONDITIONAL([BUILD_RISCV_ASM],[test "x$ENABLED_RISCV_ASM" = "xyes"])
1113211190AM_CONDITIONAL([ BUILD_PPC32_ASM] ,[ test "x$ENABLED_PPC32_ASM" = "xyes"] )
1113311191AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE] ,[ test "x$ENABLED_PPC32_ASM_INLINE" = "xyes"] )
1113411192AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC32_ASM_INLINE_REG" = "xyes"] )
11193+ AM_CONDITIONAL([ BUILD_PPC64_ASM] ,[ test "x$ENABLED_PPC64_ASM" = "xyes"] )
11194+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE] ,[ test "x$ENABLED_PPC64_ASM_INLINE" = "xyes"] )
11195+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC64_ASM_INLINE_REG" = "xyes"] )
1113511196AM_CONDITIONAL([ BUILD_XILINX] ,[ test "x$ENABLED_XILINX" = "xyes"] )
1113611197AM_CONDITIONAL([ BUILD_AESNI] ,[ test "x$ENABLED_AESNI" = "xyes"] )
1113711198AM_CONDITIONAL([ BUILD_INTELASM] ,[ test "x$ENABLED_INTELASM" = "xyes"] )
@@ -11835,6 +11896,15 @@ then
1183511896 ENABLED_PPC32_ASM="inline C Reg"
1183611897fi
1183711898echo " * PPC32 ASM $ENABLED_PPC32_ASM"
11899+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes"
11900+ then
11901+ ENABLED_PPC64_ASM="inline C"
11902+ fi
11903+ if test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"
11904+ then
11905+ ENABLED_PPC64_ASM="inline C Reg"
11906+ fi
11907+ echo " * PPC64 ASM $ENABLED_PPC64_ASM"
1183811908echo " * Write duplicate: $ENABLED_WRITEDUP"
1183911909echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
1184011910echo " * C89: $ENABLED_C89"
0 commit comments