@@ -1401,6 +1401,11 @@ then
14011401 AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc32-asm] )
14021402 fi
14031403
1404+ if test "$enable_ppc64_asm" = "no"
1405+ then
1406+ AC_MSG_ERROR ( [ --enable-all-asm is incompatible with --disable-ppc64-asm] )
1407+ fi
1408+
14041409 case "$host_cpu" in
14051410 *x86_64*|*amd64*)
14061411 if test "$enable_intelasm" = ""
@@ -1431,6 +1436,10 @@ then
14311436 fi
14321437 ;;
14331438 *powerpc64*)
1439+ if test "$enable_ppc64_asm" = ""
1440+ then
1441+ enable_ppc64_asm=yes
1442+ fi
14341443 ;;
14351444 *powerpc*)
14361445 if test "$enable_ppc32_asm" = ""
@@ -4001,21 +4010,70 @@ then
40014010 AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM"
40024011 AC_MSG_NOTICE ( [ 32-bit PowerPC assembly for SHA-256] )
40034012 ENABLED_PPC32_ASM=yes
4013+
4014+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
4015+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
4016+ else
4017+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
4018+ fi
4019+ if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
4020+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4021+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4022+ fi
4023+ if test "$ENABLED_PPC32_ASM_SPE" = "yes"; then
4024+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE"
4025+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE"
4026+ fi
40044027fi
4005- if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
4006- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
4007- else
4008- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
4028+
4029+ # PPC64 Assembly
4030+ AC_ARG_ENABLE ( [ ppc64-asm] ,
4031+ [ AS_HELP_STRING ( [ --enable-ppc64-asm] ,[ Enable wolfSSL PowerPC 64-bit ASM support (default: disabled).] ) ] ,
4032+ [ ENABLED_PPC64_ASM=$enableval ] ,
4033+ [ ENABLED_PPC64_ASM=no ]
4034+ )
4035+
4036+
4037+ if test "$ENABLED_PPC64_ASM" != "no" && test "$ENABLED_ASM" = "yes"
4038+ then
4039+ ENABLED_PPC64_ASM_OPTS=$ENABLED_PPC64_ASM
4040+ for v in `echo $ENABLED_PPC64_ASM_OPTS | tr "," " "`
4041+ do
4042+ case $v in
4043+ yes)
4044+ ;;
4045+ inline)
4046+ ENABLED_PPC64_ASM_INLINE=yes
4047+ ;;
4048+ inline-reg)
4049+ ENABLED_PPC64_ASM_INLINE_REG=yes
4050+ ;;
4051+ small)
4052+ ENABLED_PPC64_ASM_SMALL=yes
4053+ ;;
4054+ *)
4055+ AC_MSG_ERROR ( [ Invalid RISC-V option [ yes,inline,small] : $ENABLED_PPC64_ASM.] )
4056+ break
4057+ ;;
4058+ esac
4059+ done
4060+
4061+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM"
4062+ AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
4063+ AC_MSG_NOTICE ( [ 64-bit PowerPC assembly for AES] )
4064+ ENABLED_PPC64_ASM=yes
40094065fi
4010- if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
4011- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4012- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4066+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes" || test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"; then
4067+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_INLINE"
4068+ else
4069+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM"
40134070fi
4014- if test "$ENABLED_PPC32_ASM_SPE " = "yes"; then
4015- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE "
4016- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE "
4071+ if test "$ENABLED_PPC64_ASM_SMALL " = "yes"; then
4072+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
4073+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
40174074fi
40184075
4076+
40194077# Xilinx hardened crypto
40204078AC_ARG_ENABLE ( [ xilinx] ,
40214079 [ AS_HELP_STRING ( [ --enable-xilinx] ,[ Enable wolfSSL support for Xilinx hardened crypto(default: disabled)] ) ] ,
@@ -11344,6 +11402,9 @@ AM_CONDITIONAL([BUILD_RISCV_ASM],[test "x$ENABLED_RISCV_ASM" = "xyes"])
1134411402AM_CONDITIONAL([ BUILD_PPC32_ASM] ,[ test "x$ENABLED_PPC32_ASM" = "xyes"] )
1134511403AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE] ,[ test "x$ENABLED_PPC32_ASM_INLINE" = "xyes"] )
1134611404AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC32_ASM_INLINE_REG" = "xyes"] )
11405+ AM_CONDITIONAL([ BUILD_PPC64_ASM] ,[ test "x$ENABLED_PPC64_ASM" = "xyes"] )
11406+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE] ,[ test "x$ENABLED_PPC64_ASM_INLINE" = "xyes"] )
11407+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC64_ASM_INLINE_REG" = "xyes"] )
1134711408AM_CONDITIONAL([ BUILD_XILINX] ,[ test "x$ENABLED_XILINX" = "xyes"] )
1134811409AM_CONDITIONAL([ BUILD_AESNI] ,[ test "x$ENABLED_AESNI" = "xyes"] )
1134911410AM_CONDITIONAL([ BUILD_INTELASM] ,[ test "x$ENABLED_INTELASM" = "xyes"] )
@@ -12051,6 +12112,15 @@ then
1205112112 ENABLED_PPC32_ASM="inline C Reg"
1205212113fi
1205312114echo " * PPC32 ASM $ENABLED_PPC32_ASM"
12115+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes"
12116+ then
12117+ ENABLED_PPC64_ASM="inline C"
12118+ fi
12119+ if test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"
12120+ then
12121+ ENABLED_PPC64_ASM="inline C Reg"
12122+ fi
12123+ echo " * PPC64 ASM $ENABLED_PPC64_ASM"
1205412124echo " * Write duplicate: $ENABLED_WRITEDUP"
1205512125echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
1205612126echo " * C89: $ENABLED_C89"
0 commit comments