aboutsummaryrefslogtreecommitdiff
blob: 271aa9ec9a145db1b314ee2a5a43639c840a42d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/libclamav/bignum_fast.h.dist	2014-11-12 01:43:11.034069241 +0000
+++ b/libclamav/bignum_fast.h	2014-11-12 01:46:42.065459358 +0000
@@ -18,7 +18,7 @@
 #ifndef TFM_H_
 #define TFM_H_
 
-#if !defined(__GNUC__) || !defined(__x86_64__)
+#if !defined(__GNUC__) || !defined(__x86_64__) || defined(__ILP32__)
 /* on i686 we run out of registers with -fPIC, and on ia64 we miscompile.
  * Just enable this on x86-64 where we know it works */
 #define TFM_NO_ASM
@@ -102,7 +102,7 @@
 #endif
 
 /* autodetect x86-64 and make sure we are using 64-bit digits with x86-64 asm */
-#if defined(__x86_64__)
+#if defined(__x86_64__) && !defined(__ILP32__)
    #if defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) 
        #error x86-64 detected, x86-32/SSE2/ARM optimizations are not valid!
    #endif
@@ -117,7 +117,7 @@
 #endif
 
 /* try to detect x86-32 */
-#if defined(__i386__) && !defined(TFM_SSE2)
+#if (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))) && !defined(TFM_SSE2)
    #if defined(TFM_X86_64) || defined(TFM_ARM) 
        #error x86-32 detected, x86-64/ARM optimizations are not valid!
    #endif