diff options
author | Andy Polyakov <appro@openssl.org> | 2015-11-14 00:16:37 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2015-12-14 16:09:25 +0100 |
commit | 81eae077ce679c1d7d29e19991bf055e4888a2fc (patch) | |
tree | e3965c502b9abc8cf3634f2cfd5be5db8c1c2b20 /crypto/ppccpuid.pl | |
parent | 2688d99989902dea884632a8658f3abad0c26d16 (diff) | |
download | openssl-81eae077ce679c1d7d29e19991bf055e4888a2fc.tar.gz |
crpyto/ppccpuid.pl: add FPU probe and fix OPENSSL_rdtsc.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/ppccpuid.pl')
-rwxr-xr-x | crypto/ppccpuid.pl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/ppccpuid.pl b/crypto/ppccpuid.pl index 56cc851c1d..4c2530d147 100755 --- a/crypto/ppccpuid.pl +++ b/crypto/ppccpuid.pl @@ -23,6 +23,14 @@ $code=<<___; .machine "any" .text +.globl .OPENSSL_fpu_probe +.align 4 +.OPENSSL_fpu_probe: + fmr f0,f0 + blr + .long 0 + .byte 0,12,0x14,0,0,0,0,0 +.size .OPENSSL_fpu_probe,.-.OPENSSL_fpu_probe .globl .OPENSSL_ppc64_probe .align 4 .OPENSSL_ppc64_probe: @@ -102,8 +110,19 @@ Ladd: lwarx r5,0,r3 .globl .OPENSSL_rdtsc .align 4 .OPENSSL_rdtsc: +___ +$code.=<<___ if ($flavour =~ /64/); + mftb r3 +___ +$code.=<<___ if ($flavour !~ /64/); +Loop_rdtsc: + mftbu r5 mftb r3 mftbu r4 + cmplw r4,r5 + bne Loop_rdtsc +___ +$code.=<<___; blr .long 0 .byte 0,12,0x14,0,0,0,0,0 |