This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/44245: ICE: in extract_insn, at recog.c:2048


On Sat, May 22, 2010 at 02:51:39PM -0700, H.J. Lu wrote:
> Hi,
> 
> def_builtin doesn't check if a 64bit builtin needs ISAs.  This checks
> OPTION_MASK_ISA_64BIT properly.  OK for trunk and 4.4/4.5?
> 
> Thanks.
> 
> 
> H.J.
> ---
> gcc/
> 
> 2010-05-22  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR target/44245
> 	* config/i386/i386.c (def_builtin): Properly check
> 	OPTION_MASK_ISA_64BIT.
> 

My patch exposed a bug in ia32intrin.h, which caused:

[hjl@gnu-33 prev-gcc]$ ./xgcc -B./ -O -pedantic-errors
../../src-trunk/gcc/testsuite/g++.dg/other/i386-7.C -S
In file included from ./include/x86intrin.h:27:0,
                 from
../../src-trunk/gcc/testsuite/g++.dg/other/i386-7.C:6:
./include/ia32intrin.h: In function âlong long unsigned int
__crc32q(long long unsigned int, long long unsigned int)â:
./include/ia32intrin.h:186:42: error: â__builtin_ia32_crc32diâ was not
declared in this scope
[hjl@gnu-33 prev-gcc]$ 

OK for trunk and release branches?

Thanks.


H.J.
----
---
2010-05-24  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/ia32intrin.h (__crc32q): Define only if
	__SSE4_2__ is defined.

diff --git a/gcc/config/i386/ia32intrin.h b/gcc/config/i386/ia32intrin.h
index 540bc3f..988dd72 100644
--- a/gcc/config/i386/ia32intrin.h
+++ b/gcc/config/i386/ia32intrin.h
@@ -178,6 +178,7 @@ __bswapq (long long __X)
   return __builtin_bswap64 (__X);
 }
 
+#ifdef __SSE4_2__
 /* 64bit accumulate CRC32 (polynomial 0x11EDC6F41) value.  */
 extern __inline unsigned long long
 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -185,6 +186,7 @@ __crc32q (unsigned long long __C, unsigned long long __V)
 {
   return __builtin_ia32_crc32di (__C, __V);
 }
+#endif
 
 /* 64bit popcnt */
 extern __inline long long


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]