AVR byte swap optimization

Rask Ingemann Lambertsen rask@sygehus.dk
Mon Nov 20 06:54:00 GMT 2006


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

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

-- 
Rask Ingemann Lambertsen



More information about the Gcc mailing list