Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl Get new openssl to work on powerpc.
details: https://anonhg.NetBSD.org/src/rev/2f7b94bd1f24
branches: trunk
changeset: 780525:2f7b94bd1f24
user: matt <matt%NetBSD.org@localhost>
date: Fri Jul 27 23:01:23 2012 +0000
description:
Get new openssl to work on powerpc.
diffstat:
crypto/external/bsd/openssl/dist/crypto/ppccap.c | 3 +-
crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl | 6 ++-
crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc | 2 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S | 18 ++++++---
4 files changed, 20 insertions(+), 9 deletions(-)
diffs (92 lines):
diff -r 99465c8038f6 -r 2f7b94bd1f24 crypto/external/bsd/openssl/dist/crypto/ppccap.c
--- a/crypto/external/bsd/openssl/dist/crypto/ppccap.c Fri Jul 27 22:55:29 2012 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/ppccap.c Fri Jul 27 23:01:23 2012 +0000
@@ -74,7 +74,7 @@
sigdelset(&all_masked,SIGBUS);
sigdelset(&all_masked,SIGSEGV);
- if ((e=getenv("OPENSSL_ppccap")))
+ if ((e=getenv("OPENSSL_ppccap")) != NULL)
{
OPENSSL_ppccap_P=strtoul(e,NULL,0);
return;
@@ -106,6 +106,7 @@
if (sigsetjmp(ill_jmp,1) == 0)
{
+ void OPENSSL_altivec_probe();
OPENSSL_altivec_probe();
OPENSSL_ppccap_P |= PPC_ALTIVEC;
}
diff -r 99465c8038f6 -r 2f7b94bd1f24 crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl
--- a/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl Fri Jul 27 22:55:29 2012 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/ppccpuid.pl Fri Jul 27 23:01:23 2012 +0000
@@ -88,8 +88,12 @@
.globl .OPENSSL_rdtsc
.align 4
.OPENSSL_rdtsc:
+Lrdtsc:
+ mftb r5
+ mftbu r4
mftb r3
- mftbu r4
+ cmplw r3,r5
+ bne Lrdtsc
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
diff -r 99465c8038f6 -r 2f7b94bd1f24 crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc Fri Jul 27 22:55:29 2012 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc Fri Jul 27 23:01:23 2012 +0000
@@ -1,3 +1,3 @@
-CPUID_SRCS = ppccap.c
+CPUID_SRCS = ppccap.c ppccpuid.S
CPUID = yes
.include "../../crypto.inc"
diff -r 99465c8038f6 -r 2f7b94bd1f24 crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S Fri Jul 27 22:55:29 2012 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S Fri Jul 27 23:01:23 2012 +0000
@@ -71,8 +71,12 @@
.type OPENSSL_rdtsc,@function
.align 4
OPENSSL_rdtsc:
+.Lrdtsc:
+ mftbu 4
mftb 3
- mftbu 4
+ mftbu 5
+ cmplw 4,5
+ bne- .Lrdtsc
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
@@ -85,12 +89,13 @@
li 0,0
bge .Lot
cmplwi 4,0
- bclr 14,2
-.Little: mtctr 4
+ beqlr-
+.Little:
+ mtctr 4
stb 0,0(3)
addi 3,3,1
- bc 16,0,$-8
- blr
+ bdnz $-8
+ blr
.Lot: andi. 5,3,3
beq .Laligned
stb 0,0(3)
@@ -100,9 +105,10 @@
.Laligned:
srwi 5,4,2
mtctr 5
+.Lstore4:
stw 0,0(3)
addi 3,3,4
- bc 16,0,$-8
+ bdnz .Lstore4
andi. 4,4,3
bne .Little
blr
Home |
Main Index |
Thread Index |
Old Index