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:45:53 +0000 (15:45 +0100)
commitb6769a3865fabc04d0047da8c672981f5afaf787
treeb8fc5778d52dbafa436df518ae404c885a9d3565
parent492f70645ca912d82af02b9bc06e9472bf0730a0
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)

(cherry picked from commit c8f370485c43729db44b680e41e875ddd7f3108c)
crypto/cryptlib.c
crypto/ppc_arch.h
crypto/ppccap.c
crypto/ppccpuid.pl
include/internal/cryptlib.h