From 27ad8abf520242d60623ebff7406c38e3f8bb346 Mon Sep 17 00:00:00 2001 From: Todd A Ouska Date: Wed, 10 Aug 2011 13:35:49 -0700 Subject: [PATCH] in 32 bit mode use 32 bit digits (even if on 64 bit processors), use 64 bit digits on x86_64 even if not using asm --- ctaocrypt/include/ctc_tfm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ctaocrypt/include/ctc_tfm.h b/ctaocrypt/include/ctc_tfm.h index 66054b825..ab16f1a21 100644 --- a/ctaocrypt/include/ctc_tfm.h +++ b/ctaocrypt/include/ctc_tfm.h @@ -68,6 +68,10 @@ #define FP_64BIT #endif #endif +/* use 64-bit digit even if not using asm on x86_64 */ +#if defined(__x86_64__) && !defined(FP_64BIT) + #define FP_64BIT +#endif /* try to detect x86-32 */ #if defined(__i386__) && !defined(TFM_SSE2) @@ -210,7 +214,7 @@ typedef signed long long long64; #endif #endif - typedef unsigned long fp_digit; + typedef unsigned int fp_digit; typedef ulong64 fp_word; #endif