http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58041

--- Comment #16 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Bill Schmidt from comment #15)
> Bernd, Mikael, Martin:  Could you please test this on your respective
> targets?

Congatulations!

it works.

If I compile with -mno-unaligned-access all accesses are
ldrb/strb as it should be.
And if I compile with -mcpu=cortex-a9 -munaligned-access
the code is also OK, no ldmia's any more. The back end seems to
have fixed that for us.

foo:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        add     ip, r0, r1, asl #3
        ldr     r0, [ip, #1]    @ unaligned
        ldr     r1, [ip, #5]    @ unaligned
        str     r2, [ip, #1]    @ unaligned
        str     r3, [ip, #5]    @ unaligned
        bx      lr

which is perfectly OK for cortex-a9.

Reply via email to