Date: Wed, 10 Sep 1997 08:47:53 +1100 From: Bill Currie Subject: Re: [Q] ASM In-reply-to: <341589F5@relay.probe.co.uk> To: "Hargreaves, Shawn" , djgpp AT delorie DOT com Message-id: <199709092052.IAA12964@teleng1.tait.co.nz gatekeeper.tait.co.nz> Organization: Tait Electronics Limited MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Comments: Authenticated sender is Precedence: bulk On 9 Sep 97 at 10:37, Hargreaves, Shawn wrote: > I'm in awe of whoever wrote the code to perform that particular type > of optimisation: it's easy enough to do by hand for a specific case, > but making the compiler do it for any arbitrary expression can't > have been easy :-) There's also: unsigned rotate_left_by_5(unsigned y) { return (y<<5)|(y>>(32-5)); } this will go to (-O2 -fomit-frame-pointer): _rotate_left: movl 4(%esp),%eax roll $5,%eax ret Personaly, I find that one more impressive. Bill -- Leave others their otherness.