CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:53 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: mips.pl

Log Message:
Revert to the upstream version, there are no more warnings


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.7 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.7	Sat Mar 21 20:53:03 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl	Sun Jun 21 18:16:53 2020
@@ -486,9 +486,8 @@ $code.=<<___;
 	$ST	$ta3,-2*$BNSZ($a0)
 
 	.set	noreorder
-	$ST	$ta2,-$BNSZ($a0)
 	bgtz	$ta0,.L_bn_sqr_words_loop
-	nop
+	$ST	$ta2,-$BNSZ($a0)
 
 	beqz	$a2,.L_bn_sqr_words_return
 	nop
@@ -817,9 +816,8 @@ bn_div_3_words:
 
 	$LD	$a0,($a3)
 	move	$ta2,$a1
-	$LD	$a1,-$BNSZ($a3)
 	bne	$a0,$a2,bn_div_3_words_internal
-	 nop
+	 $LD	$a1,-$BNSZ($a3)
 	li	$v0,-1
 	jr	$ra
 	move	$a0,$v0



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2018-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  6 18:32:37 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: mips.pl

Log Message:
For mips64:

Avoid branch delay spot warnings: Warning: macro instruction expanded into
multiple instructions in a branch delay slot


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.1.1.6 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.1.1.6	Thu Feb  8 15:56:49 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl	Tue Mar  6 13:32:37 2018
@@ -470,8 +470,9 @@ $code.=<<___;
 	$ST	$ta3,-2*$BNSZ($a0)
 
 	.set	noreorder
-	bgtz	$ta0,.L_bn_sqr_words_loop
 	$ST	$ta2,-$BNSZ($a0)
+	bgtz	$ta0,.L_bn_sqr_words_loop
+	nop
 
 	beqz	$a2,.L_bn_sqr_words_return
 	nop
@@ -795,8 +796,9 @@ bn_div_3_words:
 
 	$LD	$a0,($a3)
 	move	$ta2,$a1
-	bne	$a0,$a2,bn_div_3_words_internal
 	$LD	$a1,-$BNSZ($a3)
+	bne	$a0,$a2,bn_div_3_words_internal
+	 nop
 	li	$v0,-1
 	jr	$ra
 	move	$a0,$v0



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn

2018-02-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 13 22:29:14 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_rand.c

