r201772 - Change parameter type of _mm_prefetch to "const void *".

Timur Iskhodzhanov timurrrr at google.com
Thu Feb 20 02:53:08 PST 2014


Reverted in r201774, as discussed over chat.

Warren,
Please revisit the _mm_prefetch definition as it turns out the
argument type should be slightly different on different platforms.

2014-02-20 14:04 GMT+04:00 Daniel Jasper <djasper at google.com>:
> Author: djasper
> Date: Thu Feb 20 04:04:07 2014
> New Revision: 201772
>
> URL: http://llvm.org/viewvc/llvm-project?rev=201772&view=rev
> Log:
> Change parameter type of _mm_prefetch to "const void *".
>
> Otherwise, this is not backwards compatible to the existing macro and
> can break existing code.
>
> Modified:
>     cfe/trunk/include/clang/Basic/BuiltinsX86.def
>     cfe/trunk/test/Headers/mmprefetch.c
>
> Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=201772&r1=201771&r2=201772&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
> +++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Thu Feb 20 04:04:07 2014
> @@ -59,7 +59,7 @@ BUILTIN(__builtin_ia32_pswapdsi, "V2iV2i
>  // All MMX instructions will be generated via builtins. Any MMX vector
>  // types (<1 x i64>, <2 x i32>, etc.) that aren't used by these builtins will be
>  // expanded by the back-end.
> -BUILTIN(_mm_prefetch, "vcC*i", "nc")
> +BUILTIN(_mm_prefetch, "vvC*i", "nc")
>  BUILTIN(__builtin_ia32_emms, "v", "")
>  BUILTIN(__builtin_ia32_paddb, "V8cV8cV8c", "")
>  BUILTIN(__builtin_ia32_paddw, "V4sV4sV4s", "")
>
> Modified: cfe/trunk/test/Headers/mmprefetch.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/mmprefetch.c?rev=201772&r1=201771&r2=201772&view=diff
> ==============================================================================
> --- cfe/trunk/test/Headers/mmprefetch.c (original)
> +++ cfe/trunk/test/Headers/mmprefetch.c Thu Feb 20 04:04:07 2014
> @@ -3,7 +3,7 @@
>  #include <mmintrin.h>
>
>  // Check to make sure that _mm_prefetch survives redeclaration.
> -void _mm_prefetch(char const*, int);
> +void _mm_prefetch(void const*, int);
>
>  void f(char *a) {
>    _mm_prefetch(a, 0);
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list