@@ -1393,6 +1393,11 @@ then
13931393 AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc32-asm] )
13941394 fi
13951395
1396+ if test "$enable_ppc64_asm" = "no"
1397+ then
1398+ AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc64-asm] )
1399+ fi
1400+
13961401 case "$host_cpu" in
13971402 *x86_64*|*amd64*)
13981403 if test "$enable_intelasm" = ""
@@ -1423,6 +1428,10 @@ then
14231428 fi
14241429 ;;
14251430 *powerpc64*)
1431+ if test "$enable_ppc64_asm" = ""
1432+ then
1433+ enable_ppc64_asm=yes
1434+ fi
14261435 ;;
14271436 *powerpc*)
14281437 if test "$enable_ppc32_asm" = ""
@@ -3881,21 +3890,70 @@ then
38813890 AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM"
38823891 AC_MSG_NOTICE ( [ 32-bit PowerPC assembly for SHA-256] )
38833892 ENABLED_PPC32_ASM=yes
3893+
3894+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
3895+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3896+ else
3897+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3898+ fi
3899+ if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3900+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3901+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3902+ fi
3903+ if test "$ENABLED_PPC32_ASM_SPE" = "yes"; then
3904+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE"
3905+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE"
3906+ fi
38843907fi
3885- if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
3886- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3887- else
3888- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3908+
3909+ # PPC64 Assembly
3910+ AC_ARG_ENABLE ( [ ppc64-asm] ,
3911+ [ AS_HELP_STRING ( [ --enable-ppc64-asm] ,[ Enable wolfSSL PowerPC 64-bit ASM support (default: disabled).] ) ] ,
3912+ [ ENABLED_PPC64_ASM=$enableval ] ,
3913+ [ ENABLED_PPC64_ASM=no ]
3914+ )
3915+
3916+
3917+ if test "$ENABLED_PPC64_ASM" != "no" && test "$ENABLED_ASM" = "yes"
3918+ then
3919+ ENABLED_PPC64_ASM_OPTS=$ENABLED_PPC64_ASM
3920+ for v in `echo $ENABLED_PPC64_ASM_OPTS | tr "," " "`
3921+ do
3922+ case $v in
3923+ yes)
3924+ ;;
3925+ inline)
3926+ ENABLED_PPC64_ASM_INLINE=yes
3927+ ;;
3928+ inline-reg)
3929+ ENABLED_PPC64_ASM_INLINE_REG=yes
3930+ ;;
3931+ small)
3932+ ENABLED_PPC64_ASM_SMALL=yes
3933+ ;;
3934+ *)
3935+ AC_MSG_ERROR ( [ Invalid RISC-V option [ yes,inline,small] : $ENABLED_PPC64_ASM.] )
3936+ break
3937+ ;;
3938+ esac
3939+ done
3940+
3941+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM"
3942+ AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
3943+ AC_MSG_NOTICE ( [ 64-bit PowerPC assembly for AES] )
3944+ ENABLED_PPC64_ASM=yes
38893945fi
3890- if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3891- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3892- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3946+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes" || test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"; then
3947+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_INLINE"
3948+ else
3949+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM"
38933950fi
3894- if test "$ENABLED_PPC32_ASM_SPE " = "yes"; then
3895- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE "
3896- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE "
3951+ if test "$ENABLED_PPC64_ASM_SMALL " = "yes"; then
3952+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
3953+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
38973954fi
38983955
3956+
38993957# Xilinx hardened crypto
39003958AC_ARG_ENABLE ( [ xilinx] ,
39013959 [ AS_HELP_STRING ( [ --enable-xilinx] ,[ Enable wolfSSL support for Xilinx hardened crypto(default: disabled)] ) ] ,
@@ -11202,6 +11260,9 @@ AM_CONDITIONAL([BUILD_RISCV_ASM],[test "x$ENABLED_RISCV_ASM" = "xyes"])
1120211260AM_CONDITIONAL([ BUILD_PPC32_ASM] ,[ test "x$ENABLED_PPC32_ASM" = "xyes"] )
1120311261AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE] ,[ test "x$ENABLED_PPC32_ASM_INLINE" = "xyes"] )
1120411262AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC32_ASM_INLINE_REG" = "xyes"] )
11263+ AM_CONDITIONAL([ BUILD_PPC64_ASM] ,[ test "x$ENABLED_PPC64_ASM" = "xyes"] )
11264+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE] ,[ test "x$ENABLED_PPC64_ASM_INLINE" = "xyes"] )
11265+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC64_ASM_INLINE_REG" = "xyes"] )
1120511266AM_CONDITIONAL([ BUILD_XILINX] ,[ test "x$ENABLED_XILINX" = "xyes"] )
1120611267AM_CONDITIONAL([ BUILD_AESNI] ,[ test "x$ENABLED_AESNI" = "xyes"] )
1120711268AM_CONDITIONAL([ BUILD_INTELASM] ,[ test "x$ENABLED_INTELASM" = "xyes"] )
@@ -11905,6 +11966,15 @@ then
1190511966 ENABLED_PPC32_ASM="inline C Reg"
1190611967fi
1190711968echo " * PPC32 ASM $ENABLED_PPC32_ASM"
11969+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes"
11970+ then
11971+ ENABLED_PPC64_ASM="inline C"
11972+ fi
11973+ if test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"
11974+ then
11975+ ENABLED_PPC64_ASM="inline C Reg"
11976+ fi
11977+ echo " * PPC64 ASM $ENABLED_PPC64_ASM"
1190811978echo " * Write duplicate: $ENABLED_WRITEDUP"
1190911979echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
1191011980echo " * C89: $ENABLED_C89"
0 commit comments