Subject: Re: Possible bug in arm32 strongarm optimisations.
To: Chris Gilbert <chris@buzzbee.freeserve.co.uk>
From: Chris G. Demetriou <cgd@sibyte.com>
List: port-arm32
Date: 10/25/2000 09:20:38
chris@buzzbee.freeserve.co.uk (Chris Gilbert) writes:
> What is this rotating thing?  I don't remember coming across it before.  Is 
> it documented anywhere?

Take a look in the ARM architecture reference manual.  It's documented
behaviour of non-naturally aligned loads and stores.

something like:

	0: 0xaa
	1: 0xbb
	3: 0xcc
	3: 0xdd

lw from 0:	0xddccbbaa
lw from 1:	0xaaddccbb
etc.

similarly for lh:

lh from 0:	0xbbaa
lh from 1:	0xaabb

(i think i got the endianness right).

for most users unexpected results, but architecturally specified ones.

This comes up every so often on the list.  (I suspect my standard
response is why Jason Thorpe said "unexpected" results in his recent
post about unaligned accesses in the in-tree ssh...  People often say
broken, or similar, but, weenie that i am, i'm prone to point out that
they're actually quite correct and documented ... just unexpected.  8-)



chris