summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-12 05:18:25 +0000
committerMike Frysinger <vapier@gentoo.org>2010-09-12 05:18:25 +0000
commitf98d9df5d65033b7bba019ebb689fec216058034 (patch)
treed484b573312ffae2a398beb0cb791114634651ad /dev-libs/openssl/files
parentMarked ppc stable for bug #323777. (diff)
downloadgentoo-2-f98d9df5d65033b7bba019ebb689fec216058034.tar.gz
gentoo-2-f98d9df5d65033b7bba019ebb689fec216058034.tar.bz2
gentoo-2-f98d9df5d65033b7bba019ebb689fec216058034.zip
Fix alpha build issues in new alpha-mont.pl file #330915.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/openssl/files')
-rw-r--r--dev-libs/openssl/files/openssl-1.0.0a-alpha-mont.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/dev-libs/openssl/files/openssl-1.0.0a-alpha-mont.patch b/dev-libs/openssl/files/openssl-1.0.0a-alpha-mont.patch
new file mode 100644
index 000000000000..3beea07557a9
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-1.0.0a-alpha-mont.patch
@@ -0,0 +1,110 @@
+get the new alpha-mont code building with GNU toolchains
+
+https://bugs.gentoo.org/330915
+
+--- a/crypto/bn/asm/alpha-mont.pl
++++ b/crypto/bn/asm/alpha-mont.pl
+@@ -41,8 +41,12 @@ $j="s4";
+ $m1="s5";
+
+ $code=<<___;
++#ifdef __linux__
++#include <asm/regdef.h>
++#else
+ #include <asm.h>
+ #include <regdef.h>
++#endif
+
+ .text
+
+@@ -106,9 +110,9 @@ bn_mul_mont:
+ .align 4
+ .L1st:
+ .set noreorder
+- ldq $aj,($aj)
++ ldq $aj,0($aj)
+ addl $j,1,$j
+- ldq $nj,($nj)
++ ldq $nj,0($nj)
+ lda $tp,8($tp)
+
+ addq $alo,$hi0,$lo0
+@@ -159,12 +163,12 @@ bn_mul_mont:
+ .align 4
+ .Louter:
+ s8addq $i,$bp,$bi
+- ldq $hi0,($ap)
++ ldq $hi0,0($ap)
+ ldq $aj,8($ap)
+- ldq $bi,($bi)
+- ldq $hi1,($np)
++ ldq $bi,0($bi)
++ ldq $hi1,0($np)
+ ldq $nj,8($np)
+- ldq $tj,(sp)
++ ldq $tj,0(sp)
+
+ mulq $hi0,$bi,$lo0
+ umulh $hi0,$bi,$hi0
+@@ -195,10 +199,10 @@ bn_mul_mont:
+ .set noreorder
+ ldq $tj,8($tp) #L0
+ nop #U1
+- ldq $aj,($aj) #L1
++ ldq $aj,0($aj) #L1
+ s8addq $j,$np,$nj #U0
+
+- ldq $nj,($nj) #L0
++ ldq $nj,0($nj) #L0
+ nop #U1
+ addq $alo,$hi0,$lo0 #L1
+ lda $tp,8($tp)
+@@ -247,7 +251,7 @@ bn_mul_mont:
+ addq $hi1,v0,$hi1
+
+ addq $hi1,$hi0,$lo1
+- stq $j,($tp)
++ stq $j,0($tp)
+ cmpult $lo1,$hi0,$hi1
+ addq $lo1,$tj,$lo1
+ cmpult $lo1,$tj,AT
+@@ -265,8 +269,8 @@ bn_mul_mont:
+ mov 0,$hi0 # clear borrow bit
+
+ .align 4
+-.Lsub: ldq $lo0,($tp)
+- ldq $lo1,($np)
++.Lsub: ldq $lo0,0($tp)
++ ldq $lo1,0($np)
+ lda $tp,8($tp)
+ lda $np,8($np)
+ subq $lo0,$lo1,$lo1 # tp[i]-np[i]
+@@ -274,7 +278,7 @@ bn_mul_mont:
+ subq $lo1,$hi0,$lo0
+ cmpult $lo1,$lo0,$hi0
+ or $hi0,AT,$hi0
+- stq $lo0,($rp)
++ stq $lo0,0($rp)
+ cmpult $tp,$tj,v0
+ lda $rp,8($rp)
+ bne v0,.Lsub
+@@ -288,7 +292,7 @@ bn_mul_mont:
+ bis $bp,$ap,$ap # ap=borrow?tp:rp
+
+ .align 4
+-.Lcopy: ldq $aj,($ap) # copy or in-place refresh
++.Lcopy: ldq $aj,0($ap) # copy or in-place refresh
+ lda $tp,8($tp)
+ lda $rp,8($rp)
+ lda $ap,8($ap)
+@@ -309,8 +313,10 @@ bn_mul_mont:
+ lda sp,48(sp)
+ ret (ra)
+ .end bn_mul_mont
++#if 0
+ .rdata
+ .asciiz "Montgomery Multiplication for Alpha, CRYPTOGAMS by <appro\@openssl.org>"
++#endif
+ ___
+
+ print $code;