This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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: ARM memcpy on unaligned pointers and -O2


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



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