ARM memcpy on unaligned pointers and -O2

Adrian von Bidder avbidder@acter.ch
Thu Dec 13 02:26:00 GMT 2001


On Thu, 2001-12-13 at 01:50, Shaun Jackman wrote:

> uint32
> ld32( const uint32* p)

> void
> str32( uint32* p, uint32 val)
> {

You use pointer to int in both cases. I think it's ok for the compiler
to except the pointer to be aligned.

Perhaps use a char pointer and load 4 bytes into the int?

-- vbi




More information about the Gcc-bugs mailing list