diff options
author | Jouni Malinen <j@w1.fi> | 2012-06-09 11:53:30 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-06-09 11:53:30 +0300 |
commit | e22ba3e3908c8d9027594397d4a3e811a0f43c06 (patch) | |
tree | 3ff74884b7d72449a6bb2894f7e962702912e843 | |
parent | 3947ed96e8864399af41ff0357f615de04dccb0f (diff) | |
download | external_wpa_supplicant_8_ti-e22ba3e3908c8d9027594397d4a3e811a0f43c06.zip external_wpa_supplicant_8_ti-e22ba3e3908c8d9027594397d4a3e811a0f43c06.tar.gz external_wpa_supplicant_8_ti-e22ba3e3908c8d9027594397d4a3e811a0f43c06.tar.bz2 |
LibTomMath: Use 64-bit mode for mp_digit
For 64-bit x86 builds, enable 64-bit mode to optimize bignum operations
with the internal LibTomMath version.
Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r-- | src/tls/libtommath.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tls/libtommath.c b/src/tls/libtommath.c index 7c9857f..741b442 100644 --- a/src/tls/libtommath.c +++ b/src/tls/libtommath.c @@ -66,11 +66,19 @@ #define OPT_CAST(x) +#ifdef __x86_64__ +typedef unsigned long mp_digit; +typedef unsigned long mp_word __attribute__((mode(TI))); + +#define DIGIT_BIT 60 +#define MP_64BIT +#else typedef unsigned long mp_digit; typedef u64 mp_word; #define DIGIT_BIT 28 #define MP_28BIT +#endif #define XMALLOC os_malloc |