From 7e3ee009cb00e65ea487ba61ae3b5271c73c19d6 Mon Sep 17 00:00:00 2001 From: miod <> Date: Thu, 24 Apr 2014 21:31:02 +0000 Subject: Try to clean the maze of 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. --- src/lib/libcrypto/bn/asm/parisc-mont.pl | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/lib/libcrypto/bn/asm') 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/) { $POP ="ldw"; $POPMB ="ldwm"; $BN_SZ =$SIZE_T; - if (open CONF,"<${dir}../../opensslconf.h") { - while() { - if (m/#\s*define\s+SIXTY_FOUR_BIT/) { - $BN_SZ=8; - $LEVEL="2.0"; - last; - } - } - close CONF; - } } $FRAME=8*$SIZE_T+$FRAME_MARKER; # 8 saved regs + frame marker -- cgit v1.2.3-55-g6feb