[FFmpeg-devel] [RFC UNTESTED PATCH] Add IA-64 assembly byteswapping functions.

Diego Biurrun diego
Thu Oct 23 09:37:38 CEST 2008


On Thu, Oct 23, 2008 at 03:11:10AM +0200, Diego 'Flameeyes' Petten? wrote:
> This *totally untested* patch copies over the IA-64 optimised
> byteswapping code that is currently in glib 2.18.
> 
> --- /dev/null
> +++ b/libavutil/ia64/bswap.h
> @@ -0,0 +1,75 @@
> +
> +#define bswap_16 bswap_16

This is a nop.

> +static av_always_inline av_const uint16_t bswap_16(uint16_t x)
> +{
> +    uint16_t __v;

This is an illegal variable name, names starting with __ are reserved
for the system.  Please educate the glib guys about this.

> +    __asm__ __volatile__ ("shl %0 = %1, 48 ;;"

Just 'volatile' is more portable.

Diego




More information about the ffmpeg-devel mailing list