Log Message:
Add a (void *) cast to make things compile with our own sha2 header


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c:1.1.1.5 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c:1.1.1.5	Thu Feb  8 15:56:49 2018
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c	Tue Feb 13 17:29:14 2018
@@ -232,7 +232,7 @@ int BN_generate_dsa_nonce(BIGNUM *out, c
 if (RAND_bytes(random_bytes, sizeof(random_bytes)) != 1)
 goto err;
 SHA512_Init();
-SHA512_Update(, , sizeof(done));
+SHA512_Update(, (void *), sizeof(done));
 SHA512_Update(, private_bytes, sizeof(private_bytes));
 SHA512_Update(, message, message_len);
 SHA512_Update(, random_bytes, sizeof(random_bytes));



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2017-01-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan  9 17:36:24 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: x86_64-gf2m.pl

Log Message:
Revert last two revisions; local changes should no longer be needed
now that the root cause of PR lib/51569 is fixed by revision 1.11 of
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.6 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.6	Sun Jan  8 21:36:04 2017
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl	Mon Jan  9 17:36:24 2017
@@ -167,9 +167,8 @@ $code.=<<___;
 .type	bn_GF2m_mul_2x2,\@abi-omnipotent
 .align	16
 bn_GF2m_mul_2x2:
-	mov	OPENSSL_ia32cap_P+4(%rip),%eax
-	bt	\$1,%eax	 # check PCLMULQDQ bit
-
+	mov	OPENSSL_ia32cap_P(%rip),%rax
+	bt	\$33,%rax
 	jnc	.Lvanilla_mul_2x2
 
 	movq		$a1,%xmm0



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2017-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 21:36:05 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: x86_64-gf2m.pl

Log Message:
Switch to eax


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.5 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.6
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.5	Sat Jan  7 20:55:49 2017
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl	Sun Jan  8 16:36:04 2017
@@ -167,8 +167,8 @@ $code.=<<___;
 .type	bn_GF2m_mul_2x2,\@abi-omnipotent
 .align	16
 bn_GF2m_mul_2x2:
-	mov	OPENSSL_ia32cap_P+4(%rip),%rax
-	bt	\$1,%rax	 # check PCLMULQDQ bit
+	mov	OPENSSL_ia32cap_P+4(%rip),%eax
+	bt	\$1,%eax	 # check PCLMULQDQ bit
 
 	jnc	.Lvanilla_mul_2x2
 



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2017-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan  8 01:55:49 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: x86_64-gf2m.pl

Log Message:
PR/51569: Andreas Gustafsson: Check the right bit for pclmulqdq:
Perform a Carry-Less Multiplication of Quadword instruction
(accelerator for GCM)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.4 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.5
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.4	Fri Oct 14 12:23:18 2016
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl	Sat Jan  7 20:55:49 2017
@@ -167,8 +167,9 @@ $code.=<<___;
 .type	bn_GF2m_mul_2x2,\@abi-omnipotent
 .align	16
 bn_GF2m_mul_2x2:
-	mov	OPENSSL_ia32cap_P(%rip),%rax
-	bt	\$33,%rax
+	mov	OPENSSL_ia32cap_P+4(%rip),%rax
+	bt	\$1,%rax	 # check PCLMULQDQ bit
+
 	jnc	.Lvanilla_mul_2x2
 
 	movq		$a1,%xmm0



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn

2012-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 30 17:15:45 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_exp.c

Log Message:
only use alloca if not __SSP__


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c:1.3 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c:1.4
--- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c:1.3	Thu Jul 26 15:58:37 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c	Mon Jul 30 13:15:45 2012
@@ -120,8 +120,10 @@
 #  define alloca _alloca
 # endif
 #elif defined(__GNUC__)
-# ifndef alloca
-#  define alloca(s) __builtin_alloca((s))
+# ifndef __SSP__
+#  ifndef alloca
+#   define alloca(s) __builtin_alloca((s))
+#  endif
 # endif
 #endif
 



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn

2012-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 30 17:16:23 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_exp.c

Log Message:
make sure alloca is undefed on SSP


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c:1.4 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c:1.5
--- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c:1.4	Mon Jul 30 13:15:45 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_exp.c	Mon Jul 30 13:16:23 2012
@@ -124,6 +124,8 @@
 #  ifndef alloca
 #   define alloca(s) __builtin_alloca((s))
 #  endif
+# else
+#   undef alloca
 # endif
 #endif
 



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn

2012-07-30 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jul 30 18:40:36 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: bn_lcl.h

Log Message:
Fix mips asm to not use outdated stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lcl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lcl.h
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lcl.h:1.1.1.2 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lcl.h:1.2
--- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lcl.h:1.1.1.2	Thu Jul 26 15:00:11 2012
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lcl.h	Mon Jul 30 18:40:36 2012
@@ -284,14 +284,17 @@ extern C {
 #  if defined(__GNUC__)  __GNUC__=2
 #   define BN_UMULT_HIGH(a,b)	({	\
 	register BN_ULONG ret;		\
-	asm (dmultu	%1,%2		\
-	 : =h(ret)		\
-	 : r(a), r(b) : l);	\
+	asm (dmultu	%1,%2	\n\t	\
+	 mfhi %0		\n\t	\
+	 : =r(ret)		\
+	 : r(a), r(b) : lo, hi);	\
 	ret;			})
 #   define BN_UMULT_LOHI(low,high,a,b)	\
-	asm (dmultu	%2,%3		\
-	 : =l(low),=h(high)	\
-	 : r(a), r(b));
+	asm (dmultu	%2,%3	\n\t	\
+	 mflo	%0	\n\t	\
+	 mfhi	%1	\n\t	\
+	 : =r(low),=r(high)	\
+	 : r(a), r(b) : lo, hi);
 #  endif
 # endif		/* cpu */
 #endif		/* OPENSSL_NO_ASM */



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn

2011-05-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun May 15 23:43:56 UTC 2011

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn: divtest.c

Log Message:
no more implicit types in c99


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c:1.2 src/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c:1.3
--- src/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c:1.2	Sun Jul 19 19:30:38 2009
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/divtest.c	Sun May 15 19:43:56 2011
@@ -1,7 +1,7 @@
 #include openssl/bn.h
 #include openssl/rand.h
 
-static int Rand(n)
+static int Rand(void)
 {
 unsigned char x[2];
 RAND_pseudo_bytes(x,2);
@@ -19,6 +19,7 @@
 exit(1);
 }
 
+int
 main(int argc, char *argv[])
 {
 BIGNUM *a=BN_new(), *b=BN_new(), *c=BN_new(), *d=BN_new(),