]> granicus.if.org Git - clang/commitdiff
include/clang/Basic/BuiltinsX86.def: __builtin_ia32_crc32**() should be defined to...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 9 Mar 2011 12:00:19 +0000 (12:00 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 9 Mar 2011 12:00:19 +0000 (12:00 +0000)
mingw-w64's intrin.h declares __builtin_ia32_crc32**() as external.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127329 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/BuiltinsX86.def
test/Sema/builtins-decl.c [new file with mode: 0644]

index da106daf26ecc9c35eef481120a37277044f6a32..1584498888f2d62c6ede16d56712231954d8fbd4 100644 (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", "")
diff --git a/test/Sema/builtins-decl.c b/test/Sema/builtins-decl.c
new file mode 100644 (file)
index 0000000..19bdb84
--- /dev/null
@@ -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);