@@ -1400,6 +1400,11 @@ then
14001400 AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc32-asm] )
14011401 fi
14021402
1403+ if test "$enable_ppc64_asm" = "no"
1404+ then
1405+ AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc64-asm] )
1406+ fi
1407+
14031408 case "$host_cpu" in
14041409 *x86_64*|*amd64*)
14051410 if test "$enable_intelasm" = ""
@@ -1430,6 +1435,10 @@ then
14301435 fi
14311436 ;;
14321437 *powerpc64*)
1438+ if test "$enable_ppc64_asm" = ""
1439+ then
1440+ enable_ppc64_asm=yes
1441+ fi
14331442 ;;
14341443 *powerpc*)
14351444 if test "$enable_ppc32_asm" = ""
@@ -3909,21 +3918,70 @@ then
39093918 AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM"
39103919 AC_MSG_NOTICE ( [ 32-bit PowerPC assembly for SHA-256] )
39113920 ENABLED_PPC32_ASM=yes
3921+
3922+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
3923+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3924+ else
3925+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3926+ fi
3927+ if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3928+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3929+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3930+ fi
3931+ if test "$ENABLED_PPC32_ASM_SPE" = "yes"; then
3932+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE"
3933+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE"
3934+ fi
39123935fi
3913- if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
3914- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
3915- else
3916- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
3936+
3937+ # PPC64 Assembly
3938+ AC_ARG_ENABLE ( [ ppc64-asm] ,
3939+ [ AS_HELP_STRING ( [ --enable-ppc64-asm] ,[ Enable wolfSSL PowerPC 64-bit ASM support (default: disabled).] ) ] ,
3940+ [ ENABLED_PPC64_ASM=$enableval ] ,
3941+ [ ENABLED_PPC64_ASM=no ]
3942+ )
3943+
3944+
3945+ if test "$ENABLED_PPC64_ASM" != "no" && test "$ENABLED_ASM" = "yes"
3946+ then
3947+ ENABLED_PPC64_ASM_OPTS=$ENABLED_PPC64_ASM
3948+ for v in `echo $ENABLED_PPC64_ASM_OPTS | tr "," " "`
3949+ do
3950+ case $v in
3951+ yes)
3952+ ;;
3953+ inline)
3954+ ENABLED_PPC64_ASM_INLINE=yes
3955+ ;;
3956+ inline-reg)
3957+ ENABLED_PPC64_ASM_INLINE_REG=yes
3958+ ;;
3959+ small)
3960+ ENABLED_PPC64_ASM_SMALL=yes
3961+ ;;
3962+ *)
3963+ AC_MSG_ERROR ( [ Invalid RISC-V option [ yes,inline,small] : $ENABLED_PPC64_ASM.] )
3964+ break
3965+ ;;
3966+ esac
3967+ done
3968+
3969+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM"
3970+ AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
3971+ AC_MSG_NOTICE ( [ 64-bit PowerPC assembly for AES] )
3972+ ENABLED_PPC64_ASM=yes
39173973fi
3918- if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
3919- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3920- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
3974+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes" || test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"; then
3975+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_INLINE"
3976+ else
3977+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM"
39213978fi
3922- if test "$ENABLED_PPC32_ASM_SPE " = "yes"; then
3923- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE "
3924- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE "
3979+ if test "$ENABLED_PPC64_ASM_SMALL " = "yes"; then
3980+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
3981+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
39253982fi
39263983
3984+
39273985# Xilinx hardened crypto
39283986AC_ARG_ENABLE ( [ xilinx] ,
39293987 [ AS_HELP_STRING ( [ --enable-xilinx] ,[ Enable wolfSSL support for Xilinx hardened crypto(default: disabled)] ) ] ,
@@ -11485,6 +11543,9 @@ AM_CONDITIONAL([BUILD_RISCV_ASM],[test "x$ENABLED_RISCV_ASM" = "xyes"])
1148511543AM_CONDITIONAL([ BUILD_PPC32_ASM] ,[ test "x$ENABLED_PPC32_ASM" = "xyes"] )
1148611544AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE] ,[ test "x$ENABLED_PPC32_ASM_INLINE" = "xyes"] )
1148711545AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC32_ASM_INLINE_REG" = "xyes"] )
11546+ AM_CONDITIONAL([ BUILD_PPC64_ASM] ,[ test "x$ENABLED_PPC64_ASM" = "xyes"] )
11547+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE] ,[ test "x$ENABLED_PPC64_ASM_INLINE" = "xyes"] )
11548+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC64_ASM_INLINE_REG" = "xyes"] )
1148811549AM_CONDITIONAL([ BUILD_XILINX] ,[ test "x$ENABLED_XILINX" = "xyes"] )
1148911550AM_CONDITIONAL([ BUILD_AESNI] ,[ test "x$ENABLED_AESNI" = "xyes"] )
1149011551AM_CONDITIONAL([ BUILD_INTELASM] ,[ test "x$ENABLED_INTELASM" = "xyes"] )
@@ -12192,6 +12253,15 @@ then
1219212253 ENABLED_PPC32_ASM="inline C Reg"
1219312254fi
1219412255echo " * PPC32 ASM $ENABLED_PPC32_ASM"
12256+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes"
12257+ then
12258+ ENABLED_PPC64_ASM="inline C"
12259+ fi
12260+ if test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"
12261+ then
12262+ ENABLED_PPC64_ASM="inline C Reg"
12263+ fi
12264+ echo " * PPC64 ASM $ENABLED_PPC64_ASM"
1219512265echo " * Write duplicate: $ENABLED_WRITEDUP"
1219612266echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
1219712267echo " * C89: $ENABLED_C89"
0 commit comments