]> granicus.if.org Git - clang/commit
Add _mm_prefetch and some others as MS builtins
authorWarren Hunt <whunt@google.com>
Wed, 19 Feb 2014 23:20:20 +0000 (23:20 +0000)
committerWarren Hunt <whunt@google.com>
Wed, 19 Feb 2014 23:20:20 +0000 (23:20 +0000)
commitdd353014c20594af971ef62ffdbf5b8aa1b20b4f
tree416c59a3a6d58520112cb86769ccec787b336b23
parentea8a523231bdeb1fd9781815eafcc209026a79b6
Add _mm_prefetch and some others as MS builtins

This patch adds several built-ins that are required for ms
compatibility. _mm_prefetch must be a built-in because it takes a
compile-time constant argument and our prior approach of using a #define
to the current built-in doesn't work in the presence of re-declaration
of _mm_prefetch. The others can be obtained by including the windows
system headers. If a user includes the windows system headers but not
intrin.h they still need to work and therefore must be built-in because
we don't get a chance to implement them in intrin.h in this case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201734 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Builtins.def
include/clang/Basic/BuiltinsX86.def
include/clang/Sema/Sema.h
lib/CodeGen/CGBuiltin.cpp
lib/Headers/Intrin.h
lib/Headers/xmmintrin.h
lib/Sema/SemaChecking.cpp
test/CodeGen/ms-builtins.c [new file with mode: 0644]
test/Headers/mmprefetch.c [new file with mode: 0644]