summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/asm
diff options
context:
space:
mode:
authormiod <>2014-04-24 21:31:02 +0000
committermiod <>2014-04-24 21:31:02 +0000
commitb2e9d1eed3ec4424b18ce3ee98e78f0030ca2cf3 (patch)
treee53472b5e8d9eec9f62ca322e053d1c8f66dc1cc /src/lib/libcrypto/bn/asm
parentd436f60f68787eee6620cab3a227f119e7813894 (diff)
downloadopenbsd-b2e9d1eed3ec4424b18ce3ee98e78f0030ca2cf3.tar.gz
openbsd-b2e9d1eed3ec4424b18ce3ee98e78f0030ca2cf3.tar.bz2
openbsd-b2e9d1eed3ec4424b18ce3ee98e78f0030ca2cf3.zip
Try to clean the maze of <openssl/bn.h> defines regarding the BN internals.
The intent of this change is to only keep support for two kind of architectures: - those with 32-bit int and long, and 64-bit long long, where ``long * long -> long long'' multiplication routines are available. - those with 64-bit int and long, and no 128-bit long long type. This gets rid of the SIXTY_FOUR_BIT_LONG, SIXTY_FOUR_BIT (not the same!), THIRTY_TWO_BIT, SIXTEEN_BIT and EIGHT_BIT defines. After this change, the types and defines are as follows: arch: 64bit 32bit rationale BN_LLONG undefined defined defined if l * l -> ll BN_ULLONG undefined u long long result of BN_LONG * BN_LONG BN_ULONG u long u int native register size BN_LONG long int the same, signed BN_BITS 128 64 size of 2*BN_ULONG in bits BN_BYTES 8 4 size of 2*BN_ULONG in bytes BN_BITS2 64 32 BN_BITS / 2 Tested on various 32-bit and 64-bit OpenBSD systems of various endianness.
Diffstat (limited to 'src/lib/libcrypto/bn/asm')
-rw-r--r--src/lib/libcrypto/bn/asm/parisc-mont.pl10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/lib/libcrypto/bn/asm/parisc-mont.pl b/src/lib/libcrypto/bn/asm/parisc-mont.pl
index c02ef6f014..c38cebd156 100644
--- a/src/lib/libcrypto/bn/asm/parisc-mont.pl
+++ b/src/lib/libcrypto/bn/asm/parisc-mont.pl
@@ -87,16 +87,6 @@ if ($flavour =~ /64/) {
87 $POP ="ldw"; 87 $POP ="ldw";
88 $POPMB ="ldwm"; 88 $POPMB ="ldwm";
89 $BN_SZ =$SIZE_T; 89 $BN_SZ =$SIZE_T;
90 if (open CONF,"<${dir}../../opensslconf.h") {
91 while(<CONF>) {
92 if (m/#\s*define\s+SIXTY_FOUR_BIT/) {
93 $BN_SZ=8;
94 $LEVEL="2.0";
95 last;
96 }
97 }
98 close CONF;
99 }
100} 90}
101 91
102$FRAME=8*$SIZE_T+$FRAME_MARKER; # 8 saved regs + frame marker 92$FRAME=8*$SIZE_T+$FRAME_MARKER; # 8 saved regs + frame marker