[FFmpeg-devel] m68k code for bswap

Måns Rullgård mans
Wed Jul 1 15:33:21 CEST 2009


ami_stuff <ami_stuff at o2.pl> writes:

> Hi,
>
> Here is m68k asm-optimized code for bswap.
> Maybe someone with more knowledge can add it to "libavutil/bswap.h" file.
>
> int64 endian64(__reg("d0/d1") int64) =
>     "\tmove.l\td1,d2\n"
>     "\tmove.l\td0,d1\n"
>     "\tmove.l\td2,d0\n"
>     "\trol.w\t#8,d0\n"
>     "\trol.w\t#8,d1\n"
>     "\tswap\td0\n"
>     "\tswap\td1\n"
>     "\trol.w\t#8,d0\n"
>     "\trol.w\t#8,d1";

I can't read that.  Besides, is it any better than what compilers can do?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list