avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: AVR byte swap optimization


From: Eric Christopher
Subject: [avr-gcc-list] Re: AVR byte swap optimization
Date: Sun, 19 Nov 2006 22:54:02 -0800


On Nov 19, 2006, at 10:18 PM, Rask Ingemann Lambertsen wrote:

On Sun, Nov 19, 2006 at 02:46:44PM -0800, Eric Christopher wrote:

These two versions would rule on the i386 if GCC would be just a
little bit smarter:

I prefer the single instruction bswap that we now generate for
__builtin_bswap[32,64] myself...

But that's only available starting with the i486. We should still produce
good code for an i386. On the m68k, we also want something with three
rotates, say


I suppose, not much is being shipped that doesn't have the i486 instructions
these days.

        rol.w   $8, d0
        swap.l  d0
        rol.w   $8, d0


Well, there's a bswap opcode now...

-eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]