AVR byte swap optimization
Eric Christopher
echristo@apple.com
Mon Nov 20 07:48:00 GMT 2006
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
More information about the Gcc
mailing list