PPC: Try out if mftb works before using it
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 17 Jan 2019 14:15:57 +0000 (15:15 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 21 Jan 2019 14:42:04 +0000 (15:42 +0100)
commitc8f370485c43729db44b680e41e875ddd7f3108c
tree9ebee84bc6e1cb074273a68000f41f6ee100f887
parent11642f35531e6afc5d6c4135c5e2ea6057e0e39a
PPC: Try out if mftb works before using it

If this fails try out if mfspr268 works.

Use OPENSSL_ppccap=0x20 for enabling mftb,
OPENSSL_ppccap=0x40 for enabling mfspr268,
and OPENSSL_ppccap=0 for enabling neither.

Fixes #8012

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8043)
crypto/cryptlib.c
crypto/ppc_arch.h
crypto/ppccap.c
crypto/ppccpuid.pl
include/internal/cryptlib.h