Properly check OPTION_MASK_ISA_64BIT.

gcc/

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

	PR target/44245
	* config/i386/i386.c (def_builtin): Properly check
	OPTION_MASK_ISA_64BIT.

gcc/testsuite/

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

	PR target/44245
	* gcc.target/i386/crc32-3.c: New.
	* gcc.target/i386/crc32-4.c: Likewise.

From-SVN: r159768
This commit is contained in:
H.J. Lu 2010-05-23 21:57:13 +00:00 committed by H.J. Lu
parent dc5027f474
commit cf5b989e82
5 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2010-05-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/44245
* config/i386/i386.c (def_builtin): Properly check
OPTION_MASK_ISA_64BIT.
2010-05-23 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (diagnose_mismatched_decls): Give error for duplicate

View File

@ -21582,6 +21582,7 @@ def_builtin (int mask, const char *name, enum ix86_builtin_func_type tcode,
{
ix86_builtins_isa[(int) code].isa = mask;
mask &= ~OPTION_MASK_ISA_64BIT;
if (mask == 0
|| (mask & ix86_isa_flags) != 0
|| (lang_hooks.builtin_function

View File

@ -1,3 +1,9 @@
2010-05-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/44245
* gcc.target/i386/crc32-3.c: New.
* gcc.target/i386/crc32-4.c: Likewise.
2010-05-23 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/c1x-typedef-1.c, gcc.dg/c1x-typedef-2.c,

View File

@ -0,0 +1,10 @@
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -mcrc32" } */
/* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */
unsigned long long
crc32d (unsigned long long x, unsigned long long y)
{
return __builtin_ia32_crc32di (x, y);
}

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mno-sse4.2 -mno-crc32" } */
/* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */
unsigned long long
crc32d (unsigned long long x, unsigned long long y)
{
return __builtin_ia32_crc32di (x, y);
}