ldrb vs ldrh in gcc-3.4.4 (ARM)

Lennert Buytenhek buytenh@wantstofly.org
Fri Aug 19 10:05:00 GMT 2005


On Fri, Aug 19, 2005 at 11:47:36AM +0200, Marius Groeger wrote:

> If you forget to do so, GCC might 
> silently break the short into two byte accesses. However, while this 
> is the only option GCC has on that arch, it could still emit a 
> warning. If you have ever had such a bug, you just don't forget :-)

I once spent a day on debugging a problem with a 16bit memory-mapped
device that turned out to be caused by gcc performing two byte stores
instead of one halfword store for every access, so it would indeed be
nice to get a warning when a volatile unsigned short * is dereferenced
on an ARM arch that doesn't support halfword accesses.


cheers,
Lennert

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list