@@ -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" = ""
@@ -3998,21 +4007,70 @@ then
39984007 AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM"
39994008 AC_MSG_NOTICE ( [ 32-bit PowerPC assembly for SHA-256] )
40004009 ENABLED_PPC32_ASM=yes
4010+
4011+ if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
4012+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
4013+ else
4014+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
4015+ fi
4016+ if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
4017+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4018+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4019+ fi
4020+ if test "$ENABLED_PPC32_ASM_SPE" = "yes"; then
4021+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE"
4022+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE"
4023+ fi
40014024fi
4002- if test "$ENABLED_PPC32_ASM_INLINE" = "yes" || test "$ENABLED_PPC32_ASM_INLINE_REG" = "yes"; then
4003- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_INLINE"
4004- else
4005- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM"
4025+
4026+ # PPC64 Assembly
4027+ AC_ARG_ENABLE ( [ ppc64-asm] ,
4028+ [ AS_HELP_STRING ( [ --enable-ppc64-asm] ,[ Enable wolfSSL PowerPC 64-bit ASM support (default: disabled).] ) ] ,
4029+ [ ENABLED_PPC64_ASM=$enableval ] ,
4030+ [ ENABLED_PPC64_ASM=no ]
4031+ )
4032+
4033+
4034+ if test "$ENABLED_PPC64_ASM" != "no" && test "$ENABLED_ASM" = "yes"
4035+ then
4036+ ENABLED_PPC64_ASM_OPTS=$ENABLED_PPC64_ASM
4037+ for v in `echo $ENABLED_PPC64_ASM_OPTS | tr "," " "`
4038+ do
4039+ case $v in
4040+ yes)
4041+ ;;
4042+ inline)
4043+ ENABLED_PPC64_ASM_INLINE=yes
4044+ ;;
4045+ inline-reg)
4046+ ENABLED_PPC64_ASM_INLINE_REG=yes
4047+ ;;
4048+ small)
4049+ ENABLED_PPC64_ASM_SMALL=yes
4050+ ;;
4051+ *)
4052+ AC_MSG_ERROR ( [ Invalid RISC-V option [ yes,inline,small] : $ENABLED_PPC64_ASM.] )
4053+ break
4054+ ;;
4055+ esac
4056+ done
4057+
4058+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM"
4059+ AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
4060+ AC_MSG_NOTICE ( [ 64-bit PowerPC assembly for AES] )
4061+ ENABLED_PPC64_ASM=yes
40064062fi
4007- if test "$ENABLED_PPC32_ASM_SMALL" = "yes"; then
4008- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4009- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SMALL"
4063+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes" || test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"; then
4064+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_INLINE"
4065+ else
4066+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM"
40104067fi
4011- if test "$ENABLED_PPC32_ASM_SPE " = "yes"; then
4012- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC32_ASM_SPE "
4013- AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC32_ASM_SPE "
4068+ if test "$ENABLED_PPC64_ASM_SMALL " = "yes"; then
4069+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
4070+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_PPC64_ASM_SMALL "
40144071fi
40154072
4073+
40164074# Xilinx hardened crypto
40174075AC_ARG_ENABLE ( [ xilinx] ,
40184076 [ AS_HELP_STRING ( [ --enable-xilinx] ,[ Enable wolfSSL support for Xilinx hardened crypto(default: disabled)] ) ] ,
@@ -11341,6 +11399,9 @@ AM_CONDITIONAL([BUILD_RISCV_ASM],[test "x$ENABLED_RISCV_ASM" = "xyes"])
1134111399AM_CONDITIONAL([ BUILD_PPC32_ASM] ,[ test "x$ENABLED_PPC32_ASM" = "xyes"] )
1134211400AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE] ,[ test "x$ENABLED_PPC32_ASM_INLINE" = "xyes"] )
1134311401AM_CONDITIONAL([ BUILD_PPC32_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC32_ASM_INLINE_REG" = "xyes"] )
11402+ AM_CONDITIONAL([ BUILD_PPC64_ASM] ,[ test "x$ENABLED_PPC64_ASM" = "xyes"] )
11403+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE] ,[ test "x$ENABLED_PPC64_ASM_INLINE" = "xyes"] )
11404+ AM_CONDITIONAL([ BUILD_PPC64_ASM_INLINE_REG] ,[ test "x$ENABLED_PPC64_ASM_INLINE_REG" = "xyes"] )
1134411405AM_CONDITIONAL([ BUILD_XILINX] ,[ test "x$ENABLED_XILINX" = "xyes"] )
1134511406AM_CONDITIONAL([ BUILD_AESNI] ,[ test "x$ENABLED_AESNI" = "xyes"] )
1134611407AM_CONDITIONAL([ BUILD_INTELASM] ,[ test "x$ENABLED_INTELASM" = "xyes"] )
@@ -12048,6 +12109,15 @@ then
1204812109 ENABLED_PPC32_ASM="inline C Reg"
1204912110fi
1205012111echo " * PPC32 ASM $ENABLED_PPC32_ASM"
12112+ if test "$ENABLED_PPC64_ASM_INLINE" = "yes"
12113+ then
12114+ ENABLED_PPC64_ASM="inline C"
12115+ fi
12116+ if test "$ENABLED_PPC64_ASM_INLINE_REG" = "yes"
12117+ then
12118+ ENABLED_PPC64_ASM="inline C Reg"
12119+ fi
12120+ echo " * PPC64 ASM $ENABLED_PPC64_ASM"
1205112121echo " * Write duplicate: $ENABLED_WRITEDUP"
1205212122echo " * Xilinx Hardware Acc.: $ENABLED_XILINX"
1205312123echo " * C89: $ENABLED_C89"
0 commit comments