>So the optimiser will never coalesce
>
>LDR    R0, [R2,#4]
>LDR    R1, [R2,#8]
>
>into
>
>LDMIB  R2, {R0,R1}
>
>?

Oops, you're right.  Try this with -O2:

struct {
  int pad;
  int a;
  int b;
} foo;

bar()
{
  baz(foo.a, foo.b);
}

-- I get:

bar:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 1, current_function_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {fp, ip, lr, pc}
        ldr     r3, .L2
        ldmib   r3, {r0, r1}    @ phole ldm
        sub     fp, ip, #4
        bl      baz
        ldmea   fp, {fp, sp, pc}

I guess I ought to check what the exact conditions that trigger the bug are.  
Is the errata available online?

p.


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to