David Hawkins schrieb:
> Hi Yan,
>
>> The one thing that puzzles me is that 32-bit access
>> on a 16-bit boundary works fine.... I guess I
>> don't understand the ARM hardware as well as I should.
>
> I think the results of this type of access is
> device specific, eg. some ARM registers say that
> only 32-bit access is allowed. I think in general
> though if you do an unaligned address read, it'll
> return the right value, even if the hardware hides
> the fact that it actually had to perform two reads
> to get the data for you.
>
Unaligned 32-bit reads are rotated right by the number of bytes they are
unaligned, so if they seem to work, it must be gcc doing some trickery
(though I can only imagine this if the address is known at compile
time). The hardware definitely doesn't do any magic for you.
For unaligend 32-bit stores, the address is truncated by masking the two
least significant bits away.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|