]> granicus.if.org Git - clang/commitdiff
[X86] Correct type for argument to clflushopt intrinsic.
authorCraig Topper <craig.topper@intel.com>
Wed, 11 Oct 2017 16:06:08 +0000 (16:06 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 11 Oct 2017 16:06:08 +0000 (16:06 +0000)
Summary: According to Intel docs this should take void const *. We had char*. The lack of const is the main issue.

Reviewers: RKSimon, zvi, igorb

Reviewed By: igorb

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D38782

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

include/clang/Basic/BuiltinsX86.def
lib/Headers/clflushoptintrin.h

index c0fc5eb7489a6ebbed4599a67dbaf7e91a45b2f4..02e46afb25c6ebdd3edbd9d1055ffd0bf0fce85a 100644 (file)
@@ -639,7 +639,7 @@ TARGET_BUILTIN(__builtin_ia32_xsavec, "vv*ULLi", "", "xsavec")
 TARGET_BUILTIN(__builtin_ia32_xsaves, "vv*ULLi", "", "xsaves")
 
 //CLFLUSHOPT
-TARGET_BUILTIN(__builtin_ia32_clflushopt, "vc*", "", "clflushopt")
+TARGET_BUILTIN(__builtin_ia32_clflushopt, "vvC*", "", "clflushopt")
 
 // ADX
 TARGET_BUILTIN(__builtin_ia32_addcarryx_u32, "UcUcUiUiUi*", "", "adx")
index 60e0ead76275438e5a9a50cff3d758bdf0b2d854..f1f133023441a4d2e792879f2fdba4abcfd35f01 100644 (file)
@@ -32,7 +32,7 @@
 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__,  __target__("clflushopt")))
 
 static __inline__ void __DEFAULT_FN_ATTRS
-_mm_clflushopt(char * __m) {
+_mm_clflushopt(void const * __m) {
   __builtin_ia32_clflushopt(__m);
 }