On Wed, Feb 19, 2014 at 6:09 PM, Tom Stellard <thomas.stell...@amd.com> wrote:
> ---
>  src/gallium/auxiliary/util/u_math.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_math.h 
> b/src/gallium/auxiliary/util/u_math.h
> index b5e0663..49f8bda 100644
> --- a/src/gallium/auxiliary/util/u_math.h
> +++ b/src/gallium/auxiliary/util/u_math.h
> @@ -741,6 +741,16 @@ util_bswap32(uint32_t n)
>  #endif
>  }
>
> +/**
> + * Reverse byte order of a 64bit word.
> + */
> +static INLINE uint64_t
> +util_bswap64(uint64_t n)
> +{
> +   return ((uint64_t)util_bswap32(n & 0xffffffff) << 32) |
> +          util_bswap32((n >> 32));

Perhaps use __builtin_bswap64 if it's available? Not sure when it
became available though.

> +}
> +
>
>  /**
>   * Reverse byte order of a 16 bit word.
> --
> 1.8.1.4
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to