This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ARM memcpy on unaligned pointers and -O2
- From: Adrian von Bidder <avbidder at acter dot ch>
- To: Shaun Jackman <sjackman at pathwayconnect dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2001 09:32:06 +0100
- Subject: Re: ARM memcpy on unaligned pointers and -O2
- References: <E16EK4j-0001md-00@dazed>
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