On Sat, Jul 23, 2011 at 6:29 PM, DJ Delorie <d...@redhat.com> wrote:
>
>> Yeah, the testcase is invalid - that we lost the volatile was a bug, but
>> you really have to fix the kernel.
>
> Sadly, that's not a helpful suggestion.  How else should the kernel
> force a word-sized read?  I thought volatile was the way to tell gcc
> "do exactly what I tell you to do" ?

Huh?  No.  Volatile means "preserve this load/store".  If you want
to force it to assume the memory is aligned then you have to do
that during RTL expansion or in the target.

> And the kernel does produce the right code at that particular spot
> now, but for some reason the usb module still doesn't work.  We'll
> have to debug it some more.  The same code works just fine with gcc
> 4.4.

Fact is that GCC knows that memory is not properly aligned.  Iff arm
is truly a strict-align target then an aligned load/store from such memory
will fault.  And I seriously doubt you get the int member magically aligned
by "luck" (thus, misaligning the first char member by exactly 3 bytes).

So either arm should not lie and claim it's strict-align or you need to
fix the kernel anyway.

Richard.

Reply via email to