[Pixman] [PATCH] Fix a false-negative in MMX check

Matt Turner mattst88 at gmail.com
Wed Mar 14 16:01:32 PDT 2012


On Wed, Mar 14, 2012 at 1:26 PM, Jeremy Huddleston <jeremyhu at apple.com> wrote:
> Silence warnings that could make -Werror give a false negative
> Use signed char to avoid cases where int8_t isn't declared
>
> Reported-by: Mike Lothian <mike at fireburn.co.uk>
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
>  configure.ac |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index a920be2..d51f904 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -298,12 +298,12 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
>  int main () {
>     __m64 v = _mm_cvtsi32_si64 (1);
>     __m64 w;
> -    int8_t x;
> +    signed char x = 0;
>
>     /* Some versions of clang will choke on K */
>     asm ("pshufw %2, %1, %0\n\t"
> -        : "=y" (v)
> -        : "y" (w), "K" (x)
> +        : "=y" (w)
> +        : "y" (v), "K" (x)
>     );
>
>     return _mm_cvtsi64_si32 (v);
> --
> 1.7.9.2

Yes, and the reason that this is broken is exactly why we have to use
"K" to tell the compiler that it's an immediate value.

Reviewed-by: Matt Turner <mattst88 at gmail.com>

Please commit this.


More information about the Pixman mailing list