summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn
diff options
context:
space:
mode:
authorjsg <>2014-10-28 07:35:59 +0000
committerjsg <>2014-10-28 07:35:59 +0000
commit0505bd63c15c82aead21cde52afbf6c41421d140 (patch)
treed82fff0ac0ba35d28951ab9d9e5225251c23ecda /src/lib/libcrypto/bn
parent794dcf073b734d649d7b5d30916d7a3ae919b66e (diff)
downloadopenbsd-0505bd63c15c82aead21cde52afbf6c41421d140.tar.gz
openbsd-0505bd63c15c82aead21cde52afbf6c41421d140.tar.bz2
openbsd-0505bd63c15c82aead21cde52afbf6c41421d140.zip
deregister; no binary change
ok jsing@ miod@
Diffstat (limited to 'src/lib/libcrypto/bn')
-rw-r--r--src/lib/libcrypto/bn/asm/x86_64-gcc.c6
-rw-r--r--src/lib/libcrypto/bn/bn_add.c4
-rw-r--r--src/lib/libcrypto/bn/bn_gf2m.c10
-rw-r--r--src/lib/libcrypto/bn/bn_lcl.h10
-rw-r--r--src/lib/libcrypto/bn/bn_nist.c12
-rw-r--r--src/lib/libcrypto/bn/bn_shift.c4
6 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/libcrypto/bn/asm/x86_64-gcc.c b/src/lib/libcrypto/bn/asm/x86_64-gcc.c
index 5c12063dcf..c9a2b6be73 100644
--- a/src/lib/libcrypto/bn/asm/x86_64-gcc.c
+++ b/src/lib/libcrypto/bn/asm/x86_64-gcc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x86_64-gcc.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: x86_64-gcc.c,v 1.4 2014/10/28 07:35:58 jsg Exp $ */
2#include "../bn_lcl.h" 2#include "../bn_lcl.h"
3#if !(defined(__GNUC__) && __GNUC__>=2) 3#if !(defined(__GNUC__) && __GNUC__>=2)
4# include "../bn_asm.c" /* kind of dirty hack for Sun Studio */ 4# include "../bn_asm.c" /* kind of dirty hack for Sun Studio */
@@ -68,7 +68,7 @@
68 * want to keep the value of zero; 68 * want to keep the value of zero;
69 */ 69 */
70#define mul_add(r,a,word,carry) do { \ 70#define mul_add(r,a,word,carry) do { \
71 register BN_ULONG high,low; \ 71 BN_ULONG high,low; \
72 asm ("mulq %3" \ 72 asm ("mulq %3" \
73 : "=a"(low),"=d"(high) \ 73 : "=a"(low),"=d"(high) \
74 : "a"(word),"m"(a) \ 74 : "a"(word),"m"(a) \
@@ -85,7 +85,7 @@
85 } while (0) 85 } while (0)
86 86
87#define mul(r,a,word,carry) do { \ 87#define mul(r,a,word,carry) do { \
88 register BN_ULONG high,low; \ 88 BN_ULONG high,low; \
89 asm ("mulq %3" \ 89 asm ("mulq %3" \
90 : "=a"(low),"=d"(high) \ 90 : "=a"(low),"=d"(high) \
91 : "a"(word),"g"(a) \ 91 : "a"(word),"g"(a) \
diff --git a/src/lib/libcrypto/bn/bn_add.c b/src/lib/libcrypto/bn/bn_add.c
index 5b2e2495b8..ebc9b9b56b 100644
--- a/src/lib/libcrypto/bn/bn_add.c
+++ b/src/lib/libcrypto/bn/bn_add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_add.c,v 1.9 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bn_add.c,v 1.10 2014/10/28 07:35:58 jsg Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -170,7 +170,7 @@ int
170BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) 170BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
171{ 171{
172 int max, min, dif; 172 int max, min, dif;
173 register BN_ULONG t1, t2, *ap, *bp, *rp; 173 BN_ULONG t1, t2, *ap, *bp, *rp;
174 int i, carry; 174 int i, carry;
175 175
176 bn_check_top(a); 176 bn_check_top(a);
diff --git a/src/lib/libcrypto/bn/bn_gf2m.c b/src/lib/libcrypto/bn/bn_gf2m.c
index d87f80d577..1cd38c7797 100644
--- a/src/lib/libcrypto/bn/bn_gf2m.c
+++ b/src/lib/libcrypto/bn/bn_gf2m.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_gf2m.c,v 1.15 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bn_gf2m.c,v 1.16 2014/10/28 07:35:58 jsg Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -137,9 +137,9 @@ static void
137bn_GF2m_mul_1x1(BN_ULONG *r1, BN_ULONG *r0, const BN_ULONG a, const BN_ULONG b) 137bn_GF2m_mul_1x1(BN_ULONG *r1, BN_ULONG *r0, const BN_ULONG a, const BN_ULONG b)
138{ 138{
139#ifndef _LP64 139#ifndef _LP64
140 register BN_ULONG h, l, s; 140 BN_ULONG h, l, s;
141 BN_ULONG tab[8], top2b = a >> 30; 141 BN_ULONG tab[8], top2b = a >> 30;
142 register BN_ULONG a1, a2, a4; 142 BN_ULONG a1, a2, a4;
143 143
144 a1 = a & (0x3FFFFFFF); 144 a1 = a & (0x3FFFFFFF);
145 a2 = a1 << 1; 145 a2 = a1 << 1;
@@ -200,9 +200,9 @@ bn_GF2m_mul_1x1(BN_ULONG *r1, BN_ULONG *r0, const BN_ULONG a, const BN_ULONG b)
200 *r1 = h; 200 *r1 = h;
201 *r0 = l; 201 *r0 = l;
202#else 202#else
203 register BN_ULONG h, l, s; 203 BN_ULONG h, l, s;
204 BN_ULONG tab[16], top3b = a >> 61; 204 BN_ULONG tab[16], top3b = a >> 61;
205 register BN_ULONG a1, a2, a4, a8; 205 BN_ULONG a1, a2, a4, a8;
206 206
207 a1 = a & (0x1FFFFFFFFFFFFFFFULL); 207 a1 = a & (0x1FFFFFFFFFFFFFFFULL);
208 a2 = a1 << 1; 208 a2 = a1 << 1;
diff --git a/src/lib/libcrypto/bn/bn_lcl.h b/src/lib/libcrypto/bn/bn_lcl.h
index 2dab445a51..a76ba4149f 100644
--- a/src/lib/libcrypto/bn/bn_lcl.h
+++ b/src/lib/libcrypto/bn/bn_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_lcl.h,v 1.20 2014/07/10 22:45:56 jsing Exp $ */ 1/* $OpenBSD: bn_lcl.h,v 1.21 2014/10/28 07:35:58 jsg Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -227,7 +227,7 @@ extern "C" {
227# if defined(__alpha) 227# if defined(__alpha)
228# if defined(__GNUC__) && __GNUC__>=2 228# if defined(__GNUC__) && __GNUC__>=2
229# define BN_UMULT_HIGH(a,b) ({ \ 229# define BN_UMULT_HIGH(a,b) ({ \
230 register BN_ULONG ret; \ 230 BN_ULONG ret; \
231 asm ("umulh %1,%2,%0" \ 231 asm ("umulh %1,%2,%0" \
232 : "=r"(ret) \ 232 : "=r"(ret) \
233 : "r"(a), "r"(b)); \ 233 : "r"(a), "r"(b)); \
@@ -236,7 +236,7 @@ extern "C" {
236# elif defined(_ARCH_PPC) && defined(_LP64) 236# elif defined(_ARCH_PPC) && defined(_LP64)
237# if defined(__GNUC__) && __GNUC__>=2 237# if defined(__GNUC__) && __GNUC__>=2
238# define BN_UMULT_HIGH(a,b) ({ \ 238# define BN_UMULT_HIGH(a,b) ({ \
239 register BN_ULONG ret; \ 239 BN_ULONG ret; \
240 asm ("mulhdu %0,%1,%2" \ 240 asm ("mulhdu %0,%1,%2" \
241 : "=r"(ret) \ 241 : "=r"(ret) \
242 : "r"(a), "r"(b)); \ 242 : "r"(a), "r"(b)); \
@@ -245,7 +245,7 @@ extern "C" {
245# elif defined(__x86_64) || defined(__x86_64__) 245# elif defined(__x86_64) || defined(__x86_64__)
246# if defined(__GNUC__) && __GNUC__>=2 246# if defined(__GNUC__) && __GNUC__>=2
247# define BN_UMULT_HIGH(a,b) ({ \ 247# define BN_UMULT_HIGH(a,b) ({ \
248 register BN_ULONG ret,discard; \ 248 BN_ULONG ret,discard; \
249 asm ("mulq %3" \ 249 asm ("mulq %3" \
250 : "=a"(discard),"=d"(ret) \ 250 : "=a"(discard),"=d"(ret) \
251 : "a"(a), "g"(b) \ 251 : "a"(a), "g"(b) \
@@ -266,7 +266,7 @@ extern "C" {
266 (high)=ret>>64; (low)=ret; }) 266 (high)=ret>>64; (low)=ret; })
267# else 267# else
268# define BN_UMULT_HIGH(a,b) ({ \ 268# define BN_UMULT_HIGH(a,b) ({ \
269 register BN_ULONG ret; \ 269 BN_ULONG ret; \
270 asm ("dmultu %1,%2" \ 270 asm ("dmultu %1,%2" \
271 : "=h"(ret) \ 271 : "=h"(ret) \
272 : "r"(a), "r"(b) : "l"); \ 272 : "r"(a), "r"(b) : "l"); \
diff --git a/src/lib/libcrypto/bn/bn_nist.c b/src/lib/libcrypto/bn/bn_nist.c
index 53ed559c06..693d6f1ed3 100644
--- a/src/lib/libcrypto/bn/bn_nist.c
+++ b/src/lib/libcrypto/bn/bn_nist.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_nist.c,v 1.14 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: bn_nist.c,v 1.15 2014/10/28 07:35:58 jsg Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -424,7 +424,7 @@ BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
424{ 424{
425 int top = a->top, i; 425 int top = a->top, i;
426 int carry; 426 int carry;
427 register BN_ULONG *r_d, *a_d = a->d; 427 BN_ULONG *r_d, *a_d = a->d;
428 union { 428 union {
429 BN_ULONG bn[BN_NIST_192_TOP]; 429 BN_ULONG bn[BN_NIST_192_TOP];
430 unsigned int ui[BN_NIST_192_TOP * 430 unsigned int ui[BN_NIST_192_TOP *
@@ -740,7 +740,7 @@ BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
740{ 740{
741 int i, top = a->top; 741 int i, top = a->top;
742 int carry = 0; 742 int carry = 0;
743 register BN_ULONG *a_d = a->d, *r_d; 743 BN_ULONG *a_d = a->d, *r_d;
744 union { 744 union {
745 BN_ULONG bn[BN_NIST_256_TOP]; 745 BN_ULONG bn[BN_NIST_256_TOP];
746 unsigned int ui[BN_NIST_256_TOP * 746 unsigned int ui[BN_NIST_256_TOP *
@@ -888,7 +888,7 @@ BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
888 carry = (int)bn_add_words(t_d, t_d, c_d, BN_NIST_256_TOP); 888 carry = (int)bn_add_words(t_d, t_d, c_d, BN_NIST_256_TOP);
889 /* left shift */ 889 /* left shift */
890 { 890 {
891 register BN_ULONG *ap, t, c; 891 BN_ULONG *ap, t, c;
892 ap = t_d; 892 ap = t_d;
893 c = 0; 893 c = 0;
894 for (i = BN_NIST_256_TOP; i != 0; --i) { 894 for (i = BN_NIST_256_TOP; i != 0; --i) {
@@ -967,7 +967,7 @@ BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
967{ 967{
968 int i, top = a->top; 968 int i, top = a->top;
969 int carry = 0; 969 int carry = 0;
970 register BN_ULONG *r_d, *a_d = a->d; 970 BN_ULONG *r_d, *a_d = a->d;
971 union { 971 union {
972 BN_ULONG bn[BN_NIST_384_TOP]; 972 BN_ULONG bn[BN_NIST_384_TOP];
973 unsigned int ui[BN_NIST_384_TOP * 973 unsigned int ui[BN_NIST_384_TOP *
@@ -1140,7 +1140,7 @@ BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
1140 21 - 4); 1140 21 - 4);
1141 /* left shift */ 1141 /* left shift */
1142 { 1142 {
1143 register BN_ULONG *ap, t, c; 1143 BN_ULONG *ap, t, c;
1144 ap = t_d; 1144 ap = t_d;
1145 c = 0; 1145 c = 0;
1146 for (i = 3; i != 0; --i) { 1146 for (i = 3; i != 0; --i) {
diff --git a/src/lib/libcrypto/bn/bn_shift.c b/src/lib/libcrypto/bn/bn_shift.c
index 771ddff7b0..0e8211e3d6 100644
--- a/src/lib/libcrypto/bn/bn_shift.c
+++ b/src/lib/libcrypto/bn/bn_shift.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_shift.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: bn_shift.c,v 1.13 2014/10/28 07:35:58 jsg Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -64,7 +64,7 @@
64int 64int
65BN_lshift1(BIGNUM *r, const BIGNUM *a) 65BN_lshift1(BIGNUM *r, const BIGNUM *a)
66{ 66{
67 register BN_ULONG *ap, *rp, t, c; 67 BN_ULONG *ap, *rp, t, c;
68 int i; 68 int i;
69 69
70 bn_check_top(r); 70 bn_check_top(r);