include/clang/Basic/BuiltinsX86.def: __builtin_ia32_crc32**() should be defined to take unsigned args and to return unsigned value.

mingw-w64's intrin.h declares __builtin_ia32_crc32**() as external.

llvm-svn: 127329
This commit is contained in:
NAKAMURA Takumi 2011-03-09 12:00:19 +00:00
parent 58d1f93b03
commit 4e8c365e9a
2 changed files with 12 additions and 4 deletions

View File

@ -342,10 +342,10 @@ BUILTIN(__builtin_ia32_pcmpestriz128, "iV16ciV16cic","")
BUILTIN(__builtin_ia32_pcmpgtq, "V2LLiV2LLiV2LLi", "")
BUILTIN(__builtin_ia32_crc32qi, "iic", "")
BUILTIN(__builtin_ia32_crc32hi, "iis", "")
BUILTIN(__builtin_ia32_crc32si, "iii", "")
BUILTIN(__builtin_ia32_crc32di, "LLiLLiLLi", "")
BUILTIN(__builtin_ia32_crc32qi, "UiUiUc", "")
BUILTIN(__builtin_ia32_crc32hi, "UiUiUs", "")
BUILTIN(__builtin_ia32_crc32si, "UiUiUi", "")
BUILTIN(__builtin_ia32_crc32di, "ULLiULLiULLi", "")
// AES
BUILTIN(__builtin_ia32_aesenc128, "V2LLiV2LLiV2LLi", "")

View File

@ -0,0 +1,8 @@
// RUN: %clang_cc1 %s -fsyntax-only -verify -triple=i686-mingw32
// RUN: %clang_cc1 %s -fsyntax-only -verify -triple=x86_64-mingw32
// mingw-w64's intrin.h has decls below.
// we should accept them.
extern unsigned int __builtin_ia32_crc32qi (unsigned int, unsigned char);
extern unsigned int __builtin_ia32_crc32hi (unsigned int, unsigned short);
extern unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int);