[mc1322x] Non-aligned structure copies

Mariano Alvira mar at devl.org
Wed Nov 4 09:12:00 EST 2009


On Wed, Nov 04, 2009 at 08:57:19AM -0500, Jon Smirl wrote:
> On Wed, Nov 4, 2009 at 8:55 AM, Mariano Alvira <mar at devl.org> wrote:
> > On Wed, Nov 04, 2009 at 08:29:21AM -0500, Jon Smirl wrote:
> >> On Wed, Nov 4, 2009 at 6:38 AM, Mariano Alvira <mar at devl.org> wrote:
> >>
> >> very well. OpenOCD might be able to detect this by examining each
> >> instruction before running it.
> >>
> >> It you do a 32b store of ABCD to location 1 on ARM7 it writes DABC
> >> into the word starting at zero.  The code expects it to write xABC
> >> into the word at 0 and Dxxx into the word at 4. Qemu should be able to
> >> detect this in its implementation of the LOAD/STORE instructions.  We
> >> always want an exception on an un-aligned access. So is Qemu if is
> >> byte swapping, trigger the exception instead of doing the operation.
> >>
> >
> > Ok, those specifics will help. I should be able to take a look today.
> 
> Some options....
> 
> http://lecs.cs.ucla.edu/wiki/index.php/XScale_alignment
> 
> I turned on these compiler options and it caused a big pile of errors.

What example/program are you building? I'd like to do my tests with
something similar.

-Mar.



More information about the mc1322x mailing list