Subject: Re: Possible bug in arm32 strongarm optimisations.
To: <>
From: Ignatios Souvatzis <>
List: tech-toolchain
Date: 10/25/2000 18:38:17
On Wed, Oct 25, 2000 at 09:25:06AM +0100, Chris Gilbert wrote:
> > ldr r3, [r5, #6]
> >    r3 <- [5476]    // (in)famous rotating
> > mov r0, r3, lsr # 16
> >    r0 <- [--54]    // with the `-' zero
> What is this rotating thing?  I don't remember coming across it before.  Is 
> it documented anywhere?

On older ARMs, if you fetch a misaligned longword, you get a rotated aligned
longword instead. This can be used as above to simulate word fetches. Although
it's not clear to me why one wouldn't fetch the unrotated longword and mask
that instead. Maybe because on virtually all registe-to-register ALU operations,
you get a shift or a rotate for free.

The ARM book I have with me doesn't describe this in an easily found place,
and the architecture reference manual is at work, else I would cite chapter
and number.