Browse Source

crpyto/ppccpuid.pl: add FPU probe and fix OPENSSL_rdtsc.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
master
Andy Polyakov 7 years ago
parent
commit
81eae077ce
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      crypto/ppccpuid.pl

+ 19
- 0
crypto/ppccpuid.pl View File

@ -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


Loading…
Cancel
Save