forked from wolfSSL/wolfssl
fix optimized fastmath read digit for explicit 32bit digits
This commit is contained in:
@@ -1611,7 +1611,7 @@ void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c)
|
|||||||
|
|
||||||
/* If we know the endianness of this architecture, and we're using
|
/* If we know the endianness of this architecture, and we're using
|
||||||
32-bit fp_digits, we can optimize this */
|
32-bit fp_digits, we can optimize this */
|
||||||
#if (defined(LITTLE_ENDIAN_ORDER) || defined(BIG_ENDIAN_ORDER)) && !defined(FP_64BIT)
|
#if (defined(LITTLE_ENDIAN_ORDER) || defined(BIG_ENDIAN_ORDER)) && defined(FP_32BIT)
|
||||||
/* But not for both simultaneously */
|
/* But not for both simultaneously */
|
||||||
#if defined(LITTLE_ENDIAN_ORDER) && defined(BIG_ENDIAN_ORDER)
|
#if defined(LITTLE_ENDIAN_ORDER) && defined(BIG_ENDIAN_ORDER)
|
||||||
#error Both LITTLE_ENDIAN_ORDER and BIG_ENDIAN_ORDER defined.
|
#error Both LITTLE_ENDIAN_ORDER and BIG_ENDIAN_ORDER defined.
|
||||||
|
@@ -217,6 +217,7 @@
|
|||||||
#ifndef NO_64BIT
|
#ifndef NO_64BIT
|
||||||
typedef unsigned int fp_digit;
|
typedef unsigned int fp_digit;
|
||||||
typedef ulong64 fp_word;
|
typedef ulong64 fp_word;
|
||||||
|
#define FP_32BIT
|
||||||
#else
|
#else
|
||||||
/* some procs like coldfire prefer not to place multiply into 64bit type
|
/* some procs like coldfire prefer not to place multiply into 64bit type
|
||||||
even though it exists */
|
even though it exists */
|
||||||
|
Reference in New Issue
Block a user