This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ldrb vs ldrh in gcc-3.4.4 (ARM)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]