Import inline assembly byteswapping functions for embedded architectures from FFmpeg/libavutil
Submitted by Diego Elio Pettenò
Currently in glib there are inline assembly variants of byteswapping functions optimised for x86 (both i386 and higher), x86-64 and IA-64; while these (with the exception of IA-64) are the most widely used architectures on desktops, an increasing number of embedded devices (on which glib might well be useful) are developed using ARM, BlackFin or other architectures.
In FFmpeg there are some other variants, licensed under LGPL 2.1 or later, that provide optimised versions for ARM (v4 and v6, different code), BlackFin and SH4.
Cross-pollinating them with them would probably be a nice way to inject optimisation for embedded/mobile targets as well.