Revert r201734 and r201742.
This breaks backwards compatibility with existing code. Previously, this was defined as #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel))) Which basically accepts any pointer. Changing this to char* simply breaks a lot of existing code. I have tried changing char* to "const void*", which seems to be the right thing as per Intel specification this should work on basically any pointer. However, apparently this breaks windows compatibility (because of a conflicting declaration in windows.h). So, we probably need to #ifdef this based on whether clang is compiling for windows. According to Chandler, this might be done by introducing an additional symbol to a fake type in BuiltinsX86.def and then condition the type expansion on the platform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201775 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/Builtins.def 0 additions, 4 deletionsinclude/clang/Basic/Builtins.def
- include/clang/Basic/BuiltinsX86.def 0 additions, 1 deletioninclude/clang/Basic/BuiltinsX86.def
- include/clang/Sema/Sema.h 0 additions, 2 deletionsinclude/clang/Sema/Sema.h
- lib/CodeGen/CGBuiltin.cpp 0 additions, 44 deletionslib/CodeGen/CGBuiltin.cpp
- lib/Headers/Intrin.h 18 additions, 0 deletionslib/Headers/Intrin.h
- lib/Headers/xmmintrin.h 5 additions, 0 deletionslib/Headers/xmmintrin.h
- lib/Sema/SemaChecking.cpp 0 additions, 34 deletionslib/Sema/SemaChecking.cpp
- test/CodeGen/ms-builtins.c 0 additions, 21 deletionstest/CodeGen/ms-builtins.c
- test/Headers/mmprefetch.c 0 additions, 16 deletionstest/Headers/mmprefetch.c
Loading
Please register or sign in to comment